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];
a. Determine the result of inserting the keys 4,19, 17, 11, 3, 12, 8, 20, 22, 23, 13, 18, 14, 16, 1, 2, 24, 25, 26, 5 in order to an empty B-Tree of degree 3. Only draw the configu
write a c++ program to find out the area of a curve y=f(x) between x=a and x=b
merging 4 sorted files containing 50 10 25 and 15 records will take time
Define tractable and intractable problems Problems that can be solved in polynomial time are known as tractable problems, problems that cannot be solved in polynomial time are
Surrounding of sub division method A polygon surrounds a viewport if it completely encloses or covers the viewport. This happens if none of its sides cuts any edge of the viewp
Step 1: Choose a vertex in the graph and make it the source vertex & mark it visited. Step 2: Determine a vertex which is adjacent to the source vertex and begun a new search if
Draw trace table and determine output from the following flowchart using following data: Number = 45, -2, 20.5
Tree is dynamic data structures. Trees can expand & contract as the program executes and are implemented via pointers. A tree deallocates memory whereas an element is deleted.
Typical programming languages such as Pascal, C or Java give primitive data kinds such as integers, boolean, reals values and strings. They give these to be organised into arrays,
Here, m represents the unordered array of elements n represents number of elements in the array and el represents the value to be searched in the list Sep 1: [Initialize]
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