implement stack using doubly linked list leetcode