First version

Initial implementation. Yet to be unit tested
Updated algorithm for deque method and fixed randomIndex method for getting the right index range