## Calculate the loss incurred in selling the given items at discounted price

A seller wants to sell his items at a discount of X%. He increases the price of each item by X% of the original price.… Read More »

- Optimal Strategy for a Game | Set 2
- Sliding Window Maximum (Maximum of all subarrays of size k) using stack in O(n) time
- Count pairs in array whose sum is divisible by K
- Find k closest numbers in an unsorted array
- Building Heap from Array
- Amazon Internship Interview Experience
- Check if given Preorder, Inorder and Postorder traversals are of same tree | Set 2
- Maximum sum such that no two elements are adjacent | Set 2
- Longest subsequence such that adjacent elements have at least one common digit
- Sort an array without changing position of negative numbers
- Create linked list from a given array
- Maximum element in a sorted and rotated array
- Given two arrays count all pairs whose sum is an odd number
- Find maximum xor of k elements in an array
- Partition an array of non-negative integers into two subsets such that average of both the subsets is equal
- Maximum absolute difference in an array
- Find the longest string that can be made up of other strings from the array
- Program to check if an Array is Palindrome or not
- Find minimum difference between any two elements | Set 2
- Remove minimum elements from either side such that 2*min becomes more than max | Set 2
- Kth smallest element in a subarray
- Count the triplets such that A[i] < B[j] < C[k]
- Introduction to Data Structures | 10 most commonly used Data Structures
- Number of subsets with zero sum
- Count of integers of length N and value less than K such that they contain digits only from the given set
- Maximum sum combination from two arrays
- Find m-th smallest value in k sorted arrays
- Minimum cost to reach end of array array when a maximum jump of K index is allowed
- Find the minimum number of operations required to make all array elements equal
- Maximum Sum Subsequence of length k

A seller wants to sell his items at a discount of X%. He increases the price of each item by X% of the original price.… Read More »

Given an array arr[] of N integers, the task is to find the maximum absolute difference between any two elements of the array. Examples: Input:… Read More »

Given an array of N elements. The task is to build a Binary Heap from the given array. The heap can be either Max Heap… Read More »

Given an array arr[] of N integers. The task is to first find the maximum sub-array sum and then remove at most one element from… Read More »

Given an array arr[] of N integers. The task is to count the number of sub-sequences whose sum is 0. Examples: Input: arr[] = {-1,… Read More »

Given an array arr[] of N positive integers. The task is to find the maximum possible value of a[i] % a[j] over all pairs of… Read More »

Given an array arr[] of N integers and an integer K, the task is to find the number of anomalies in the array. An anomaly is a number for… Read More »

Given a merged sequence which consists of two sequences which got merged, one of them was strictly increasing and the other was strictly decreasing. Elements… Read More »

Given an array arr[] consisting of non-negative integers and an integer k. The task is to find the minimum length of any sub-array of arr[]… Read More »

Given an integer N. The task is to generate a symmetric matrix of order N*N having the following properties. Main diagonal should contain only 0’s… Read More »

Given an array of integers arr[], the task is to count the number of sub-arrays such that the average of elements present in the sub-array… Read More »

Given an array arr[] containing the permutation of first N natural numbers and an integer M ≤ N. The task is to find the number… Read More »

Given an array of N elements. The task is to split the elements into two arrays say a1[] and a2[] such that one contains strictly… Read More »

Given n expressions of the type x = y and x != y where 1 ≤ x, y ≤ n, the task is to check… Read More »

Given N elements, you can remove any two elements from the list, note their sum and add the sum to the list. Repeat these steps… Read More »