# Category Archives: Data Structures

Introduction: Hashing is a technique that maps a large set of data to a small set of data. It uses a hash function for doing… Read More
Given a graph with n nodes and m edges, each edges[i] = [u, v, weight] and d as the maximum distance to reach the neighbor… Read More
In this article we cover how to create a pointer to another pointer in a linked list, it can be singly, doubly, or circularly. What… Read More
Given array A[] of size N and integer X, the task is to find the minimum number of operations to make any two elements equal… Read More
Given a string S consisting of lowercase alphabets, the task is to find the lexicographically smallest string that can be obtained by removing duplicates from… Read More
Given a string B, the task is to find the minimum length prefix of the string which, when removed and added to the end of… Read More
Given an array arr[] of size N, with values either 1, 2, or 3. Traverse the array from left to right and before traversal predict… Read More
Given an array nums[] of size N, Find the maximum value you can achieve at index 0 after performing the operation where in each operation… Read More
Given a string str and an integer K, the task is to find the longest string that can be made by deleting letters from the… Read More
Given a tree with N vertices from 0 to N-1 (0th node is root) and val[] where val[i] denotes the value of the ith vertex.… Read More
Given a matrix A[][] of size N * N, where each matrix element is either -1 or 1. One can move from (X, Y) to… Read More
Given a string s of length N consisting of digits from 0 to 9. Find the lexicographically minimum sequence that can be obtained from given… Read More
What is a Binary Tree? A binary tree is a tree data structure with a maximum of 2 children per node. We commonly refer to… Read More
An AVL tree defined as a self-balancing Binary Search Tree (BST) where the difference between heights of left and right subtrees for any node cannot… Read More
Given two arrays arr1[] and arr2[] of size N each. Given target sum M, Choose either a[i] or b[i] for each i where (0 ≤… Read More