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 the algorithm to insert an element to a max-heap which is represented sequentially.
Ans:
The algorithm to insert an element "newkey" to a max heap of size i-1 where i>=1:
s=i;
parent=s div 2;
key[s]=newkey;
while(s<>0 && key[parent]<=key[s])
{
/*interchange parent and child*/
temp=key[parent]; key[parent]=key[s]; key[s]=temp;
s=parent;
}
Q. Suggest a method of implementing two stacks in one array such that as long as space is there in an array, you should be capable to add an element in either stack. Using proposed
#why all the 4 operations i.e. insertion n deletion from rear end and front end is valid in input restricted DEQUE
Draw a B-tree of order 3 for the following sequence of keys: 2,4,9,8,7,6,3,1,5,10.and delete 8 and 10
Differentiate between Nonpersistent and 1-persistent Nonpersistent: If the medium is idle, transmit; if the medium is busy, wait an amount of time drawn from a probability dist
sample infosys campusconnect questions
what are the disadvantages of sparse matrix?
Algorithm for determining strongly connected components of a Graph: Strongly Connected Components (G) where d[u] = discovery time of the vertex u throughout DFS , f[u] = f
Open addressing The easiest way to resolve a collision is to start with the hash address and do a sequential search by the table for an empty location.
Q. A linear array A is given with lower bound as 1. If address of A[25] is 375 and A[30] is 390, then find address of A[16].
2. Write a note on i) devising ii) validating and iii) testing of algorithms.
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