Thursday, December 23, 2010

Intel Interview Questions

Here are the Questions which I was asked By Intel.

  1. Reverse a singly linked list in order O(n).
  2. Write a code to check if a given string is palindrome.
  3. Buy 100 lappies (anything) in Rs. 100, given lappyA price is Rs 5 per lappyA , lappyB price is Rs 1 per lappyB, lappyC price is 5 paise per lappyB. Find out quantities of each of lappyA, lappyB, lappyC.
  4. There is a 100 steps stair. One can either take one step at a time or 2 steps at a time. Find out the number of ways of reaching to the top. [Hint: take one step stair, then 2 steps, 3,steps, n try to find out pattern or formula.]
  5. Find trailing number of zeros in factorial of 1947 (1947!).
  6. Read a file and if you find L1 and L2 as consecutive lines then print previous 100 lines including L1 and L2.
  7. What do you understand by OOP (object oriented principles) i)implement oop in c
  8. Super structure: implement a super structure which can behave like both stack and queue using liked list. Try to make enqueue,dequeue,push,pop in O(1)
  9. Shuffle an array of length n in one traversal.
  10. How you can generate a pseudo random number mathematically [i couldn't ans this]
  11. Difference b/w process and thread
  12. fork().
  13. What do you understand by "Singleton class". Implement it.
  14. Design a Library database.[Don't take design question lightly]
  15. Questions related to job scheduling and threading.
  16. Question related to Mutex. I don't remember exact question but if you have a little knowledge of Mutex you will be able to solve it.

Note: I was supposed to find out the logic first then I was asked to code that logic in language of my choice. So just Knowing logic is not enough one must practice a little to code on paper before going to any such interviews.

These questions has been asked in several rounds of interview which I went through before getting into INTEL :)

Answers to most of the questions are available on internet.

But still anyone wants to know the solution of any of question he/she can contact me directly.