Pergunta de entrevista da empresa IQLECT

- Given a limited resource, comeup with the data structures and Algorithm which can give Top-K result(with high probability) when we have continuous stream inflow. - Implement read write lock in Linux, where read can be in multiple but write should be only one. - Get the Nth number which is divisible by 2 or 3 or 5 where the input is a continuous whole number sequence. - Write an algo where we have to get through minimum number of blocks in a matrix with size n cross n. Each block can be either open or close. An API generates random number to open a block. Everytime there is a open, get the least path from row 1 to row n, where if a block is set only we can move either in north/east/west/south direction.

Resposta da entrevista

Sigiloso

2 de out. de 2016

For read write lock, implement it using semaphore where, for reading having a signal is enough but for writing we need all the signals.

2