Maximum money that can be withdrawn in two steps
There are two cash lockers, one has X number of coins and the other has Y number of coins, you can withdraw money at max… Read More »
There are two cash lockers, one has X number of coins and the other has Y number of coins, you can withdraw money at max… Read More »
Given an array arr[] of integers, where the ith integer represents the position where an island is present, and an integer k (1 ≤ k… Read More »
Given an array of N elements and you can perform two operations on it: Increase any of the array element by X once. Decrease any… Read More »
Given a binary array of N elements and two initial values a and b. We can cross the i-th element if: If a[i] == 0,… Read More »
Given a number N, the task is to find the largest number less than or equal to the given number N such that on rearranging… Read More »
Given an array arr[] of random integers, the task is to push all the zero’s in the array to the start and all the one’s… Read More »
Given an array arr[] of N positive integers. The task is to find the maximum possible value of a[i] % a[j] over all pairs of… Read More »
Given a string str consisting of lowercase English alphabets, the task is to count the number of adjacent pairs of vowels. Examples: Input: str =… Read More »
Given N monsters, each monster has initial health h[i] which is an integer. A monster is alive if its health is greater than 0. In… Read More »
Given a merged sequence which consists of two sequences which got merged, one of them was strictly increasing and the other was strictly decreasing. Elements… Read More »
Given an integer N. The task is to generate a symmetric matrix of order N*N having the following properties. Main diagonal should contain only 0’s… Read More »
Given an array, arr[] of N integers, where arr[i] represents the number of distinct characters in the prefix of length (i + 1) of a… Read More »
Given a number N, the task is to find the sum of digits of a number at even and odd places.Examples: Input: N = 54873 Output: Sum… Read More »
You have an unlimited amount of banknotes worth A and B dollars (A not equals to B). You want to pay a total of S dollars using exactly N notes. The… Read More »
Given an integer N containing the digit 4 at least once. The task is to divide the number into two parts x1 and x2 such… Read More »