News for hackers. Stuff that matters.
Re:Nth-to-Last Element in a Singly Linked List by bmalicoat on Sunday January 31, 2010 @02:19PM (#1090908)
As someone currently doing the technical interview tour, I really appreciate this link. Particularly that the author follows the general thought pattern of thinking of an inefficient way and then searching for better ways. Does anyone have any other favorite sites that have these types of questions with answers?
Re:Nth-to-Last Element in a Singly Linked List by trunnell on Sunday January 31, 2010 @04:18PM (#1091117)
It's not a website, but _Programming Pearls_ by Jon Bentley is still an excellent way of getting into an algorithms frame of mind. Don't be dissuaded just because it's a few years old. I like the way it presents the thought process of solving the given problems.
Re:Nth-to-Last Element in a Singly Linked List by raganwald on Sunday January 31, 2010 @05:28PM (#1091236)
A little long in the tooth, and mostly MSFT-style "brain teasers:" http://www.techinterview.org/index.html
Re:Nth-to-Last Element in a Singly Linked List by goodgoblin on Sunday January 31, 2010 @09:04PM (#1091594)
One I got recently - and blanked on - write a function to generate all the permutations of a string. Recursion preferred.
Re:Nth-to-Last Element in a Singly Linked List by bshep on Sunday January 31, 2010 @10:44PM (#1091726)
Quick and Dirty(probably better ways to do it):

  def permute(string, prefix = ''):
        if len(string) == 1:
  		print prefix + string
  		return
  
        for x in range(0, len(string)):
  		new_prefix = prefix + string[x]
  		unused_chars = string[0:x] + string[x+1:]
  		permute(unused_chars, new_prefix)
Re:Nth-to-Last Element in a Singly Linked List by dodger1 on Monday February 01, 2010 @02:05AM (#1091950)
This same website has a solution for the permutation of a string. http://www.mytechinterviews.com/permutations-of-a-string