Courses
Tutorials
Interview Prep
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
Similar Topics
Web Technologies
32.1K+ articles
Misc
7.7K+ articles
Mathematical
5.1K+ articles
Arrays
4.2K+ articles
Strings
2.1K+ articles
Greedy
1.4K+ articles
Sorting
1.1K+ articles
Dynamic Programming
1.1K+ articles
Searching
1.0K+ articles
Tree
911+ articles
DSA
20.4K+ posts
Recent Articles
Waiting Time of the Last Consumer
Last Updated: 07 June 2026
Given two positive integers n and x, n denotes the total number of consumers, x denotes the time interval, after which a new consumer arrives. A single producer serves on...
read more
DSA
Number of Open Tabs
Last Updated: 08 June 2026
You are given an array arr[], where each element is either a tab ID or the string "END". If a tab ID appears, toggle its state (open if it's closed, or close if it's open)...
read more
DSA
Remove first and last characters
Last Updated: 07 June 2026
Given a string s, return a substring containing all characters except the first and the last. The length of the s will be greater than 2.Examples:Input: s = "Hello"Output:...
read more
DSA
The Modulo Task
Last Updated: 07 June 2026
Given an integer n. find an integer k for which n % k is the largest where 1 ≤ k n.Examples :Input: n = 3Output: 2Explanation:3 % 1 = 03 % 2 = 1So, the modulo is highest ...
read more
DSA
Numbers from 1 to n with digits in set {1, 2, 3, 4, 5}
Last Updated: 04 June 2026
Given a number n, count the numbers from 1 to n, which comprise only digits from set {1, 2, 3, 4, 5}.Examples:Input: n = 20Output: 10Explanation: The numbers whose digits ...
read more
DSA
Bitwise OR of a Binary Array
Last Updated: 04 June 2026
Given a binary array, find Bitwise OR of the given array. Examples : Input: arr[] = [1 1 1 0]Output:1Explanation:1 | 1 = 11 | 1 = 11 | 0 = 1hence output is 1Input: arr[]...
read more
DSA
Minimum Steps to Reach Top with p or q Moves
Last Updated: 31 May 2026
You are standing at the bottom of a staircase with exactly n stairs. You can take steps of size p or q at a time. Your task is to calculate the minimum number of steps req...
read more
DSA
Total Strings with 3 Characters
Last Updated: 31 May 2026
Given 3 characters 'a', 'b', 'c', find the number of strings of length n that can be formed from these 3 characters. Given that : We can use ‘a’ as many times as we want. ...
read more
DSA
Generate all strings from mid in circular manner
Last Updated: 31 May 2026
Given an odd length string s, return a list of strings by starting from the middle character of s and then repeatedly appending the next characters in circular order. Cont...
read more
DSA
Max Identical with Any Number of Movements
Last Updated: 27 May 2026
Given an integer array arr[], where arr[i] represents the number of cookies in the i-th bowl, you can perform the following operation any number of times:Take one cookie f...
read more
DSA
Subtrees with Limited Distinct Nodes
Last Updated: 09 June 2026
You are given a root node of a binary tree and each node of the binary tree is assigned a value and you are also given an integer k and you need to return the count of sub...
read more
DSA
Any Common Subsequence
Last Updated: 24 May 2026
Given two strings s1 and s2. Check whether they contain any common subsequence (non empty) or not.Examples:Input: s1 = "ABEF", s2 = "CADE"Output: trueExplanation: Subseque...
read more
DSA
Minimum XOR with given set bits
Last Updated: 24 May 2026
Given two integers a and b, find an integer x such that the number of set bits in x is equal to the number of set bits in b, and the value of (x XOR a) is minimized. Retur...
read more
DSA
Count Subsequence Occurrences with Different Characters
Last Updated: 22 May 2026
Given two strings s and w, find the number of times w appears as a subsequence of string s where every character of string s can be included in forming at most one subsequ...
read more
DSA
DSA
Count Sorted Subsequences of Size 3
Last Updated: 21 May 2026
Given an array of integers arr[], a triplet (arr[i], arr[j], arr[k]) is called a Magic Triplet if it satisfies two conditions:arr[i] arr[j] arr[k]i j kThe task is to c...
read more
DSA
1
2
3
4
...
1364