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 AN ALGORITHM TO READ TWO NUMBERS AND PRINT THE LOWER VALUE
Run time complexity of an algorithm is depend on
Let us assume a sparse matrix from storage view point. Assume that the entire sparse matrix is stored. Then, a significant amount of memory that stores the matrix consists of zeroe
I=PR/12 numbers of years : Interest Rate up to 1 years : 5.50 Up to 5 years : 6.50 More than 5 year : 6.75 please design an algorithm based on the above information
Define Complete Binary Tree Complete Binary Tree:- A whole binary tree of depth d is that strictly binary tree all of whose leaves are at level D.
Double Linked List In a doubly linked list, also known as 2 way lists, each node is separated into 3 parts. The first part is called last pointer field. It has the address of t
Records are mapped onto a computer store by simply juxtaposing their elements. The address of a component (field) r relative to the origin address of the record r is named the fiel
infix to revrse polish
Linear search employee an exhaustive method of verified each element in the array against a key value. Whereas a match is found, the search halts. Will sorting the array before uti
In order to get the contents of a Binary search tree in ascending order, one has to traverse it in In-order
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