Given an array arr[] of n positive integers and q queries, in which each query have an integer k. For each query, the task is to output the minimum size of subarray Read more →
Algorithms
6 postsGiven a sorted rotated array, the task is to find index of minimum element of the array. Following solution assumes that all elements are distinct. Examples: Input : arr[] = {5, 6, Read more →
What and Why? Algorithms are a well-ordered sequence of instructions that are used to solve a particular problem. The algorithm design technique is a strategy of developing an efficient algorithm to solve Read more →
Given an array of integers, write a function that returns true if there is a triplet (a, b, c) that satisfies a2+b2=c2 Example: Input: arr[] = {8, 1, 4, 6, 10} Output: Read more →
Write an efficient C program to find the sum of contiguous subarray within a one-dimensional array of numbers which has the largest sum. Examples: Input : {-2, -3, 4, -1, -2, 1, Read more →
Given a string A, compute the minimum number of characters you need to delete to make resulting string a palindrome. Examples: Input : baca Output : 1 Input : cplusplus Output : Read more →
Given a multi-set of n integers. We have to select exactly k of them in a such way that the difference between any two of them is divisible by m, if it Read more →
Given an array of n elements and we have to find the standard deviation of numbers. Examples: Input : arr[] = {9, 2, 5, 4, 12, 7, 8, 11, 9, 3, 7, Read more →
Write a program to validate whether the brackets in the given input string are balanced or not. Examples: Input : {[()]} Output : Valid Input :{{(}}[] Output : Invalid Explanation: This problem Read more →
Given an array of N elements, the task is to find the minimum value of K such that Bitwise XOR of K with all array elements is minimum Input: arr[] 16 12 Read more →