Saturday, January 7, 2012

IT Job Interview Questions

Questions

  1. What's the next number in this sequence: 10, 9, 60, 90, 70, 66 … ?
  2. Using only a four-minute hourglass and a seven-minute hourglass, measure exactly nine minutes—without the process taking longer than nine minutes.
  3.     +---+
        | 1 |
    +---+---+---+
    | 2 | 3 | 4 |
    +---+---+---+
    | 5 | 6 | 7 |
    +---+---+---+
        | 8 |
        +---+
    Rearrange the above numbers in the squares such that any adjacent numbers (for example, 1 and 2 or 6 and 7) are not next to each other horizontally, vertically, or diagonally. For example, in the above figure, 1 and 2 are next to each other diagonally, which violates the rule.
  4. Three people work together to figure out their average salary without telling anybody his/her own salary.




Answers

  1. Spell the numbers out: (Ten, Nine, Sixty, Ninety, Seventy, Sixty-six). A correct response will have nine letters: 96.
    • Lesson learned here: If you tried to solve the series by looking for patterns and failed, look at the question from different angles.
  2. Start both hourglasses at 0 minutes. Flip over the four-minute glass when it runs out (at 4:00); ditto for the seven-minute glass (at 7:00). When the four-minute glass runs out the second time (at 8:00), the seven-minute glass will then have one minute of sand in its lower bulb. Flip the seven-minute glass over again and let the minute of sand run back. When the last grain falls, that will be nine minutes.
    • Lesson learned here: 4 + 3 + 1 + 1. The important event is when the glass runs out the sand. So, the decision to make involves when to flip the glass and which glass.
  3.     +---+
        | 7 |
    +---+---+---+
    | 3 | 1 | 4 |
    +---+---+---+
    | 5 | 8 | 6 |
    +---+---+---+
        | 2 |
        +---+
    • Lesson learned here: Place 1 and 8 at the center, which they are the most distant away. Then place 2 and 7 at the opposite sides. Finally, arrange 3-6 to be separate from each other.
  4. Do it this way:
    1. Each person chooses a random number and adds that number to his/her salary
    2. At the first run, pass that number to next person and add them up.
    3. Now, we have the sum of three person's salary plus 3 random numbers.
    4. At the second run, remove his/her random number from the total and pass the new total to the next person.
    5. Now, we have the sum of 3 person's salary. Just divide it by 3.
    Lesson learned here: Adding a random number to the salary helps encrypt his/her salary. Then work together as described in two runs.

References

  1. Answers to Google Interview Questions
  2. What Recruiters Look At During The 6 Seconds They Spend On Your Resume
  3. The 10 Best Interview Questions to Ask
  4. Java Performance Tips
  5. Top 10 Collection Interview Questions Answers in Java
  6. HotSpot VM Performance Tuning Tips
  7. 30 Questions You Should And Shouldn't Ask In A Job Interview
  8. How to Promote Yourself Without Looking Like a Jerk

No comments: