Bloomberg NG 店面

Started with the self introduction and resume discussion and some questions on OS, Stacks/Queues, Static/Dynamic Memory for about 15-20 minutes.
Then we moved on to coding question where given was a root and the level(L), return the head of the new linked list created consisting of elements of that level(L).
I gave him the iterative approch and then he followed up for the space optimzation and reccursive solutions.

Consider a vector of employees with a name and their title:
[<John, Manager>, <Sally, CTO>, <Sam, CEO>, <Drax, Engineer>, <Bob, CFO>, <Daniel, Engineer>]

And a dictionary where the keys report to the values:
{[CTO, CEO], [Manager, CTO], [Engineer, Manager], [CFO, CEO]}

Re-order the vector of employees according to the dictionary mappings. The vector of employees can be extremely big, however the dictionary only contains the title orderings.

Sample output:
[<Drax, Engineer>, <Daniel, Engineer>, <John, Manager>, <Sally, CTO>, <Bob, CFO>, <Sam, CEO>]

Note that in this case, CTO and CFO both report to CEO so they are both before CEO and above the next biggest thing, which is manager. They can also be in either order in this case.

You work in an electronic exchange. Throughout the day, you receive ticks (trading data) which consists of product name and its traded volume of stocks. Eg: {name: vodafone, volume: 20}. What data structure will you maintain if:
*You have to tell top k products traded by volume at end of day.
*You have to tell top k products traded by volume throughout the day.