Comments on: Programming Interview Questions 9: Convert Array
/2011/10/18/programming-interview-questions-9-convert-array/?utm_source=rss&utm_medium=rss&utm_campaign=programming-interview-questions-9-convert-array
Web Search and Information RetrievalTue, 06 Dec 2011 05:44:14 +0000hourly1http://wordpress.org/?v=3.1By: Arden
/2011/10/18/programming-interview-questions-9-convert-array/#comment-308
ArdenFri, 21 Oct 2011 07:09:04 +0000/?p=616#comment-308Yes you're right, I didn't do XOR swap to keep the algorithm simple. Using a single extra variable should be fine, but I'll modify the question definition to 'constant extra space' to avoid further confusion.Yes you’re right, I didn’t do XOR swap to keep the algorithm simple. Using a single extra variable should be fine, but I’ll modify the question definition to ‘constant extra space’ to avoid further confusion.
]]>By: Ori
/2011/10/18/programming-interview-questions-9-convert-array/#comment-306
OriFri, 21 Oct 2011 07:03:39 +0000/?p=616#comment-306Isn't the index you use for swapIndex takes extra space? why not use XOR swap?Isn’t the index you use for swapIndex takes extra space? why not use XOR swap?
]]>