1. (a) Provide a partial linked list implementation in Java of a Stack, showing the data structures involved and the cla

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

1. (a) Provide a partial linked list implementation in Java of a Stack, showing the data structures involved and the cla

Post by answerhappygod »

1 A Provide A Partial Linked List Implementation In Java Of A Stack Showing The Data Structures Involved And The Cla 1
1 A Provide A Partial Linked List Implementation In Java Of A Stack Showing The Data Structures Involved And The Cla 1 (131.19 KiB) Viewed 66 times
1. (a) Provide a partial linked list implementation in Java of a Stack, showing the data structures involved and the class interface. You can leave out the definitions of the Stack methods. (8 marks) (b) With the aid of pointer diagrams, show how the pop() operation works on a Stack which has a linked list implementation. Treat the cases of a stack with one value and a stack with more than one value. Is there any difference? (7 marks) (c) Give the Java implementation of the method pop(). What is the complexity of pop() in big-Oh notation? (6 marks) (d) Using an example with diagrams, describe the alternative array implementation of a Stack. (6 marks) (e) Briefly describe two other abstract data types Queue and PQueue (priority queue), and outline the difference in the behaviour and complexity of their respective insert/remove operations. (6 marks)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply