Pages

Monday 31 December 2012

Design Interview Questions

  1. How would you design the snake and ladder game ?
  2. Some solutions :
    http://www.cvc.uab.es/shared/teach/a21291/materials/Object%20oriented%20design%20principles/laddersAndSnakes.pdf
  3. http://scg.unibe.ch/download/lectures/p2/P2-02-OODesign.pdf - This is the snale and ladder game solution and I got it mostly correct here. This is a very nice solution and shows a nice approach. You have to question your own design at every stage, like is it extensible, what happens when things change, what might be the use cases, can we extend it at runtime, just like head first keeps asking you, does it match the open closed principle.
  4. How would you design a virtual zoo ? - This is like the Duck problem in Head First Design patterns.
  5. Algorithm for top 10 trending words in twitter ?
  6. Design an OO parking lot. What classes and functions will it have. It should say, full, empty and also be able to find spot for Valet parking. The lot has 3 different types of parking: regular, handicapped and compact.
  7. How would you design a market place like ebay or an online book selling portal ? Explain the MVC architecture. How you would use an order composer at different places and make the orders, serve it in your database and how you would design the database.
  8. Amazon has many visitors to its site. And it tracks what pages the customers visited, etc and other stuff.
    Make an efficient data structure for storing 3 days of information of all those customers who have visited site exactly two different days and searched more than 3 unique pages of the site in those 2 days. So whoever visited site exactly two days out of these three days and visited more then 3 unique pages should be in the contact list.
  9.  Design a Chess Board : http://tianrunhe.wordpress.com/2012/03/19/design-a-chess-game-using-oo-principles/
  10. Design an IVR system for a Restaurant in which customers can book their tables for lunch and/or dinner. Advance booking for 2 or 7 days/as you wish. After the request from user, respond to him that you will confirm the request within 5 minutes. Check availability and send SMS confirming the same. If the SMS is delivered then assume that the customer is genuine. If the SMS is not delivered properly, discard the user request, as it is not genuine.
    i)       How can you take names and email Ids of the customers during the process?
    ii)     What can you do for repeat customers? How will you identify the repeat customers?
    iii)   If there is request for a team size greater than the table size, what will you do? E.g. request for 10 persons when table sizes are 6, 4 and 2.
  11. http://www.johnpanzer.com/ucscx-oop-java-winter01/BookstoreExample.html



  1. sd

No comments:

Post a Comment