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
Minimum Cost Pizza Selection
Last Updated: 23 August 2026
Given the areas of Small, Medium, and Large pizzas as s, m, and l units, and their respective costs as cs, cm, and cl, find the minimum cost required to buy pizzas whose t...
read more
DSA
Check if Two Pairs with Same Product Exist in Array
Last Updated: 21 August 2026
Given an array arr[] of distinct positive integers, find if there exist two pairs of elements [a, b] and [c, d] such that the product of the first pair is equal to the pro...
read more
DSA
Prime Factors Powers Sum for a Range
Last Updated: 22 August 2026
Given two integers a and b, for every integer x in the range [a, b] (inclusive), compute the sum of the exponents of the prime factors in the prime factorization of x. Ret...
read more
DSA
Max Subarray Sum for Values Limited by K
Last Updated: 22 August 2026
Given an array arr[] and an integer k, the task is to find the maximum sum of a subarray such that every element in the chosen subarray is less than or equal to k.Examples...
read more
DSA
Tidy Number
Last Updated: 21 August 2026
Given an integer n, check whether it is a tidy number. A number is called tidy if its digits are in non-decreasing order from left to right. Examples:Input: n = 1234Output...
read more
DSA
Bitwise OR of Multiples in an Array
Last Updated: 21 August 2026
Given an array arr[] comprising of n non-zero, positive integers and an integer x, find the bitwise OR of all multiples of x present in the array.The result of OR operatio...
read more
DSA
Find Nth digit in sequence
Last Updated: 20 August 2026
Given the infinite sequence formed by concatenating the non-negative integers: 0123456789101112131415... . The sequence is 0-indexed, i.e., the 0th digit is 0, the 1st dig...
read more
DSA
Maths
MATHEMATICS
Max Missing Count with Sum Limited to K
Last Updated: 19 August 2026
Given an array arr[] of integers and an integer k. You need to find the maximum number of distinct positive integers that can be selected such that:The selected integers a...
read more
DSA
Smallest Rearrangement with No "cba" Subsequence
Last Updated: 18 August 2026
Given a string s of lowercase English letters, rearrange the characters of s such that it does not contain "cba" as a subsequence. Among all valid rearrangements, return ...
read more
DSA
Find the safe position
Last Updated: 18 August 2026
Given a group of n soldiers standing in a circle, numbered from 1 to n. Starting from soldier 1, every alternate soldier is eliminated in a clockwise direction - soldier 1...
read more
DSA
Compute the values a^b and m^n
Last Updated: 17 August 2026
Given four integers a, b, m, and n. Compute the values ab and mn. Return 1 if ab is greater, 0 if mn is greater, or -1 if both values are equal.Examples:Input: a = 2, b = ...
read more
DSA
Partition into Two Halves with Minimum Sum Diff
Last Updated: 19 August 2026
Given an array arr[] of n integers, divide it into two subsets s1 and s2 such that the difference between the sums of the two subsets is minimized. Return the minimum poss...
read more
DSA
Count Smaller in an Array
Last Updated: 14 August 2026
Given an unsorted array arr[]. Find the count of elements less than or equal to the given element x.Examples:Input: x = 9, arr[] = [10, 1, 2, 8, 4, 5] Output: 5Explanation...
read more
DSA
Unit Digit in a Product
Last Updated: 17 August 2026
Given 6 numbers a, b, c, d, e, f. Find the last digit of (ab) × (cd) × (ef). Examples:Input: a = 3, b = 66, c = 6, d = 41, e = 7, f = 53Output: 8Explanation: The last digi...
read more
DSA
Count Integers Whose OR with x Is Greater Than x
Last Updated: 17 August 2026
Given an integer x, count the number of integers a such that 1 ≤ a ≤ x and (a OR x) x.Examples:Input: x = 10Output: 7 Explanation: In the range [1, 10] if the OR is taken...
read more
DSA
1
2
3
4
...
1363
✕