Question

Given the following unsorted array based list, (a) draw the chart of the list after inserting 23, (b) draw the chart of the list after (a) and then deleting 33. 47 18 Length = 5
0 0
Add a comment Improve this question Transcribed image text
Answer #1
intial (a) insert 23 (b)
47 47 47
33 33 11
11 11 18
18 18 77
77 77 23
23
length 5 6 5
add 23 at the end of list and increment length counter first find 33 in the array here it is at 2nd position so shift up by 1 position elements from 3rd to length and decrement length counter
Add a comment
Know the answer?
Add Answer to:
Given the following unsorted array based list, (a) draw the chart of the list after inserting...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Hi, I am having trouble with the following question: Given an unsorted array with integers, find...

    Hi, I am having trouble with the following question: Given an unsorted array with integers, find the median of it using the Quick Select method we’ve discussed in the class (Hint: We use the quick select to find the kth smallest element in an unsorted array in O(n) time complexity). Note: A median is the middle number of the array after it is sorted. And in this problem, we return the N/2-th number after sorted if there are even numbers...

  • Consider the function FINDDUPLICATES(A[0. 1) that returns a list of all duplicate items in the unsorted integer array A...

    Consider the function FINDDUPLICATES(A[0. 1) that returns a list of all duplicate items in the unsorted integer array A of size n. For example, given the array |3, 2, 4, 3], the function should return the value 3. For the array 11 2,3 5,5,5,66,81, the function should return an array (or list) 5,6 In this task, you will develop two alternative solutions for the FINDDUPLICATES(Ao..n 1 func- tion. In your implementations, you may call any of the algorithms introduced in...

  • Draw an AVL tree (initially empty) at each step when inserting the following numbers in order:...

    Draw an AVL tree (initially empty) at each step when inserting the following numbers in order: 1; 2; 5; 4; 6; 3; 10; 9; 7; 8 Now, draw the above AVL tree at each step when deleting the following numbers in order (assuming that the substitution on deleting a node is done by replacing it with the minimum in the right subtree): 4; 5; 6

  • c++ please Given the following skeleton of an unsorted list class that uses an unsorted linked...

    c++ please Given the following skeleton of an unsorted list class that uses an unsorted linked list: template<class ItemType> struct NodeType {                 ItemType item;                 NodeType* next; }; template<class ItemType> class UList { public:                 UList(); // default constrctor                 UList(const UList &x); // we implement copy constructor with deep copy                 UList& operator = (UList &x); // equal sign operator with deep copy                 bool IsThere(ItemType item) const; // return true of false to indicate if item is...

  • Data Structures and Algorithms (Java Programming) Given the following list of inputs: 47, 83, 56, 30,...

    Data Structures and Algorithms (Java Programming) Given the following list of inputs: 47, 83, 56, 30, 12, 67, 35, 25, 80, 61 a) Trace the development of the heap in abstract form that would evolve by inserting the inputs in the order that they are presented. b) Draw the final version of the array representation of this heap, i.e. you need not show the array develop. c) What property of a heap led to the array being smaller than that...

  • Please do this in C++ Please do this in C++ Array List Operations For an array...

    Please do this in C++ Please do this in C++ Array List Operations For an array based list, (A) If the Length operation associated with an unsorted list returns 15, and we then call the Delete operation for the list, pass it a value that matches the 7th item in the list: 1). What is the index of the component that is deleted? 2). What is the index of the component that takes its place? 3). What does the Length...

  • [12] 3. a) Draw the binary min-heap after inserting the following values, one after another. 21,...

    [12] 3. a) Draw the binary min-heap after inserting the following values, one after another. 21, 13, 12, 25, 4, 20, 16, 1, 11 You must show each step of building the heap and eventually the final tree. Please, put your final tree inside a box so that it can be easily understood among other intermediate trees. b) A 4-ary max heap is like a binary max heap, but instead of 2 children, nodes have 4 children. A 4-ary heap...

  • Draw the diagrams on the file to be uploaded at the end of the exam. Please...

    Draw the diagrams on the file to be uploaded at the end of the exam. Please be neat, if it cannot be read, it cannot be graded. Label the diagrams Q2 part A and Q2 part B Q2 part A: Show the work and the resulting B+Tree after deleting data entry 17 Q2 part B: Using the tree derived from part (A) above, show the work and the resulting B+Tree after inserting data entry 7" B+ tree | 14 |...

  • .Use the selection sort to put the following list in order. (5 credits) (I’ve put the...

    .Use the selection sort to put the following list in order. (5 credits) (I’ve put the list in an array (boxes so you can see the distinct elements clearly. You can just type the numbers across the page in answering. Remember to show the sort marker as is done in your book.) Show the list after each exchange that has an effect on the list ordering. Unsorted list: 26 17 32 47 56 9 12 72 3 25 26 17...

  • • P1 (10 pts) Show the result of inserting 2, 9, 5, 8, 6, 4, 3,...

    • P1 (10 pts) Show the result of inserting 2, 9, 5, 8, 6, 4, 3, 1 into an initially empty AVL tree (draw a resulting tree after inserting each number; you need to draw 8 AVL trees). • P2 (5 pts) What is the minimum number of nodes in an AVL tree of height 8? • P3 (5 pts) Show the result of deleting the element with key 9' from the following splay tree. • P4 (5 pts) Show...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT