1. Make a deep copy of a linked list with an additional random pointer. Remove multiple intervals from an array.
Anonymous
1. Using a hashmap this can be done in O(n) time. 2. By sorting the intervals, this can be done in O(n + klogk) time where n is the size of the array and k is the number of intervals to be removed.
Check out your Company Bowl for anonymous work chats.