Given an array of integers between 0 to 9 (both inclusive ) of length, N finds the no of subarrays so that the length of the subarray is equal to the sum Read more →
Programs
1 postTo find the maximum k such that n can be written as : a1 + a2 + · · · + ak where a1, . . . , ak are positive and Read more →
Find if bike racer A defends bike racer B in race when he can jump on his path on seeing a ‘.’ and if he sees an obstacle ‘@’ in his path Read more →
Problem at hand is finding the total number of divisors of a given number efficiently. The divisor of a number is a number less than or equal to the given number and Read more →
There are n pencils, each having l length. Each can write 4 kilometers. After writing 4 kilometers it has l/4 length. One can join 4 pencils which are having l/4 length and Read more →
Given a number X, and an array of length N containing the N numbers. Find the minimum number of operations required to make X non-positive. In one operation, you can select any Read more →
Given a ‘N*N’ 2d matrix consisting of positive integers, the task is to find the probability of collecting maximum points by moving either up(from {i,j} to {i+1,j}) or right (from {i,j} to Read more →
Imagine a rooted tree ( with root as node 1). Every node is given two values, init value and expected value. Our task is to flip the node value to make the Read more →
Given a number N which is a power of 2. Calculate total number of set bits from 1 to N-1. Examples : Input : N = 8 Output : 12 Explanation : Read more →
An important aspect of competitive coding is analyzing the algorithms because in competitive coding apart from correctness, efficiency of algorithms also matters significantly. One the most important aspect of time complexity analysis Read more →