#
Data Structure Archive

In this post, we will see about trie data structure in java. What is Trie : Trie is data structure which stores data in such a way that it can be retrieved faster and improve …

Selection sort is an in place comparison sorting algorithm. It is very simple to implement but it does not go well with large number of inputs. Selection sort algorithm : Find the minimum element in …

Shell sort is in place comparison based sorting algorithm. It is generalization of insertion sort. It was invented by Donald shell. It allows to sort elements which are far apart. In case of insertion sort, comparison happens …

If you want to practice data structure and algorithm programs, you can go through data structure and algorithm interview questions. In this post , we will see how to implement Queue using Linked List in java. …

Quicksort or partition-exchange sort, is a sorting algorithm, which is using divide and conquer algorithm. In quick sort, we first choose a pivot and divide into two sublists,one will contain elements lower than pivot and …

If you want to practice data structure and algorithm programs, you can go through data structure and algorithm interview questions. In this post , we will see how to implement Queue using Array in java. Queue is …

Counting sort is special sorting technique used to sort elements between specific range. Lets say elements belong to range 1 to K , then Counting sort can be used to sort elements in O(N) times. …

In this post, we will see how to implement heap sort in java. I will divide heap sort in multiple parts to make it more understandable. What is heap? Understanding complete binary tree Binary heaps …

In this post , we will see how to convert sorted LinkedList to balanced binary search tree. There are two ways to do it. Solution 1: It is very much similar to convert sorted array …

In this post , we will see how to convert sorted array to balanced binary search tree. Algorithm: You might know that inorder traversal of binary search tree results in sorted array. We will use …