15 MCQS were asked on c,c++, OS.
1) Given a linked list of co-ordinates where adjacent points either form a vertical line or a horizontal line. Delete points from the linked list which are in the middle of the line
Eg: (0,10) -> (1,10)->(5,10) -> (10,10) | (10,5) -> (20,5) -> (40,5) should be changed to (0,10) -> (10,10) | (10,5) ->(40,5)
2) Given a sorted array,convert it into bst
The code should be written on paper and should be error free. No extra space should be used.
1) Given a linkedlist of moves of 2 players in tic-tac-toe game . Find who has won the game.
1) Given a pile of 9 objects. 2 players take turns to pick 1 , 2 or 3 objects . The last one to pick is the looser. What is the winning strategy? wining strategy for 9 coins
2) Asked to how to design a cache for dns records. I have told different approaches like First-in-First-Out, less frequently used,least recently used… He asked me to tell the strategy and code it. I told LRU and implemented this.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.