# Category Archives: Data Structures

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 positive integer array arr[] of size N, the task is to print the longest non-empty subarray whose bitwise AND is maximum in the… 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
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
Given the root of the Binary Tree. Print the parent node of each node in the given Binary Tree.  Examples :  Input: Binary Tree =… Read More
Given an integer n and a 2D integer array of edges where edges[i] = [ui, vi, timei] means that there is an edge between intersections… Read More
A cyclic graph is defined as a graph that contains at least one cycle which is a path that begins and ends at the same… Read More