Recent Interview Questions
More Questions »
0of 0 votesGiven a file of n lines, where n-1 lines are identical and 1 line is different. Find the unique line in not more than one scan of the file.
2of 2 votesThere are exactly N advertising boards on the highway. Now a company want to advertise on some of these advertising boards (each advertising board costs some money).
Company strategy is that, they want at least 'K' advertisement should be there among M consecutive advertising boards. But at the same time Company want to pay minimum for its advertisement.
Now, what is the total number of ways, different ways Company can advertise meeting its minimum cost strategy.
Also 1<=K<=M<=50 and M<=N<=10^9
As for Example: N= 3, M = 2, K=1 ==> there is only one way for minimum cost, ie. 0C0 , where '0' denotes No company advertisement, and 'C' denotes company advertisement board.
Similarly, for N =4, M =2, K =1 ==> there is 3 possible ways, ie. C0C0, 0C0C, 0CC0.
2of 2 votesProblem: you are given 2 words with equal number of characters. Find an algorithm to go from first word to second word, changing one character at each step, in such a way that each intermediate word exist in a given dictionary.
Example:
Words are pit, map. A possible solution:
pit, pot, pet, met, mat, map
0of 0 votesHow would you test each of the 3 layers in a 3-tier web app?
0of 0 votesHow would you test amazon search functionality on the home page?

