Bloomberg Interview Question

1.) LRU Cache -> using generics in Java 2.) 1D candy crush. 3.) Pattern Printing [ the row contains only those many stars as the row number][the stars get depleted] 4.) Many elements: find the K most frequently occurring elements.

Interview Answer

Anonymous

Oct 1, 2020

I solved all the question including the edge cases. Started from the brute force approach : to the most optimal approach. i needed some help for understanding one edge case but solved all the other edge cases by myself.