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. Sort the sequence written below of keys using merge sort. 66, 77, 11, 88, 99, 22, 33, 44, 55 Ans:
Demonstrate that Dijkstra's algorithm does not necessarily work if some of the costs are negative by finding a digraph with negative costs (but no negative cost dicircuits) for whi
1. develop an algorithm which reads two decimal numbers x and y and determines and prints out wether x>y or y>x. the input values, x and y, are whole number > or equal to 0, which
Before programming a problem solution those employees a stack, we have to decide how to represent a stack by using the data structures which exist in our programming language. Stac
Define about the Structure - Container - Some containers hold elements in some sort of structure, and some don't. Containers with no structure include bags and sets. Containe
A Sort which relatively passes by a list to exchange the first element with any element less than it and then repeats with a new first element is called as Quick sort.
include int choice, stack[10], top, element; void menu(); void push(); void pop(); void showelements(); void main() { choice=element=1; top=0; menu()
Methods of Collision Resolution 1) Collision Resolution by separate chaining 2) Collision Resolution by open addressing
Question 1 Write a program in 'C' to read N numbers and print them in descending order Question 2 Discuss the properties of ADT Question 3 Write a note on
The Space - Time Trade Off The best algorithm to solve a given problem is one that needs less space in memory and takes less time to complete its implementation. But in practic
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