Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Repository files navigation

Advance Data Structure using JAVA

Problem Description

This project implements min binomial heap and min leftist tree and measure and compare the relative performance of these two implementations under the assumption that the only permissible operations are insert and delete-min.

Programming Language

Java

Files Associated

Heap.java : The file contains the main function and initiates the execution


DatatoHeap.java: The class converts the raw data from a given file and store the insert and delete operations in a Character array and data to be inserted in an integer array.


LeftHeapNode.java : The class implements a Leftist Tree node. It stores the data as well as link to its two children. Along with them, it also stores the the shortest external path length.


LQueue.java : The class implements a Queue to store and display the leftist tree nodes in breadth first manner. Enqueue and Dequeue are the methods which have been implemented. This Queue is implemented using LinkedList


LeftistHeap.java : This class implements the Min Leftist Tree. It uses the Node objects to create a linked tree structure. The methods which have been implemented are insert, deleteMin, merge and LevelOrder. The data structure uses the Queue object to print the tree.


BinomialHeapNode.java : The class implements a Binomial Node. The attributes are the data element, link to the next Binomial node in the circular linked list and the link to one of the child node of this binomial node. It also contains a degree field which denotes the number of children of this binomial node.


BinomialHeap.java : This class implements a Min Binomial Heap. It provides a linked heap structure using Binomial Node object to store the elements. Insert and DeleteMin are the two important functions which have been implemented.


ListNode.java: This class describes the LinkedList node structure. It stores data and provides link to its immediate next.


Observations

Overall, the Min Leftist Tree data structure handles the inserts and delete minimums efficiently for the data sets we used. Though Min Binomial Heap would perform well in case of only insertions (O(1)), in a random sequence of operations consisting of insertions/delete mins, slowly the time consumed would rise as the data structure grows. In comparison, Min Leftist Tree shows a slower and robust growth in time consumption per operation with the increment in data in the data structure.

About

Binomial Heap and Minleftist tree implementation

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages