deque implementation(passed all test case)
add all test case to deque