Given two arrays a and b of the same size. Find the count of total pair in array a, such that the sum of elements of pair of array a is greater ...read more
N objects are placed on X-axis, and coordinates are given. Starting your journey with coordinate 0, find minimum distance you need to travel to collect K objects (If multiple objects are placed ...read more
Given an array of integers, in one operation a length x ( x >= 1 && x < n) can be chosen and the prefix of x length is sorted and then ...read more
You have a Restaurant and there is a Array nums [ ] of N people outside your restaurant. Your, waiter found out that for each valid i, the i-th person gave Ai ...read more
Given an array Arr[ ] that consists of N distinct integers. Check that if it is possible to sort the array in ascending order by reversing a specific segment of the array. ...read more
Given a weighted directed graph consisting of N nodes and M edges, the task is to find the first K shortest distances between two nodes A and B. (Assuming there are k ...read more
Given an array of positive integers, find the maximum product difference. The product difference between the two pairs is defined as taking the product of two pairs, followed by taking their difference. ...read more
You are given an binary array (i.e., containing 0 and 1 as a element). Here, 0 means a straight path and 1 means zigzag path. Add one to score when zero appears ...read more
Given an array of N size denotes number of students and element of array denotes marks of students. Marks belongs between 1 to 100, where A[i] is less or equal to 32 ...read more
You are given n strings. You have to print them in lexicographical increasing order. Also, ensure that all of the strings should be distinct. Examples: Input: {"Aarav", "Arjun", "Rahul", "Rishabh", "Kunal"} Output: ...read more