## Queries to count integers in a range [L, R] such that their digit sum is prime and divisible by K

Given Q queries and an integer K where each query consists of a range [L, R] and the task is to find the count of… Read More »

- Why companies like Amazon, Microsoft, Google focuses on Data Structures and Algorithms : Answered
- Introduction to Data Structures | 10 most commonly used Data Structures
- Find the longest string that can be made up of other strings from the array
- Minimum number of times A has to be repeated such that B is a substring of it
- Two nodes of a BST are swapped, correct the BST | Set-2
- Merge two BSTs with constant extra space
- Reverse a Linked List in groups of given size (Iterative Approach)
- Find the number of pair of Ideal nodes in a given tree
- Sum of all the levels in a Binary Search Tree
- Equal Sum and XOR of three Numbers
- Pair with a given sum in BST | Set 2
- Maximum sum of K consecutive nodes in the given Linked List
- Count number of ways to reach destination in a Maze using BFS
- Reverse alternate K nodes in a Singly Linked List - Iterative Solution
- Number of pairs with a given sum in a Binary Search Tree
- Implementing Forward Iterator in BST
- Print a given matrix in spiral form using direction tracking method
- Count of triplets that satisfy the given equation
- Find the balanced node in a Linked List
- Write a function to get the intersection point of two Linked Lists | Set 2
- Insertion in n-ary tree in given order and Level order traversal
- Cartesian tree from inorder traversal | Segment Tree
- Sort an array according to absolute difference with given value using Functors
- Sorting Algorithms Visualization : Bubble Sort
- Count of pairs between two arrays such that the sums are distinct
- Find two disjoint good sets of vertices in a given graph
- String Range Queries to find the number of subsets equal to a given String
- Pair with minimum absolute difference | BST
- Print nodes having maximum and minimum degrees
- Triplet with a given sum in BST | Set 2

Given Q queries and an integer K where each query consists of a range [L, R] and the task is to find the count of… Read More »

Given an array arr[] of N integers and two integers M and K. The task is to check if the product of the K largest… Read More »

The task is to generate a binary string of length N using branch and bound technique Examples: Input: N = 3 Output: 000 001 010… Read More »

Given a connected acyclic graph with N nodes and N-1 edges, find out the pair of nodes that are at even distance from each other.… Read More »

Given an array arr[] of N elements where each arr[i] is the cumulative sum of the subarray P[0…i] of another array P[] where P is… Read More »

Given an integer D, the task is to find the sum of all the prime numbers whose count of digits is less than or equal… Read More »

Given two integers N and K, the task is to find the count of set bits in the Kth number in the Odd-Even sequence made… Read More »

Given 2 arrays, the first one containing postorder traversal sequence and the second one containing the information whether the corresponding node in the first array… Read More »

Given N dependencies of the form X Y, where X & Y represents two different tasks. The dependency X Y denotes dependency of the form… Read More »

Given a tree with N vertices numbered from 0 to N – 1 and Q queries containing nodes in the tree, the task is to… Read More »

Given a tree with N vertices numbered from 0 to N – 1 and Q query containing nodes in the tree, the task is to… Read More »

Given two strings A and B of length N, the task is to check whether the two strings can be made equal by swapping any… Read More »

Given an array arr[] of N integers where arr[i] is the height of the ith chocolate and all the chocolated are 1 unit wide, the… Read More »

Given a matrix, the task is to convert the given Matrix into sorted Spiral Matrix. Examples: Input: y[][] = { { 2, 5, 12 },… Read More »

Given an array, the task is to form a spiral matrix Examples: Input: arr[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,… Read More »