Перейти к содержимому

LeetCode

Решённые задачи и заметки к ним: подход, мои ошибки и что ещё нужно отработать.

Решено на LeetCode

43задач решено

Лёгкие
31
Средние
11
Сложные
1

Данные на

Заметки 4

Заметки написаны на английском.

  • 20.Valid ParenthesesЛёгкая

    Given a string of ()[]{} characters, decide whether every bracket is closed by the same type of bracket, in the right order.

    stack matching

  • 21.Merge Two Sorted ListsЛёгкая

    Merge two sorted linked lists into one sorted list by splicing their nodes together, and return its head.

    two pointers + dummy node

  • 151.Reverse Words in a StringСредняя

    Given a string s, reverse the order of the words (not characters). Words are separated by spaces; input may contain leading/trailing/multiple spaces which must be collapsed into single spaces in the output.

    string split / two pointers

  • 206.Reverse Linked ListЛёгкая

    Reverse a singly linked list and return the new head.

    in-place pointer reversal