## Sum and product of k smallest and k largest prime numbers in the array

Given an integer k and an array of integers arr, the task is to find the sum and product of k smallest and k largest… Read More »

- Count common characters in two strings
- Sort an array without changing position of negative numbers
- Nth number whose sum of digit is multiple of 10
- Given two arrays count all pairs whose sum is an odd number
- Find maximum xor of k elements in an array
- Find minimum difference between any two elements | Set 2
- Why Should I Learn Coding?
- Interactive Problems in Competitive Programming
- Check whether two strings contain same characters in same order
- Total number of possible Binary Search Trees using Catalan Number
- Find the minimum number of operations required to make all array elements equal
- Program to find the kth character after decrypting a string
- Maximize the happiness of the groups on the Trip
- Spanning Tree With Maximum Degree (Using Kruskal's Algorithm)
- Find the minimum number of elements that should be removed to make an array good
- 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
- 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
- Lexicographically Smallest Topological Ordering
- Lazy Propagation in Segment Tree | Set 2
- Convert the undirected graph into directed graph such that there is no path of length greater than 1
- Check which player visits more number of Nodes
- Find the Nth Mosaic number
- Replace array elements by sum of next two consecutive elements
- Number of ways of scoring R runs in B balls with at most W wickets
- Optimally accommodate 0s and 1s from a Binary String into K buckets
- Find the weight of the minimum spanning tree
- Count of integers in a range which have even number of odd digits and odd number of even digits

Given an integer k and an array of integers arr, the task is to find the sum and product of k smallest and k largest… Read More »

Given two integers x and n, the task is to search for the first consecutive stream of 1s (in the x’s 32-bit binary representation) which… Read More »

Given an integer x, the task is to find if every k-cycle shift on the element produces a number greater than or equal to the… Read More »

Given an integer k and an array of integers arr (less than 10^6), the task is to find the sum of every k’th prime number… Read More »

Given the number of cities n numbered from 0 to n-1 and the cities in which stations are located, the task is to find the… Read More »

Given a binary array consisting of only zeroes and ones. The task is to find: The number of subarrays which has only 1 in it.… Read More »

Given a number N. The task is to find the sum of all multiples of 2 and 5 below N ( N may be up… Read More »

Given a number N, find the smallest prime divisor of N. Examples: Input: 25 Output: 5 Input: 31 Output: 31 Recommended: Please try your approach… Read More »

Given an array of integers arr, the task is to count the number of inversions in the array. If A[i] > A[j] and i <… Read More »

Given an array of integers. The task is to calculate the product of all the composite numbers in an array. Note: 1 is neither prime… Read More »

Given a string str, the task is to find the lexicographically smallest string that can be formed by removing at most one character from the… Read More »

Given an array of N integers and a number K, the task is to find the number of subarrays such that all elements are greater… Read More »

Given an array with n elements. The task is to find the maximum number of contiguous array elements which have the same number of set… Read More »

Given an array of N integers and a number K, the task is to find the length of the longest subarray in which all the… Read More »

Given an array of N integers and a number X, the task is to find the number of segments such that all elements in the… Read More »