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!
A telephone directory having n = 10 records and Name field as key. Let us assume that the names are stored in array 'm' i.e. m(0) to m(9) and the search has to be made for name "X", i.e. element = "X".
Telephone Directory
Name id.
AA 25161234
BB 22752345
CC 23405678
DD 22361111
EE 24782202
FF 26254444
GG 26150880
HH 25513653
II 26252794
KK 26257149
The above algorithm will search for element = "GG" and will stop at 6th index of array and the needed id is "26150880", which is stored at position 7 i.e. 6+1.
Write an algorithm to test whether a Binary Tree is a Binary Search Tree. The algorithm to test whether a Binary tree is as Binary Search tree is as follows: bstree(*tree) {
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.
This algorithm inputs 5 values and outputs how many input numbers were positive and how many were negative. Data to be used: N = 1, -5, 2, -8, -7
#questionalgorithm for implementing multiple\e queues in a single dimensional array
any simple algoritham questions with answers
A queue is a particular type of collection or abstract data type in which the entities in the collection are went in order and the principal functions on the collection are the add
Q . Write down the non-recursive algorithm to traverse a tree in preorder. Ans: T he Non- Recursive algorithm for preorder traversal is written below: Initially i
Q. In the given figure find the shortest path from A to Z using Dijkstra's Algorithm. Ans: 1. P=φ; T={A,B,C,D,E,F,G,H,I,J,K,L,M,Z} Let L(A)
Write an algorithm for binary search. Algorithm for Binary Search 1. if (low> high) 2. return (-1) 3. Mid = (low + high)/2 4. if ( X = = a[mid]) 5. return (mid); 6.
Q. Explain the complexity of an algorithm? What are the worst case analysis and best case analysis explain with an example.
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