Author: Stan Eisenstat
Subject: Re: [Cs223] malloc space in createD
Date: Tuesday, 17 Mar 2020, 16:55:22
> Message Posted By: Unknown > > If we are creating a Deque with two stacks, should we malloc twice? Once > for the H stack, and then another time for the T stack? Since the stack is to be implemented using a headless singly-linked list, an empty stack is represented as a NULL pointer. Thus the only storage to be malloc()ed is that for the head of the Deque itself. --Stan-PREV INDEX NEXT