Monday, July 23, 2007

Interview questions (2)

1. How would you write your own garbage collector ?
2. You've got an array of numbers. They are not sorted. How do you find the the first pair that sums to X (a given number)
3. Write an algorithm where given an array of numbers (ints) , find the number of pairs that sum up to a given number
4. Given a n by n matrix or integers, where each row is sorted in ascending order and each column is sorted in ascending order. Find a particular number in that matrix.
5. Write a basic compiler simulator
6. Given a sentence, write an algorithm that would reverse all the letters in teh sentence.
7. The same sentence, write an algorithm that would reverse all the words in that sentence.
8. When would you use a hashmap, hashset, linked list ?
9. Questions around serialization - why ? how to serialize, how to prevent serialization
10. Concurrency - dead locks, prevention of deadlocks, race conditions
11. Web apps - req/response, vs sessions, how do web servers keep track of sessions, why would you use pooling
12. Threads - whats a thread local, why would you use one, what do you need to be aware of when using threads

Other questions
- Why would you use materialized views.
- Joins, self joins, hierarchical queries

No comments:

Search This Blog