double linked list, meet time requirement