524 questions and answers
What is an Abstract Data Type? What do you mean by a Dynamic Data Structure?
An abstract data type (ADT) is an object with a generic description independent of implementation details. This description includes a specification of the components from which the object is made and also the behavioral details
Write a C language function to delete the nth node of a singly-linked list. The error conditions are to be handled properly.
function to delete n-th node from singly linked list
Write a C language function to find the in-order successor of the root of a binary tree.
find the in-order successor of of the root of a binary tree
Write an algorithm to test whether a given binary tree is a binary search tree.
algorithm to test whether a given binary tree is a binary search tree
Explain the mergesort algorithm.
Why does it run faster than bubble sort in most of the cases ? Show how the mergesort algorithm will sort the following array in increasing order :
100, 90, 80, 70, 60, 50, 40, 30, 20.
Analyses the time complexity of the mergesort algorithm.
merge sort run faster than bubble sort in most of the cases
What are the problems of binary tree?
Explain the improvement of performance by the use of height-balanced tree.
Explain how a height-balanced tree can be formed by inserting the following elements in the given order :
1, 2, 3, 4, 5, 6, 8, 9, 10, 7, 11
Show the root element the can be deleted from the above tree.
Height-balanced tree tree is a self-balancing binary tree also name is AVL Tree. For the tree to be considered balanced balance factor must be -1,0 or 1. Balance factor is height of the left subtree minus height of the right subtree of the specific node.
a) Write an algorithm for deletion of a node from a doubly-linked list.
b) What is a threaded binary tree ? Write an algorithm for non-recursive in-order traversal of a threaded binary tree.
Let the node to be deleted is del. 1) If node to be deleted is head node, then change the head pointer to next current head. 2) Set next of previous to del, if previous to del exixts. 3) Set prev of next to del, if next to del exixts.
Copyright © 2025 MindStudy
A product by Shunya Intelliware Solution
(Registered under MSME Uddyam)