TikTok interview question

Implement a data structure of Deque