Tutorials
Go Premium
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
32.1K+ articles
Misc
7.8K+ 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
909+ articles
DSA
20.2K+ posts
Recent Articles
Popular Articles
Deque Deletion
Last Updated: 29 March 2025
Given a Dequedcontaining non-negative integers.Complete below functionsdepending type of query as mentioned andprovided to you (indexing starts from 0):1.eraseAt(x):this f...
read more
DSA
deque
Maximum XOR Queries With an Element From Array
Last Updated: 18 April 2025
Given an array arr[] of size n containing non-negative integers and also given a list of q queries in a 2D array queries[][], where each query is of the form [xi, mi]. For...
read more
Bit Magic
DSA
Group Balls by Sequence
Last Updated: 19 June 2025
Given an integer array arr[], where each element represents the number written on a ball, and an integer k, determine whether it's possible to rearrange all the balls into...
read more
Sorting
DSA
Unique Vowel Arrangements
Last Updated: 14 July 2025
Given a lowercase string s, find the total number of distinct strings that can be formed by the following process:Identify all distinct vowels (a, e, i, o, u) in s.For eac...
read more
DSA
Must‑Have Digit
Last Updated: 14 July 2025
Given an integernrepresenting the number of digits, and an arrayarr[] of digits (0–9), count how many n‑digit positive integers can be formed such that at least one digit ...
read more
DSA
Floor and Ceil of Integer Division
Last Updated: 14 July 2025
Given two integers a and b (where b ≠ 0). The objective is to find:• The floor of the division a / b, denoted as ⌊a / b⌋ — the greatest integer less than or equal to a / b...
read more
DSA
Maths
Candidates with majority vote
Last Updated: 25 June 2025
Given an array arr[] of positive integers representing votes for candidates, return all candidates who receive more than ⌊n/3⌋ votes.Return the result in increasing order ...
read more
DSA
Counting Even-Frequency Characters in a String
Last Updated: 07 July 2025
Given a lowercase string s, count how many distinct characters appear an even number of times.Examples: Input: s = "abacaba"Output: 2Explanation: The frequency of a is 4, ...
read more
DSA
Sequence Breaks
Last Updated: 11 July 2025
Given an integer array arr[] representing a sequence of elevations, Return an array that includes:The first and last elements of the array.Every element where the trend of...
read more
DSA
ASCII Range Sum
Last Updated: 08 July 2025
Given a string s consisting of lowercase English letters, identify all characters whose first and last occurrences are at different positions.For each such character, comp...
read more
DSA
prefix-sum
strings
DSA
Powerful Integers
Last Updated: 05 July 2025
You are given a 2D integer array intervals[][] of length n and integer k, where each intervals[i] = [start, end] represents a closed interval (i.e., all integers from star...
read more
DSA
prefix-sum
DSA
Balance Consonant and Vowels Ratio
Last Updated: 11 July 2025
You are given an array of strings arr[], where each string contains only lowercase English letters. Count the number of contiguous subarrays (i.e., one or more consecutive...
read more
DSA
DSA
Tywin's War Strategy
Last Updated: 18 July 2025
Given an array arr[] of length n, where arr[i] is the number of soldiers in the i-th troop, and an integer k. A troop is called lucky if its soldier count is a multiple of...
read more
DSA
Maximum Non-Overlapping Odd Palindrome Sum
Last Updated: 18 July 2025
Given a string s consisting of lowercase English letters, find the maximum possible sum of the lengths of any two non-empty and non-overlapping palindromic substrings of o...
read more
DSA
strings
Count Frequency of an Element in a Given Range
Last Updated: 16 July 2025
Given an array arr[] of integers and a 2D array queries[][], where each queries[i] contains three integers: l, r, and x. For each query, determine how many times the eleme...
read more
DSA
Binary Search
1
2
3
4
...
1348
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !