CouponDunia Interview Experience | Set 5 (For full time Software Engineer)
I applied here from their career page and was asked to attend 5 rounds and I cleared all of them and landed into a full time Software Engineer job 🙂
It was 5 question screening round which was meant to know about my expectations from the organization.
Hey geek! It's time to become a success story instead of reading them. Check out our most renowned DSA Self Paced Course, now at a student-friendly price and become industry ready. And if you are looking for a more complete interview preparation resource, check out Complete Interview Preparation Course that will prepare you for the SDE role of your dreams!
Feeling prepared enough for your interview? Test your skills with our Test Series that will help you prepare for top companies like Amazon, Microsoft, TCS, Wipro, Google and many more!
Online Coding round on Hackerrank
3 coding coding questions:
– Run length Encoding of string with slight modification
– Finding buying day and selling day for a given set of days such that the profit of the buyer is maximum .
– Given a set of keywords and a long string, break the long string such that the split words are from the keywords only
Questions were fairly simple but test cases were very nice.
The interview went for about 1 hr and was completely technical. The questions asked were:
– Given a binary tree how would you identify whether it is a Binary Search tree or not?
I gave the answer using inorder traversal.
– given a bst, convert it to a binary tree such that each element is replaced by the sum of all the elements greater than it?
– Given an employee table with employee name and salary find the 2nd highest salary.
I gave the vague answer of using inner query then he asked if instead of 2nd its nth highest then what would I do. After sometime I asked for the keyword (which was LIMIT) and then I wrote the query which was almost syntactically correct.
– The answer to the question of binary tree, he asked me if I could solve it without using any space (my previous solution took O(n) space)?
I was writing the solution and in between he said to stop and asked me if I have any question.
Java application development
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:
- Speed is of the utmost concern. Imagine we have 1 million emails to send. Your code should not sequentially send one email after another.
- 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.
- 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).
- Don’t worry about whether the SMTP server can handle the load. It can.
- 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.
- Comment your code extensively.
- 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.
- 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.
It was of about 1 hr on soft and technical skills. Questions asked include:
– Tell be about yourself?
– given an array. find the pattern it follows? there can be 4 patterns only: increasing, decreasing, increase then decrease and decrease then increase.
– Given an array of distinct positive numbers find the maximum sum of elements such that no 2 elements occurring in the maximum sum set is adjacent to each other.
I gave an incorrect answer and then I realised it, so I asked to rectify and she allowed me to do so.
– How can you improve suggestions of coupons to the users?
This discussion went for about 20 mins.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.