1. Two Sumhistorical

    Given an integer array, find two numbers in the array whose sum equals the target value. The twoSum function should return the indices of these two numbers (index1, index2), with index1 < index2.

  2. Find All Numbers Disappeared in an Arrayhistorical

    An array of length n contains values from 1 to n, some once and some twice. Find the values in this range that do not appear in the array.

  3. Big Number Additionhistorical

    Read two numbers as strings, write a function to calculate their sum, and return the result as a string. (The string length does not exceed 100000, and each string contains only the ten characters '0'~'9'.).

  4. Subarray Sum Equals Khistorical

    Given an integer array and an integer k, find the number of contiguous subarrays whose sum equals k.

  5. Longest Consecutive Sequencehistorical

    Given an unsorted integer array nums, find the length of the longest sequence of consecutive numbers. The elements do not need to be contiguous in the original array.

  6. Decode Stringhistorical

    Given an encoded string, return its decoded string.

  7. Longest Valid Parentheseshistorical

    Given a string containing only '(' and ')', find the length of the longest valid (well-formed and consecutive) parentheses substring.

  8. Remove Invalid Parentheseshistorical

    Given a string s containing parentheses and letters, remove the minimum number of invalid parentheses to make the input string valid.

  9. Generate Parentheseshistorical

    The number n represents the number of pairs of parentheses. Design a function that can generate all possible valid combinations of parentheses.

  10. Valid Parentheseshistorical

    Given a string containing only the characters '(', ')', '{', '}', '[' and ']', determine whether the string is a valid parentheses sequence. Parentheses must close in the correct order.