## Difference between the largest and the smallest primes in an array

Given an array of integers where all the elements are less than 10^6. The task is to find the difference between the largest and the… Read More »

- Sort an array without changing position of negative numbers
- Given two arrays count all pairs whose sum is an odd number
- Nth number whose sum of digit is multiple of 10
- Find maximum xor of k elements in an array
- What is Competitive Programming and How to Prepare for It?
- Find minimum difference between any two elements | Set 2
- Why Should I Learn Coding?
- Check whether two strings contain same characters in same order
- Total number of possible Binary Search Trees using Catalan Number
- Maximize the happiness of the groups on the Trip
- Lexicographically Smallest Topological Ordering
- Find the number of pair of Ideal nodes in a given tree
- Find the minimum number of elements that should be removed to make an array good
- Sum of digits with even number of 1's in their binary representation
- Find sub-arrays from given two arrays such that they have equal sum
- Count of all possible values of X such that A % X = B
- Equal Sum and XOR of three Numbers
- Check which player visits more number of Nodes
- Find the Nth Mosaic number
- Count of integers in a range which have even number of odd digits and odd number of even digits
- Check whether a number can be represented as sum of K distinct positive integers
- Optimally accommodate 0s and 1s from a Binary String into K buckets
- Longest string in an array which matches with prefix of the given string
- Make the list non-decreasing by changing only one digit of the elements
- Generate elements of the array following given conditions
- Count of strings whose prefix match with the given string to a given length k
- Check whether a subsequence exists with sum equal to k if arr[i]> 2*arr[i-1]
- Find the time which is palindromic and comes after the given time
- Find two vertices of an isosceles triangle in which there is rectangle with opposite corners (0, 0) and (X, Y)
- Print the path between any two nodes of a tree | DFS

Given an array of integers where all the elements are less than 10^6. The task is to find the difference between the largest and the… Read More »

Given a number , find the number of distinct integers obtained by lcm(X, N)/X where X can be any positive number. Examples: Input: N =… Read More »

Given a range [L, R], the task is to find the numbers from the range which have the count of their divisors as even as… Read More »

Given two integers(less than 2^31) A and B. The task is to find the number of bits that are different in their binary representation. Examples:… Read More »

Given an array of integers (less than 10^6), the task is to find the sum of all the prime numbers which appear after every (k-1)… Read More »

Given an infinite chessboard with the same rules as that of chess. Also given are N knights coordinates on the infinite chessboard(-10^9 <= x, y… Read More »

Given an array of size N and X. Find minimum moves required to make the array in increasing order. In each move one can add… Read More »

Given N and K, the task is to print N lines where each line contains 4 numbers such that every among those 4 numbers has… Read More »

Given a number, the task is to check if a number is divisible by 2, 3 and 5 or not. The input number may be… Read More »

Given an array of N numbers. The task is to maximize the number of subarrays with XOR value zero by swapping the bits of array… Read More »

Given an array. The task is to find the length of the longest subsequence in which all elements must have at least one digit in… Read More »

Given two circles and a length K. Find whether we can join two points (one on perimeter of each circle), so that distance between the… Read More »

Given a set of ‘N’ digits. The task is to find the maximum integer that we can make from these digits. The resultant number must… Read More »

Given a number N containing digits from 1 to 9 only. The task is to generate a new number using the number N such that… Read More »

Given a positive integer n, the task is to check if it is Euclid Number or not. Print ‘YES’ if the given number is Euclid… Read More »