Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Introduce 1 0 0 0 0 0 ( N ) integers / floats randomly and save them in a vector / array . Find the
Introduce N integersfloats randomly and save them in a vectorarray Find the smallest elements using the following implementations.Record the execution time among different number rages ex: numbers ranges fit into int, long int, long long int. float. double, long double Implement a Priority Queue implemented by the following different approaches.Print the smallest elements using a Heap using arrayvector b Heap using binary tree a heap constructed by tree nodes. do not use linked list to construct a heap, you will get zero You are required to implement the following functions insert and delMax for priority queue, of course, also including swim and sink functions again node based. Additionally, for the heap using binary tree, you are required to implement the followingfunctions: i A computeHeight function for heap binary tree that will return the height of the tree. ii A computeLeaves function for heap binary tree will return the number of leaves of the tree. iii. A lookupint key function for heap binary tree that will return true if key is found in the tree and return false otherwise. iv A sameLevelNode current function that will return all the node pointers at the same level of current node v A descendantNode current, Node aNode function that return true if aNode is current nodes descendant node. Otherwise, return false.Use Word or Excel format to presents the results of algorithms, each is executed times record average time in a graph State your conclusion of the findings along with the graphs If possible write all the code for this project along with the word format
Introduce N integersfloats randomly and save them in a vectorarray Find the smallest elements using the following implementations.Record the execution time among different number rages ex: numbers ranges fit into int, long int, long long int. float. double, long double Implement a Priority Queue implemented by the following different approaches.Print the smallest elements using a Heap using arrayvector b Heap using binary tree a heap constructed by tree nodes. do not use linked list to construct a heap, you will get zero You are required to implement the following functions insert and delMax for priority queue, of course, also including swim and sink functions again node based. Additionally, for the heap using binary tree, you are required to implement the followingfunctions: i A computeHeight function for heap binary tree that will return the height of the tree. ii A computeLeaves function for heap binary tree will return the number of leaves of the tree. iii. A lookupint key function for heap binary tree that will return true if key is found in the tree and return false otherwise. iv A sameLevelNode current function that will return all the node pointers at the same level of current node v A descendantNode current, Node aNode function that return true if aNode is current nodes descendant node. Otherwise, return false.Use Word or Excel format to presents the results of algorithms, each is executed times record average time in a graph State your conclusion of the findings along with the graphs If possible write all the code for this project along with the word format
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started