Author: Stan Eisenstat
Subject: Re: [Cs223] how to create the deque
Date: Tuesday, 17 Mar 2020, 08:18:40
> Message Posted By: Unknown > > I understand that the deque struct consists of two pointers, one pointing > to H, and the other to T, each of which are structs that are headless > singly-linked lists. Are we supposed to create a singly-linked list struct > first, then in declaring the deque struct, we just use pointers to the > above structs? i.e., > > struct linkedlist { > ... //create the linked list > } > > struct deque { > linkedlist *H; > linkedlist* T; > } This works if linkedlist is typedef'd to be a struct linkedlist rather than a pointer to one. --Stan-PREV INDEX NEXT