## Check if it is possible to reach a number by making jumps of two given length

Given a starting position ‘k’ and two jump sizes ‘d1’ and ‘d2’, our task is to find the minimum number of jumps needed to reach… Read More »

- What is Competitive Programming and How to Prepare for It?
- Why Should I Learn Coding?
- Lexicographically Smallest Topological Ordering
- Find the number of pair of Ideal nodes in a given tree
- Sum of digits with even number of 1's in their binary representation
- Equal Sum and XOR of three Numbers
- Check which player visits more number of Nodes
- Count of integers in a range which have even number of odd digits and odd number of even digits
- Make the list non-decreasing by changing only one digit of the elements
- Print the path between any two nodes of a tree | DFS
- Convert an unbalanced bracket sequence to a balanced sequence
- Nth XOR Fibonacci number
- Write a function to get the intersection point of two Linked Lists | Set 2
- Print all the permutation of length L using the elements of an array | Iterative
- Number of substrings that start with "geeks" and end with "for"
- Find a pair (n,r) in an integer array such that value of nPr is maximum
- Check if a cycle of length 3 exists or not in a graph that satisfy a given condition
- Count occurrences of a prime number in the prime factorization of every element from the given range
- Reversing a Queue using another Queue
- Minimum increment or decrement operations required to make the array sorted
- Check if the rows of a binary matrix can be made unique by removing a single column
- Number of Subarrays with positive product
- Queries for the minimum element in an array excluding the given index range
- Longest Increasing Subsequence using Longest Common Subsequence Algorithm
- Print nodes having maximum and minimum degrees
- Color all boxes in line such that every M consecutive boxes are unique
- Minimize the sum of the array according the given condition
- Count of triples (A, B, C) where A*C is greater than B*B
- Find two co-prime integers such that the first divides A and the second divides B
- Sum of all natural numbers from L to R ( for large values of L and R )

Given a starting position ‘k’ and two jump sizes ‘d1’ and ‘d2’, our task is to find the minimum number of jumps needed to reach… Read More »

Given an array q[] of XOR queries of size N (N is a multiple of 4) which describe an array of the same size as… Read More »

Given an integer area, the task is to find the length and breadth of a rectangle with the given area such that the difference between… Read More »

Here are some of the basic C++ tricks that every beginner in Competitive Programming should follow for increased speed. However, competitive programming can only be… Read More »

Given a string consisting of only three possible characters ‘a’, ‘b’ or ‘c’. The task is to replace characters of the given string with ‘a’,… Read More »

Given a permutation P = p1, p2, …., pn of first n natural numbers (1 ≤ n ≤ 10). One can swap any two consecutive… Read More »

Given N seconds. The task is to check if it is possible to start from 12’0 clock and get back to 12 only adding or… Read More »

Given that integers are being read from a data stream. Find the median of all the elements read so far starting from the first integer… Read More »

Given an array arr[] of distinct elements -109 ≤ ai ≤ 109. The task is to find the largest sub-set from the given array such… Read More »

Given two strings str1 and str2, the task is to count all the valid strings. An example of a valid string is given below: If… Read More »

Depth First Search (DFS) marks all the vertices of a graph as visited. So for making DFS useful, some additional information can also be stored.… Read More »

Given an array of size N and an integer K, the task is to find the maximum for each and every contiguous sub-array of size… Read More »

Given an array arr[] which is the resultant array when a number of queries are performed on the original array. The queries are of the… Read More »

Given a number N. The task is to express N as sum two Abundant Numbers. If it is not possible print -1. Examples: Input :… Read More »

Given a number N. FInd the sum of he all amicable numbers up to N. If A and B are Amicable pairs (Two numbers are… Read More »