Algorithms And Programming #4

31. A walk-through through the symbol table functions, lookup () implementation etc - The interview was on the Microsoft C team.

32. A version of the "There are three persons X Y Z, one of which always lies".. etc..

33. There are 3 ants at 3 corners of a triangle; they randomly start moving towards another corner. What is the probability that they don't collide?

34. Write an efficient algorithm and C code to shuffle a pack of cards. This one was a feedback process until we came up with one with no extra storage.

35. The if (x == 0) y = 0 etc.

36. Some more bit wise optimization at assembly level

37. Some general questions on Lex, Yacc etc.

38. Given an array t[100] which contains numbers between 1..99. Return the duplicated value. Try both O (n) and O(n-square).

39. Given an array of characters. How would you reverse it? How would you reverse it without using indexing in the array?

40. Given a sequence of characters. How will you convert the lower case characters to upper case characters? (Try using bit vector - sol given in the C lib -typec.h)


NEXT
BACk

No comments:

Post a Comment