Courses
Tutorials
Jobs
Practice
Contests
Data Structure
Java
Python
HTML
Interview Preparation
Trending Now
DSA
Web Tech
Foundational Courses
Data Science
Practice Problem
Python
Machine Learning
JavaScript
System Design
Django
DevOps Tutorial
Java
C
C++
ReactJS
NodeJS
CP Live
Aptitude
Puzzles
Projects
Count elements of same value placed at same indices of two given arrays
Given two arrays A[] and B[] of N unique elements, the task is to find the maximum number of matched elements from the two given arrays.Elements of the two arrays are matc...
Read More
Arrays
Searching
Mathematical
Hash
array-rearrange
Java-HashMap
DSA
Flip bits of the sum of count of set bits of two given numbers
Given two numbers A and B, the task is to count the number of set bits in A and B and flip the bits of the obtained sum.Examples:Input: A = 5, B = 7Output: 2Explanation:Bi...
Read More
Bit Magic
setBitCount
Mathematical
binary-representation
DSA
Maximize length of longest subarray consisting of same elements by at most K decrements
Given an array arr[] of size N and an integer K, the task is to find the length of the longest subarray consisting of same elements that can be obtained by decrementing th...
Read More
Arrays
Binary Search
Greedy
Searching
Mathematical
Advanced Data Structure
Segment-Tree
array-rearrange
DSA
Find the winner of game of repeatedly removing the first character to empty given string
Given a positive integer N, representing the count of players playing the game and an array of strings arr[], consisting of the numeric strings made up of digits from the ...
Read More
Strings
Queue
Mathematical
Game Theory
cpp-queue
cpp-strings
DSA
Minimum substring removals required to make all remaining characters of a string same
Given a string str of length N, the task is to find the minimum number of substrings required to be removed to make all the remaining characters of the string same.Note: T...
Read More
Strings
Searching
Mathematical
Hash
frequency-counting
DSA
Generate a sequence from first X natural numbers which adds up to S on raising 2 to the power of their lowest set bits
Given two integers X and S, the task is to construct a sequence of distinct integers from the range [1, X] such that the sum of value 2K is equal to S, where K is the posi...
Read More
Bit Magic
Greedy
Mathematical
Technical Scripter
Bit Algorithms
Natural Numbers
Technical Scripter 2020
DSA
Check if sum of the given array can be reduced to 0 by reducing array elements by K
Given an array arr[] consisting of N integers and an integer K, the task is to check if the sum of the array can be reduced to 0 by subtracting array elements by K any num...
Read More
Arrays
Greedy
Mathematical
array-traversal-question
DSA
Find the array element from indices not divisible by K having largest composite product of digits
Given an array arr[] and an integer K, the task is to find the array element from indices not divisible by K whose product of digits is a composite number.Examples:Input: ...
Read More
Arrays
Sorting
Mathematical
number-digits
Prime Number
DSA
Counts 1s that can be obtained in an Array by performing given operations
Given an array arr[] of size N consisting of only of 0s initially, the task is to count the number of 1s that can be obtained in the array by performing the following oper...
Read More
Arrays
Greedy
Sorting
Mathematical
array-rearrange
maths-perfect-square
DSA
Maximum Sum Subsequence
Given an array arr[] of size N, the task is to find the maximum sum non-empty subsequence present in the given array.Examples:Input: arr[] = { 2, 3, 7, 1, 9 }Output: 22Exp...
Read More
Arrays
Greedy
Searching
Mathematical
subsequence
Numbers
DSA
Maximize maximum possible subarray sum of an array by swapping with elements from another array
Given two arrays arr[] and brr[] consisting of N and K elements respectively, the task is to find the maximum subarray sum possible from the array arr[] by swapping any el...
Read More
Arrays
Sorting
Mathematical
array-rearrange
subarray
subarray-sum
DSA
Longest increasing sequence possible by the boundary elements of an Array
Given an array arr[] of length N consisting of positive integers, the task is to find the longest increasing subsequence that can be formed by the elements from either end...
Read More
Arrays
Searching
Mathematical
subsequence
two-pointer-algorithm
DSA
Minimize swaps of adjacent characters to sort every possible rearrangement of given Binary String
Given a binary string S of length N consisting of 0s, 1s, and "?", where "?" can be replaced by either 0 or 1, the task is to count the sum of minimum swaps of adjacent ch...
Read More
Strings
combinatorics
Dynamic Programming
Mathematical
Combinatorial
binary-string
DSA
Median of Bitwise XOR of all submatrices starting from the top left corner
Given a 2D matrix mat[][] of size N * M, the task is to find the median of Bitwise XOR of all possible submatrices from the given matrix having topmost left element at (0,...
Read More
Bit Magic
Dynamic Programming
Mathematical
Matrix
Bitwise-XOR
array-range-queries
DSA
Sum of floor division of all pairs from given array
Given an array arr[] of size N, the task is to find the sum of the floor value of (arr[i] / arr[j]) for all pairs of indices (i, j).Examples:Input: arr[] = { 1, 2, 3 }Outp...
Read More
Arrays
Infosys
Searching
Mathematical
Technical Scripter
interview-preparation
prefix-sum
frequency-counting
DSA
1
...
6963
6964
6965
...
11561