Block sort is a sorting algorithm that sorts an array by dividing it into blocks of fixed size, sorting each block individually, and then merging… Read More
Category Archives: Data Structures
Smooth sort is a sorting algorithm that was introduced by Edsger Dijkstra. It is another version of heapsort that is designed to minimize the number… Read More
Given a linked list of characters and a string S. Return all the anagrams of the string present in the given linked list. In case… Read More
Given a tree with only one node. We want a tree with exactly n-leaf nodes. We have exactly k trees consisting of 1, 2, …,… Read More
Given two strings consisting of lowercase alphabets A and B, both of the same length. Each character of both the strings is either a lowercase… Read More
To get a value from a multidimensional array containing objects in C++, you can use the same syntax as you would for a regular multidimensional… Read More
Given an array of positive numbers arr[] and integer K. You have to choose the maximum number possible from left to right such that each… Read More
Given two strings A and B of lowercase English letters of lengths N and M respectively. Check whether the number of distinct characters in both… Read More
Given a 2D array span[][] of length N which contains spans [L, R] (0 ≤ L ≤ R ≤ 109), the task is to merge… Read More
Samwell laid out N bowls in a straight line and put a few marbles randomly in each bowl, ith bowl has A[i] marbles. A bowl… Read More
What is Set Data Structure? In computer science, a set data structure is defined as a data structure that stores a collection of distinct elements.It… Read More
What is Map Data Structure? Map data structure (also known as a dictionary, associative array, or hash map) is defined as a data structure that… Read More
What is Dijkstra’s Algorithm? Dijkstra’s algorithm is a popular algorithms for solving many single-source shortest path problems having non-negative edge weight in the graphs i.e.,… Read More
Our geek loves to play with strings, Currently, he is trying to reduce the size of a string by recursively removing all the consecutive duplicate… Read More