CouponDunia Interview Experience

I recently got an offer from CouponDunia, here is my interview experience:

There were four rounds.

Round 1: Coding Test on HackerRank.



Three question in 90 minutes.

Round 2: Telephonic Interview

  1. Let’s say that you have 25 horses, and you want to pick the fastest 3 horses out of those 25. In each race, only 5 horses can run at the same time because there are only 5 tracks. What is the minimum number of races required to find the 3 fastest horses without using a stopwatch? (http://www.programmerinterview.com/index.php/puzzles/25-horses-3-fastest-5-races-puzzle)
  2. Implement queue with the help of two stacks.
  3. Given a table “student” of with columns Name and Marks. You have to write a SQL query to get the 2nd highest marks from the table. Also write a query to find the nth highest marks, where n can be any number.
  4. What is left join. Give example.
  5. What is magic functions and autoloading in PHP?
  6. What is SQL injection?
  7. Given three arrays sorted in non-decreasing order, print all common elements in these arrays.
    Examples:
    ar1[] = {1, 5, 10, 20, 40, 80}
    ar2[] = {6, 7, 20, 80, 100}
    ar3[] = {3, 4, 15, 20, 30, 70, 80, 120}
    Output: 20, 80
    ar1[] = {1, 5, 5}
    ar2[] = {3, 4, 5, 5, 10}
    ar3[] = {5, 5, 10, 20}
    Output: 5, 5
  8. Difference between program, process and threads.
  9. How will you display the most popular coupons on the CouponDunia website? What approach will you follow?

Round 3: Assignment(Java project)
Imagine we have an Email Queue table in our database with each row representing an email that needs sending. Table Name: EmailQueue Columns: id, from_email_address, to_email_address, subject, body (you can also add columns as you wish, but at minimum it should have these columns). Write a java program that will read from this table and send the emails over an SMTP server (not local unix mail). For the SMTP sending you can use a pre-existing library of your choice, if you wish. Please take into consideration the following:

  1. Speed is of the utmost concern. Imagine we have 1 million emails to send. Your code should not sequentially send one email after another.
  2. Your solution should scale. In other words, if we determine the fastest we can send emails from a single server is 300 emails/second I should be able to run the same Java program on another server and be able to send another 300 emails/second.
  3. Your code should be careful to ensure that it is not possible for the same email to be sent twice (especially when running multiple processes of the program).
  4. Don’t worry about whether the SMTP server can handle the load. It can.
  5. Order emails are sent is not necessarily important. In other words, even though I’m calling this a “queue” it’s not important to guarantee that emails are sent in the order they arequeued.
  6. Comment your code extensively.
  7. Once again, speed is the primary concern. So do remember to think about what the slow points in the email sending process could be and take efforts to minimize those pain points.
  8. Send me instructions on how to compile/run/test your code along with the code itself. Also the sql statements for me to create the table that you are working with and the sql statements to insert a few test emails.

Round 4: Skype Interview

  1. Tell me about yourself.
  2. About my projects (in detail).
  3. What is AJAX? Explain the working of AJAX in detail.
  4. Given an array, print the Next Greater Element (NGE) for every element. If it doesn’t exceed then print -1. They asked me to write full code.
  5. There is a dictionary with few words each of length 3 and start and finish word is given. You can reach from one word to another word by changing only one digit. Like from cat, you can reach to hat or bat or cap. What is the minimum number of steps should be taken to reach finish word from start word.
  6. There is a hotel with 100 rooms in it and some check in and check outs of different guests are given. You do not want to use all the rooms. So you have to make the arrangement in minimum number of rooms. What is that minimum number?
  7. Explain Auto Complete system (like Google search suggestion). You have a database table and a search box. As you type in the search box, it should show the suggestions from that database table. How will you do that? Explain in detail.

If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Write your Interview Experience or mail it to contribute@geeksforgeeks.org



My Personal Notes arrow_drop_up


Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.