Monthly Archives: April 2010

Find Kth minimum element in a unsorted array

Some days ago while interviewing a candidate, I asked the candidate a very easy by the book interview question. Design an efficient algorithm to find the 2nd smallest integer in a unsorted integer array of length N, which should run … Continue reading

Posted in Algorithm | Tagged , , , , , , | 4 Comments

Generating all possible permutations of a sequence.

P.S. – This Post is intended for people who want to know a simple,efficient approach to generate all possible permutations for a sequence.For real world software I would recommend using standard library functions. All of us at some moment while … Continue reading

Posted in Algorihtms | Tagged , , , , , , | 2 Comments