Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Demonstrate how to use a data structure of type List and one of type Binary Tree - your choice of array or linked list implementation.

Demonstrate how to use a data structure of type List and one of type Binary Tree - your choice of array or linked list implementation. For each Data Type demonstrate using the methods of the ADT class in textbook. Solve 2 out of the following 5: one question from # 4-# 6 and one of # 7 - #8 (your choice): 1. Create a List Ll capable of holding 20 integers and append in order 12, 9,7 then move the fence using next() and insert 2. In the end display the content of the resulting list. 3. Create a stack Si capable of holding 10 elements and which actually stores the following, the top of the stack being the leftmost element: (8, 12, 3, 7,5). Then remove 2 elements and display the Stack. 4. Create a queue Q capable of holding 12 elements. Put the following integers in the queue: 2,4,6,7,5,3. Now take away two numbers and display that Queue. 5. Construct a BST capable of hgolding 32 integers and using succesive insertions from the following list in the given order: { 33, 22, 36, 18, 42, 32, 28, 12, 35, 27, 29,98 }. Insert the value 15 to the above Binary Search Tree. Remove the value 32 from the BST. Write the code for a preorder traversal and display the result. 6. Construct a max-heap that will result from running build Heap on the following values stored in an array: 12 5 9 14 3 11 10 16 8 17. Show the max-heap that results from deleting the maximum value from the max-heap. Write the code for a preorder traversal and display the heap

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

App Inventor

Authors: David Wolber, Hal Abelson

1st Edition

1449397484, 9781449397487

More Books

Students also viewed these Programming questions

Question

Define the term utility software and give two examples.

Answered: 1 week ago