Java Reference
In-Depth Information
top = 10
'a'
'b'
'c'
3
'h'
'e'
'l'
'l'
'o'
5
0
1
2
3
4
5
6
7
8
9
10
Figure4.34 An array-based stack storing variable-length strings. Each position
stores either one character or the length of the string immediately to the left of it
in the stack.
4.8 Implement the dictionary ADT of Figure 4.29 using an unsorted linked list as
defined by class LList in Figure 4.8. Make the implementation as efficient
as you can, given the restriction that your implementation must use the un-
sorted linked list and its access operations to implement the dictionary. State
the asymptotic time requirements for each function member of the dictionary
ADT under your implementation.
4.9 Implement the dictionary ADT of Figure 4.29 based on stacks. Your imple-
mentation should declare and use two stacks.
4.10 Implement the dictionary ADT of Figure 4.29 based on queues. Your imple-
mentation should declare and use two queues.
 
Search WWH ::




Custom Search