Company: Groupon
Technical Interview Questions -
Q1. Find Kth Min Values in an array?
Q2. Write in-order traversal without using recursion?
Q3. Reverse words in a string. Ex:
Input : “This is a String”
Output: “String a is This”
Q4. Removing duplicates from unsorted list of integer?
if you have unsorted list of
0,5,9,5,6,7,6,9
the result should be
0,5,9,6,7 and the performance should be best over more number of elements.
Q5. Find if a binary tree is bst?
Q6. Write a dynamic programming solution for finding maximum contiguous sub-sequence sum?
Q7. Write a SQL to find the nth maximum salary in a employee table.
Q8. Write a code in java to design connection pool. You have to pass the parameter like pool size, time out etc.
How will you call the connection from pool? How will you return the connection to pool once time out or connection not in use. You also have to write the exception handling mechanism to print any exception.
Thanks Ajay for contributing this article. If you would like to contribute, mail us your interview experience at [email protected]. We will like to publish it on CrazyforCode and help other job seekers.
is there a better solution to question 4 than hashing?
@arshan:by using heap i think
How can heap be used to remove duplicates…??…Can u explain ur approach…
I don’t think using heap is appropriate here because you want to keep the result unsorted.
How about iterating through the list of numbers, keep adding numbers to a Set(HashSet). Set does not allow duplicates.
This is Hashing though.