Implemented second task (RandomizedQueue and Deque).
Minor fixes