Sunday 9 December 2012

Directi Test

Directi conducted a programming test at IIT-B for placements. The platform we used was CodeChef.
I personally found the interface on to be very non-intuitive as compared with InterviewStreet. Make sure you practice on codechef before appearing for the test, so as to not get stuck up on some trivial issues during the test. The total duration of the test was about 1.5 hours.


Here are the questions asked :

1) The question boiled down to this : Find the shortest path from source node S to destination node T in an un-directed graph where all the edges have equal weight. (Hint : Think BFS)

2) This one was non-trivial. I don't remember the question exactly but the idea was to enumerate all the cycles in some given permutation of {0,1,...,n-1}.

Eg: If p[] = {0,1,2} there are 3 cycles 0->0, 1->1, 2->2
      If p[] = {2,0,1} there is only 1 cycle, 2->1->0->2


No comments:

Post a Comment