Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

An large automotive store maintains a list of 50000 parts that are either availa

ID: 3806354 • Letter: A

Question

An large automotive store maintains a list of 50000 parts that are either available in the store or ready to be ordered. The list is ordered by item number. Every so often a supplier discontinues some parts or adds some new ones. Once a week the list is updated and typically a few dozen items are added or removed. After the update the list needs to be re-sorted. Which sorting algorithms should be used if performance (speed) is the primary concern? insertion sort O selection sort heap sort merge sort quick sort

Explanation / Answer

Ans 1)Quick sort algorithm should be used if performance(speed) is the primary concern because the average time complexity of quick sort is O(n log n) and even O(n^2) in worst case.

Ans 2) Priority queues are FIFO(First In First Out) data structure is false statement about priority queue because it doesnot care about FIFO,it just handles the priority and works according to the priority.

Ans 3)Complete tree and binary tree apply for the above tree because complete tree is completely filled except the bottom level and binary tree is a tree consists of a node called as root with two binary trees i.e left subtree and right subtree.

Ans 4)The leaves of the given tree are 1,3 and 8.

Thanks :)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote