Data Structures

What Is Data Structure?

Data Structure is a way of collecting and organizing data in such a way that we can perform operations on these data in an effective way. Data Structures is about rendering data elements in terms of some relationship, for better organization and storage. For example, we have data player’s name “Virat” and age 26. Here “Virat” is …

What Is Time Complexity of Algorithms?

What Is Time Complexity of Algorithms? Time complexity of an algorithm signifies the total time required by the program to run to completion. The time complexity of algorithms is most commonly expressed using the big O notation. Time Complexity is most commonly estimated by counting the number of elementary functions performed by the algorithm. And …

What Is Sorting Techniques In Computer Science?

Sorting Techniques Sorting is nothing but storage of data in sorted order, it can be in ascending or descending order. The term Sorting comes into the picture with the term Searching. There are so many things in our real life that we need to search, like a particular record in the database, roll numbers in the …

What is Insertion Sorting Algorithms?

which sorts the array by shifting elements one by one. Following are some of the important characteristics of Insertion Sort. It has one of the simplest implementation It is efficient for smaller data sets but very inefficient for larger lists. Insertion Sort is adaptive, that means it reduces its total number of steps if …

What is Selection Sorting Algorithms?

What is Selection Sorting Algorithms? Selection Sorting Algorithms Selection sorting is conceptually the most simplest sorting algorithm. This algorithm first finds the smallest element in the array and exchanges it with the element in the first position, then find the second smallest element and exchange it with the element in the second position, and continues in …

Quick Sort Algorithm

What is Quick Sort Algorithm? Quick Sort, as the name suggests, sorts any list very quickly. Quick sort is not stable search, but it is very fast and requires very less additional space. It is based on the rule of Divide and Conquer(also called partition-exchange sort). Quick Sort algorithm divides the list into three main …

Merge Sort Algorithm

Merge Sort follows the rule of Divide and Conquer. But it doesn’t divides the list into two halves. In merge sort the unsorted list is divided into N sublists, each having one element, because a list of one element is considered sorted. Then, it repeatedly merge these sublists, to produce new sorted sublists, and at …

Heap Sort Algorithm

Heap Sort is one of the best sorting methods being in-place and with no quadratic worst-case scenarios. Heap sort algorithm is divided into two basic parts : Creating a Heap of the unsorted list. Then a sorted array is created by repeatedly removing the largest/smallest element from the heap, and inserting it into the array. …

Searching Algorithms on Array

Before studying searching algorithms on array we should know what is an algorithm? An algorithm is a step-by-step procedure or method for solving a problem by a computer in a given number of steps. The steps of an algorithm may include repetition depending upon the problem for which the algorithm is being developed. The algorithm …

What is Stack Data Structures?

The stack is an abstract data type with a bounded(predefined) capacity. It is a simple data structure that allows adding and removing elements in a particular order. Every time an element is added, it goes on the top of the stack, the only element that can be removed is the element that was at …

What is Queue Data Structures?

What is Queue Data Structures? Queue Data Structures Queue is also an abstract data type or a linear data structure, in which the first element is inserted from one end called REAR(also called tail), and the deletion of existing element takes place from the other end called as FRONT(also called head). This makes queue as …

Queue Data Structure using Stack

A Queue is defined by its property of FIFO, which means First in First Out, i.e the element which is added first is taken out first. Hence we can implement a Queue using Stack for storage instead of array. For performing enqueue we require only one stack as we can directly push data into stack, …

What is Linked Lists? | Data Structure Tutorial

Linked List is a linear data structure and it is a very common data structure Linked List consists of a group of nodes in a sequence which is divided into two parts. Each node consists of its own data and the address of the next node and forms a chain. Linked Lists are used to …

What is Linear Linked List?

Linear Linked List The element can be inserted in linked list in 2 ways: Insertion at beginning of the list. Insertion at the end of the list. We will also be adding some more useful methods like: Checking whether Linked List is empty or not. Searching any element in the Linked List Deleting a particular …

What is Circular Linked List?

What is Circular Linked List? Circular Linked List In the circular linked list we can insert elements anywhere in the list whereas in the array we cannot insert the element anywhere in the list because it is in the contiguous memory. In the circular linked list the previous element stores the address of the next element …

Scroll to Top