Data Structure Unit 2
Data Structure Unit 2
CS SEM III
By
Ms. Sneha Shirkar
Doubly Linked list
Every AVL Tree is a binary search tree but every Binary Search
Tree need not be AVL tree.
AVL Tree Rotations
Huffman Coding
+ Using the Huffman Coding technique, we can compress the string to a smaller
size.
+ Huffman coding first creates a tree using the frequencies of the character and
then generates code for each character.
+ Once the data is encoded, it has to be decoded. Decoding is done using the
same tree.
• Min Heap
• Max Heap
Min Heap
+ In this heap, the value of a node
must be less than or equal to the
values of its children nodes.
Max Heap
+ In this heap, the value of a
node must be greater than or
equal to the values of its
children nodes.
+ Every data structure has some operations like insertion,
deletion associated with them.
+ Heaps are no different, and there are many operations that
can be performed on heap data structures.
+ We will be discussing these operations over a max-heap since
the same operations can be applied to a min-heap also.
Insertion in Heap