1. Merge Two Sorted Arrayshistorical

    Merge two sorted integer arrays A and B into A while preserving order. Assume A has enough space for all elements.

  2. Find the K-th Largesthistorical

    Given an integer array, use the idea of quicksort to find the K-th largest number in the array.

  3. Queue Reconstruction by Heighthistorical

    Each person is described by their height and the number of people at least as tall ahead of them. Reconstruct the queue from these shuffled descriptions.

  4. Largest Numberhistorical

    Given a group of non-negative integers nums, rearrange the order of each number (each number cannot be split) so that they form the largest integer.

  5. Sort Colorshistorical

    Given an array with n elements colored red, white, and blue, sort them in place so that elements of the same color are adjacent, in the order red, white, and blue.

  6. Sort an Arrayhistorical

    Given an array, write a function that returns the array in sorted order.

  7. Median of Two Sorted Arrayshistorical

    Given two sorted arrays of lengths m and n, find the median of their combined values.

  8. Shortest Unsorted Continuous Subarrayhistorical

    Given an integer array nums, find a continuous subarray such that sorting only this subarray in ascending order makes the whole array sorted in ascending order.