Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Q. Write down an algorithm for finding a key from a sorted list using the binary search technique or method.
Ans.
Binary Search Algorithm is written below
1. if (low > high)
2. return (-1)
3. mid = (low +high)/2;
4 .if ( X = = a [mid])
5 return (mid);
6 if ( X < a [mid])
7 search for X in a (low) to [mid -1];
8 else
9 search for X in a [mid + 1] to a [high];
write a pseudocode to input the top speed (in km''s/hours) of 5000 cars output the fastest speed and the slowest speed output the average (mean) speed of all the 5000 cars answers
a. In worst case the order of linear search is O (n/2) b. Linear search is more competent than Binary search. c. For Binary search, the array must be sorted in ascending orde
pseudo code for fibonnaci series
An AVL tree is a binary search tree that has the given properties: The sub-tree of each of the node differs in height through at most one. Each sub tree will be an AVL tre
Q. Write an algorithm INSERT which takes a pointer to a sorted list and a pointer to a node and inserts the node into its correct position or place in the list. Ans: /* s
Question 1 Explain how the shuttle sort algorithm works by making use of the following list of integers:11, 4, 2, 8, 5, 33, 7, 3, 1, 6. Show all the steps. Question 2
Q. Illustrate the result of running BFS and DFS on the directed graph given below using vertex 3 as source. Show the status of the data structure used at each and every stage.
Write the algorithm for Binary search. Also apply this algorithm on the following data. 22, 44, 11, 88, 33, 55, 77, 66
representation of linear array
Q. Using array to execute the queue structure, write down an algorithm/program to (i) Insert an element in the queue. (ii) Delete an element from the queue.
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd