Bloomberg Interview Question

1.Pointer basics. 2.Bracket matching: /* "(aa)bb" -> true "[ aa [ bbb ]" -> false "aa } bbb { c" -> false "aa [ bb () ]" -> true "[aa { ] cc } ]" -> false */ 3. Design and implement a web browser which supports the functionality that at any given instance you can efficiently tell the top 5 visited websites on basis of number of visits. This question was a variant of LRU cache and it can be optimally implemented using a map and doubly linked list. 4. Run length encoding of string. See below for example: aaaaabbbccd → a5b3c2d1 xyz → x1y1z1 5. Merge overlapping intervals. See below for example: [1,3] [2,5] [8,9] → [1,5] [8,9] [1,3] [2,6] [4,99] → [1,99] 6. Given a binary tree, tell whether this is a valid BST. 7. Implement a generic hashmap in C++. Make sure to use templates, good hash functions and be ready to discuss design to handle collisions. There will be behavioral questions. Make sure to prepare for the question : Why Bloomberg?