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 →
C++ Programs
155 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[] 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 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 array arr[] of N dates in the form of “dd-mm-yyyy”, the task is to sort these dates in ascending order. Examples: Input: arr[] = { "25-08-1996", "03-08-1970", "09-04-1994" } Output: 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 →
Given an array arr[] of N strings, the task is to sort these strings according to the numbers of matches required to represent them. Examples: Input: arr[] = { "123", "46", "8", Read more →
Given an array arr[ ] of N non-negative integers, the task is to sort these integers according to sum of their digits. Examples : Input : 12 10 102 31 15 Output Read more →
Given two positive integers. Count the number of pairs (a, b) such that 1 ≤ a ≤ x, 1 ≤ b ≤ y and a+b is even. Examples: Input: 2 7 Output: Count of pairs Read more →
Given a string S, the task is to sort odd indices in ascending order and even indices in descending order of the string. Examples: Input: S = "Cplusplus" Output: Cululspsp Explanation: Sort Read more →