Open In App

Microsoft Interview Experience | Set 53

Improve
Improve
Like Article
Like
Save
Share
Report

Round 0 –
Second max element in BST

Sort an array of integers such that –
– All odd numbers are in left side and sorted in increasing order.
– all even numbers are sorted in decreasing order and start where odd numbers end.
Eg –
I/P – 2, 3, 4, 5, 8 , 10, 12, 11
O/P – 3, 5, 11, 12, 10, 8, 4, 2

I used quick sort partition logic to separate odd and even numbers and then ran quick sort on both halves.

Round 1 –
Assume an RAM of size 1024 bytes. There are multiple processes running on the system. Your application will get this information –
(Thread Id, Memory Block, time, R/W) – which essentially tells that the thread T was using memory block M at time t and operation could be read or write.

Memory conflict is defined as –
– Let x be standard unit of time measurement.
– Multiple read operations at the same location are not cause of conflict.
– One write operation between x+5 to x-5 to location M, will be cause of conflict for a thread accessing location M at time x.
– Example – If thread T1 accessed memory location M at time x+1 and if a thread T2 accesses location M before time x+6 then T1 and T2 are candidate of conflict given one of then do write operation.

You are given with the list of threads accessing memory locations, you have to find conflicts.

Example –
(1, 512, 1, R)
(2, 432, 2, W)
(3, 512, 3, R)
(4, 932, 4, R)
(5, 512, 5, W)
(6, 932, 6, R)
(7, 835, 7, R)
(8, 432, 8, R)

O/P –
Thread 1 & 3 conflicts with thread 5
All other operations are safe.

Round 2 –
https://www.geeksforgeeks.org/turn-an-image-by-90-degree/

Level order traversal ->
Using queue
Using recursion

Round 3 –
http://stackoverflow.com/questions/746082/how-to-find-list-of-possible-words-from-a-letter-matrix-boggle-solver
> My solution was mutation of this – https://www.geeksforgeeks.org/mobile-numeric-keypad-problem/

Round 4 –
3D boggle solver and 3D cross word solver.
Design data structure to store and give a solution.


Last Updated : 17 Jun, 2015
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads