Some recent interview questions
1. How would you determine whether a singly linked list contains a loop? Write the test cases for the same.
2. Calculate the angle between the minute and hour hand of a clock for a given time.Write test cases for the same.
3. How to delete a node in a linked list when no pointer to that node is provided?
4. How to find the second last word in a given string? Write the test cases for the same.
5. Reverse a linked list and write test cases.
6. Write a program to get the Fibonacci series.
7. How would you reverse a given integer. (the interviewer said without converting it to a string)
8. This was a SQL question : Suppose you have multiple pages on a website and each page has multiple impressions. Write a SQL query to get the impressions per page. The interviewer expected a join query.
9. This was a design question : Write a generic class to track out if credit card of an user is lost. He asked how will you come to know that the card is lost and then asked to write from a programmers point of view.