## Sort the matrix row-wise and column-wise

Given a n x n matrix. The problem is to sort the matrix row-wise and column wise. Examples: Input : mat[][] = { {4, 1,… Read More »

- Amazon Internship Interview Experience
- k-th missing element in an unsorted array
- Sort an array without changing position of negative numbers
- Find the longest string that can be made up of other strings from the array
- Count the triplets such that A[i] < B[j] < C[k]
- Comparison among Bubble Sort, Selection Sort and Insertion Sort
- Two nodes of a BST are swapped, correct the BST | Set-2
- Nagarro Interview Experience Off-campus
- Greatest contiguous sub-array of size K
- Bubble Sort for Linked List by Swapping nodes
- Merge two BSTs with constant extra space
- Maximum water that can be stored between two buildings
- Find a triplet in an array whose sum is closest to a given number
- Keep track of previous indexes after sorting a vector in C++ STL
- Pair with largest sum which is less than K in the array
- Find maximum meetings in one room
- Range Queries to Find number of sub-arrays with a given xor
- Split the array elements into strictly increasing and decreasing sequence
- Count pairs with given sum | Set 2
- Iterative selection sort for linked list
- Find the number of elements greater than k in a sorted array
- Program to print an array in Pendulum Arrangement with constant space
- Sort an array of strings based on the frequency of good words in them
- Maximum Length Chain of Pairs | Set-2
- IntroSort or Introspective sort
- Find minimum changes required in an array for it to contain k distinct elements
- Remove elements to make array sorted
- Divide array into two parts with equal sum according to the given constraints
- Unbounded Fractional Knapsack
- Check whether an array can be made strictly decreasing by modifying at most one element

Given a n x n matrix. The problem is to sort the matrix row-wise and column wise. Examples: Input : mat[][] = { {4, 1,… Read More »

Given a n x n matrix. The problem is to sort the given matrix in strict order. Here strict order means that matrix is sorted… Read More »

Given an array of unsorted positive integer, sort the given array using the Socket programming . Examples: Input : 4 5 6 1 8 2… Read More »

Given an array of an integer of size, N. Array contains N ropes of length Ropes[i]. You have to perform a cut operation on ropes… Read More »

Given an array of n integers, we have to reverse sort the array elements such the equal keys are stable after sorting. Examples: Input :… Read More »

Given a string, find concatenation of all substrings in lexicographic order. Examples: Input : s = “abc” Output : aababcbbcc The substrings of s in… Read More »

Given a 2D array, sort each row of this array and print the result. Examples: Input : 77 11 22 3 11 89 1 12… Read More »

Given an array of size N. Find the number of pairs (i, j) such that XOR = 0, and 1 <= i < j <=… Read More »

Given an n sized unsorted array, find median and mode using counting sort technique. Thia can be useful when array elements are in limited range.… Read More »

Given an array arr[] and an integer k, we need to print k maximum elements of given array. The elements should printed in the order… Read More »

Earlier we have discussed on how to check if both halves of the string have same set of characters. Now, we further extend our problem… Read More »

Given an integer k and an array arr[], the task is to repeat the following operation exactly k times: Find the minimum non-zero element in… Read More »

Given a list of distinct unsorted integers, find the pair of elements that have the smallest absolute difference between them? If there are multiple pairs,… Read More »

Insertion Sort is suitable for arrays of small size. It also achieves best-case complexity of O(n) if the arrays are already sorted. We have discussed… Read More »

Given an array of N integers with duplicates allowed. All elements are ranked from 1 to N in ascending order if they are distinct. If… Read More »