Find largest number possible from set of given numbers. The numbers should be appended to each other in any order to form the largest number.
Given an array of integers, find all distinct combinations of given length where repetition of elements is allowed.
Given an array of integers, find maximum product of two integers in an array.
Given two sorted arrays X and Y of size m and n each where m >= n and X has exactly n vacant cells, merge elements of Y in their correct position in array X i.e. merge (X, Y) by keeping the sorted order.
Given two sorted arrays X and Y of size m and n each, merge elements of X with elements of array Y by maintaining the sorted order. i.e. fill X with first m smallest elements and fill Y with remaining elements.
Given an array of integers, move all zeros present in the array to the end. The solution should maintain the relative order of items in the array.
Given an unsorted array of integers, find a pair with given sum in it.
Given an array containing only 0’s, 1’s and 2’s, sort the array in linear time and using constant space.
Given an binary array, sort it in linear time and constant space. Output should print contain all zeroes followed by all ones.
Write a function that takes two lists, each of which is sorted in increasing order, and merges the two together into one list which is in decreasing order and return it. In other words, merge two sorted linked lists from their end.
Given a linked list, sort it using merge sort algorithm. Merge sort algorithm is an efficient, general-purpose sorting algorithm which produces a stable sort, which means that the implementation preserves the input order of equal elements in the sorted output. Merge sort is a comparison sort, i.e. it can sort items of any …
Given a string sorted in ascending order, find all lexicographically next permutations of it.