## Arrange array elements such that last digit of an element is equal to first digit of the next element

Given an array arr[] of integers, the task is to arrange the array elements such that the last digit of an element is equal to… 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
- Building Heap from Array
- Find k closest numbers in an unsorted array
- Amazon Internship Interview Experience
- Check if given Preorder, Inorder and Postorder traversals are of same tree | Set 2
- Create linked list from a given array
- Maximum sum such that no two elements are adjacent | Set 2
- Maximum Sum Subsequence of length k
- Sort an array without changing position of negative numbers
- Maximum absolute difference in an 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
- Kth smallest element in a subarray
- Count the triplets such that A[i] < B[j] < C[k]
- Find the longest string that can be made up of other strings from the array
- Find minimum difference between any two elements | Set 2
- Partition an array of non-negative integers into two subsets such that average of both the subsets is equal
- Introduction to Data Structures | 10 most commonly used Data Structures
- Count of integers of length N and value less than K such that they contain digits only from the given set
- Number of subsets with zero sum
- Split the given array into K sub-arrays such that maximum sum of all sub arrays is minimum
- Maximum sum combination from two arrays
- Greatest contiguous sub-array of size K
- Remove duplicate elements in an Array using STL in C++
- Find the smallest positive number missing from an unsorted array | Set 3
- 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
- Pair with largest sum which is less than K in the array

Given an array arr[] of integers, the task is to arrange the array elements such that the last digit of an element is equal to… Read More »

Given an array arr[]. The task is to find an element from arr[] which has the maximum count of set bits. Examples: Input: arr[] =… Read More »

Given an array arr[] of N integers where |arr[i] ≤ 1000| for all valid i. The task is to count the pairs of integers from… Read More »

Given two arrays of N and M integers. The task is to find the number of unordered pairs formed of elements from both arrays in… Read More »

Given an array of N elements. The task is to find the length of the longest subarray such that sum of the subarray is even.… Read More »

Given an array arr[] of strings, the task is to reorder the strings lexicographically and print their positions in the original list. Examples: Input: arr[]… Read More »

Given an array of strings and an array of integers where ith integer of the array corresponds to the value of the ith string present… Read More »

Give an array arr[] of N integers and another integer k ≤ N. The task is to find the maximum element of every sub-array of… Read More »

Given an array arr[] of N integers and an integer X. We can choose any sub-array and multiply all its element by X. After multiplication,… Read More »

Given two arrays box[] and truck[] where box[i] represents the weight of the ith box and truck[i] represents the maximum load that the ith truck… Read More »

Given two array A[] and B[]. Where size of A[] represent the number of rows and A[i] represent the number of boxes in the ith… Read More »

Given four arrays containing integer elements and an integer sum, the task is to count the quadruplets such that each element is chosen from a… Read More »

Given an array arr[] of N integers. The task is to find the sum of factorials of each element of the array. Examples: Input: arr[]… Read More »

Given an array of pairs arr[], the task is to find the maximum cost choosing at most K pairs. The cost of an array of… Read More »

Given N intervals in the form [l, r] and an integer Q. The task is to find the interval which when removed results in the… Read More »