You are given an binary array (i.e., containing 0 and 1 as a element). Here, 0 means a straight path and 1 means zigzag path. Add one to score when zero appears Read more →
Arrays
106 postsGiven an array of N size denotes number of students and element of array denotes marks of students. Marks belongs between 1 to 100, where A[i] is less or equal to 32 Read more →
Given an array arr[] consisting of binary digits 0 and 1, determine the minimum number of swaps to push 0s towards one end and 1s to the other end of the array. Read more →
Given an array containing weights of gifts, and an integer representing maximum weight a box can contain. Each box carries at most 2 gifts at the same time, provided the sum of Read more →
Given an infinite stream of integers, find the k’th largest element at any point of time. It may be assumed that 1 <= k <= n. Example: Input: stream[] = {10, 20, Read more →
Given an array arr[] of N non-negative integers, the task is to sort these integers according to the sum of letters required to represent them. Examples: Input: arr[] = {12, 10, 31, Read more →
Given an array arr1[] of size n, so firstly we have to reverse each element of an array, and store each of that reversed element in new arr2[] and then sort. Examples: Read more →
Given a an array of even size N. The task is to find that is it possible to reorder it in such way so that the sum of left half is not Read more →
Given an integer K and an array of integers, you have to find whether is it possible to reduce the array to a single element equal to k or not. You can Read more →
There is an array containing prices of n tickets. A number m is defined as the size of a subsequence S of tickets. Each element in the subsequence covers a continuous range Read more →