Goldman Sachs Interview Question

Find the cycle in a linked list. Linked list working. How hashMap, tree map works. Pseudo code to insert element into Binary search tree (iterative & recursive)