Hashing

Hashing is a process in which a large amount of data is mapped to a small table with the help of hashing function. It is a searching technique. Hash table We can understand the hash table better based on the following points: In a data structure, the hash table is used to store key-value pairs. … Read more Hashing

Binary Search

When there is a large data structure, the linear search takes a lot of time to search the element. The binary search was developed to overcome the lack of a linear search. It is based on the divide & conquers principle. It is a very fast searching algorithm. The time complexity of the binary search … Read more Binary Search

Linear Searching

Searching In the data structure, searching is the process in which an element is searched in a list that satisfies one or more than one condition. Types of searching There are two types of searching in the data structure. Linear searching Binary searching Linear searching In this searching technique, the searching element is compared one … Read more Linear Searching

Shell Sort

Shell Sort Shell sort is a sorting algorithm. It is an extended version of the insertion sort. In this sorting, we compare the elements that are distant apart rather than the adjacent. We start by comparing elements that are at a certain distance apart. So, if there are N elements then we start with a … Read more Shell Sort

Counting Sort

Counting Sort Counting sort is a sorting algorithm that is used to sort the elements of the array within a specific range. It counts the same element number of the array, and stores these same elements in the auxiliary array. It was developed by Harold H. Seward in 1954. Complexity table of counting sort Complexity … Read more Counting Sort

Radix Sort

Radix Sort The radix sort is a non-comparative integer sorting algorithm that sorts the elements by grouping the individual digits of the same location. It shares the same significant position and value. Positional notation is required in this sorting. An excellent example of the radix sort is a dictionary because, in the dictionary, all the … Read more Radix Sort

Bucket Sort

Bucket Sort In the sorting algorithm, we create buckets and put elements into them. We can apply some sorting algorithm (insertion sort) to sort the elements in each bucket. Finally, we take the elements out and join them to get the sorted result. The bucket sort assumes that the input is generated by a random … Read more Bucket Sort

Heap Sort

Heap Sort A heap is a tree-based data structure that has specific properties. Heap is always a complete binary tree (CBT). That is, all the nodes of the tree are completely filled. If the value placed in each node is greater than or equal to its two children, then that heap is called max heap. … Read more Heap Sort

Selection sort

Selection sort Data Structure Selection sort is a very simple sorting technique. In this sorting, the smallest element of the array is selected first, and that element is replaced with the first element of the array. After that, the second small element is selected and replaced with the second element of the array. This process … Read more Selection sort