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;
}
Define Binary Tree A binary tree T is explained as a finite set of nodes that is either empty or having of root and two disjoint binary trees TL, and TR known as, respectively
The data structure needed to evaluate a postfix expression is Stack
Definition of Algorithm Algorithm must have the following five characteristic features: 1. Input 2. Output 3. Definiteness 4. Effectiveness 5
What is the time complexity of Merge sort and Heap sort algorithms? Time complexity of merge sort is O(N log2 N) Time complexity of heap sort is O(nlog2n)
how to write an algorithm for unions & intersection of two linklists?
Explain about the Abstract data type Abstract data type (ADT) A set of values (the carrier set) and operations on those values
Write a function that performs the integer mod function. Given the previous functions you have implemented already, this one should be a piece of cake. This function will find the
A linear list of elements in which deletion can be done from one end (front) and insertion can take place only at the other end (rear) is called as a Queue.
Q. Which sorting algorithm can be easily adaptable for singly linked lists? Explain your answer as well. Ans: The simple Insertion sort is sim
Design and implement an algorithm to simulate car re-organizing of the train at the railway switching junction. You can only use stacks as the data structure to represent the 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