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. Write an algorithm that counts number of nodes in a linked list. A n s . Algo rithm to Count No. of Nodes in Linked List C
Consider the file " search_2013 ". This is a text file containingsearch key values; each entry is a particular ID (in the schema given above). You are tosimulate searching over a h
Graph terminologies : Adjacent vertices: Two vertices a & b are said to be adjacent if there is an edge connecting a & b. For instance, in given Figure, vertices 5 & 4 are adj
D elete a specific Node from Double Linked List as follows DELETEDBL(INFO, FORW, BACK, START, AVAIL,LOC) 1. [Delete Node] Set FORW [ BACK [LOC]]:= FORW[LOC]& BACK [FORW[
Krushkal's algorithm uses the concept of forest of trees. At first the forest contains n single node trees (and no edges). At each of the step, we add on one (the cheapest one) edg
Example 1: Following are Simple sequence of statements Statement 1; Statement 2; ... ... Statement k; The entire time can be found out through adding the times for
A*(B+D)/E-F*(G+H/K)
Q. Prove the hypothesis that "A tree having 'm' nodes has exactly (m-1) branches". Ans: A tree having m number of nodes has exactly (m-1) branches Proof: A root
what is far and near procedures in system programming?
Speed cameras read the time a vehicle passes a point (A) on road and then reads time it passes a second point (B) on the same road (points A and B are 100 metres apart). Speed of t
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