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];
Q. Explain the various memory allocation strategies. Ans. M e m ory Allocation Strategies are given as follow
Q. Consider the specification written below of a graph G V(G ) = {1,2,3,4} E(G ) = {(1,2), (1,3), (3,3), (3,4), (4,1)} (i) Draw the undirected graph. (
Row Major Representation In memory the primary method of representing two-dimensional array is the row major representation. Under this representation, the primary row of the a
compare and contrast the bubble sort,quick sort,merge sort and radix sort
Q. What do you mean by the best case complexity of quick sort and outline why it is so. How would its worst case behaviour arise?
what is circular doubly link list?write down the algorithm for insertion of elements in circular doubly link list
What is binary search? Binary search is most useful when list is sorted. In binary search, element present in middle of the list is determined. If key (the number to search)
Program segment for the deletion of any element from the queue delmq(i) /* Delete any element from queue i */ { int i,x; if ( front[i] == rear[i]) printf("Queue is
P os t - o r d e r T r av er sal : This can be done by both iteratively and recursively. The iterative solution would require a modification or alteration of the in-
Optimal solution to the problem given below. Obtain the initial solution by VAM Ware houses Stores Availibility I II III IV A 5 1 3 3 34 B 3 3 5 4 15 C 6 4 4 3 12 D 4 –1 4 2 19 Re
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