Microsoft Interview Question
Software Engineer in TestsCountry: India
Interview Type: Written Test
MinHeap & MaxHeap: Given an elevator e(position,{up,down}). There are 4 cases:
1. elevator moves up and req <= position --> put req in MaxHeap.
2. elevator moves up and req > position --> put req in MinHeap.
3. elevator moves down and req < position --> put req in MaxHeap.
4. elevator moves down and req <= position --> put req in MinHeap.
how to write this type of question.
- Nishant Pandey September 15, 2011Please reply somebody