1. Next Permutationhistorical

    Implement a function that obtains the next permutation. The algorithm must rearrange the given sequence of numbers into the next lexicographically greater permutation.

  2. Permutationshistorical

    Given a sequence of distinct numbers, return all possible permutations.

  3. Subsetshistorical

    Given an integer array nums whose elements are all distinct, return all possible subsets (the power set).