## Find the top K items with the highest value

Given a list of items and their values. The task is to find top k items with the highest value. It is possible that two… Read More »

- 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
- 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
- Find the number of pair of Ideal nodes in a given tree
- Lexicographically Smallest Topological Ordering
- 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 a list of items and their values. The task is to find top k items with the highest value. It is possible that two… Read More »

Given two points i.e. (a, 0) to (b, 0). The task is to check whether it is possible to move from (a,0) to (b,0) or… Read More »

Given two numbers A, B. The task is to find the numbers of special pairs of A, B. A special pair of two numbers A,… Read More »

Given an array arr[]. The task is to find the length of the longest subarray of arr[] such that it contains only even elements. Examples:… Read More »

Given a number N. The task is to find the largest special prime which is less than or equal to N. A special prime is… Read More »

Given a positive integer N, check if it can be expressed as a sum of two semi-primes or not. Semi-primes A number is said to… Read More »

Given a number N. The task is to find the smallest number which is greater than N and has only one bit different in the… Read More »

How long have u been a competitive programmer? About 9 years. Top two websites you prefer to compete? Codingame, Topcoder What are some of the… Read More »

The Coin Change Problem is considered by many to be essential to understanding the paradigm of programming known as Dynamic Programming. The two often are… Read More »

Given Q queries of three types where every query consists of a number. Add element num on the left Add element num on the right… Read More »

Given a string S consisting of lowercase characters(a-z) only, the task is to print a new string by rearranging the string in such a way… Read More »

Given Q queries. The queries are of three types and are described below: Add the number num to the list. Remove the number num from… Read More »

Find the value of a1, a2, a3, ….an such that the following two conditions are satisfied. Print the value of a1, a2, …, an and… Read More »

Given a bracket sequence of even length. The task is to find how many ways are there to make balanced bracket subsequences from the given… Read More »

A person stands in line of n people, but he doesn’t know exactly which position he occupies. He can say that there are no less… Read More »