Cap770 For Viva

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

how largest element in max heap: , 

the root node contains the largest element


and all the nodes in the heap contain elements that are greater than or equal to their child nodes.

branch in tree data structure:  branch node as an inner node, is any node of a
tree that has child nodes. Similarly, an external node (also known as an outer node, leaf
node

non linear data structure: It is a form of data structure where the data elements
don't stay arranged linearly or sequentially.

traversing in bst data structure: Tree traversal is the process of visiting each
node in the tree exactly once.

sequential representation of binary tree: The sequential representation uses


an array to store information corresponding to each node of a tree.

path in given tree data structure: Path refers to the sequence of nodes along
the edges of a tree

level of tree in data structure: level is 0 when we start to count level each step
from top to bottom level of a tree with 0 and increments by 1 at each level.

max tree data structure: he max-tree is a mathematical morphology data


structure that represents an image through the hierarchical relationship of connected
components resulting from different thresholds.

find left child formula: if a node is stored an index k, then its left child is stored
at index 2k + 1 and its right child at index 2k + 2.

deletion in binary search tree: used to delete the specified node from a binary
search tree.

how to search element in binary tree


1. Compare the element with the root of the tree.
2. If the item is matched then return the location of the node
array representation of binary tree: In array representation of a binary tree,
we use one-dimensional array (1-D Array) to represent a binary tree. 

height of binary tree the maximum height will be N/2 Formula of count height
log2(N)+1.

what is post order traversal in data structure: postorder traversal is first


left and right subtrees are printed and then root data is printed

siblings in binary tree data structure: Two nodes are said to be


siblings if they are present at the same level, and their parents are same.
how be difine structure in simply linked list: A singly linked list is a
type of linked list that is unidirectional, that is, it can be traversed in only one direction from
head to the last node 

What is complete binary tree: Complete Binary Tree if all the levels are
completely filled except possibly the last level and the last level has all keys as left

main components of bst in data structure: The data stored at each


node has a distinguished key which is unique in the tree and belongs to a total order.

What is Search trees: earch tree is a binary tree data structure in whose nodes data
values are stored from some ordered set.

 What is binary search tree The BST is devised on the architecture of a


basic binary search algorithm.

What is searching: the process of finding the required information from a collection of
items stored as elements in the computer memory

insertion and deletion operation in data structure: Insertion −


Adds an element at the given index and we have insert one or more data
elements into an array
 Deletion − Deletes an element at the given index and removing an existing
element from the array and re-organizing all elements of an array 

What is AVL tree AVL tree is a self-balancing Binary Search Tree (BST) where the
difference between heights of left and right subtrees cannot be more than one for all nodes. 

balancing operations: Insert − Inserts an element in a tree/create a tree. Search −


Searches an element in a tree. Preorder Traversal − Traverses a tree in a pre-order manner.
Inorder Traversal − Traverses a tree in an in-order manner.

, b-trees: properties and operations: Properties of B-Tree:


 All leaves are at the same level.
 A B-Tree is defined by the term minimum degree 't'. ...
 Every node except root must contain at least t-1 keys. ...
 All nodes (including root) may contain at most 2*t – 1 keys.
  operations on B-tree search, insertion and deletion operation 

A red-black tree is a Binary tree where a particular node has color as an extra
attribute, either red or black
What is splay trees Splay Tree is a self - adjusted Binary Search Tree in
which every operation on element rearranges the tree so that the element
is placed at the root position of the tree.

What is heap: : A heap is a specialized tree-based data structure that satisfied
the heap property:

Min-Heap − Where the value of the root node is less than or equal to either of
its children. Max-Heap − Where the value of the root node is greater than or equal
to either of its children

What are heap operations?


Heapify → Process to rearrange the heap in order to maintain heap-property. Find-
max (or Find-min) → find a maximum item of a max-heap, or a minimum item of a
min-heap, respectively. Insertion → Add a new item in the heap. Deletion → Delete
an item from the heap.
applications of heap
 Dijkstra's algorithm for finding the shortest path, the heap sort sorting
algorithm, implementing priority queues, and more. 

What are the ways to implement priority queue? The priority


queue can be implemented in four ways that include arrays, linked list, heap data structure
and binary search tree.

Heap sort is a comparison-based sorting technique based on Binary Heap data
structure

Time complexity is the amount of time taken by an algorithm to run, as a function


of the length of the input.

binomial heaps and Fibonacci heaps Fibonacci Heap, trees can


have any shape even all trees can be single nodes 
binomial heap is a data structure that acts as a priority queue but also allows
pairs of heaps to be merged

You might also like