Questions list

  Record the questions you brush for easy review and use, QAQ.

Array

id source topic answer
1 LeetCode 26 Remove duplicates in an ordered array answer

Linked list

Two disadvantages of linked lists:

  1. Can't get the length efficiently
  2. Cannot quickly access elements based on offset

However, in interviews, we often encounter problems such as obtaining the kth element from the bottom , obtaining the element in the middle position , judging whether there is a ring in the linked list , judging the length of the ring , etc. and the length and position related problems.
These problems can be solved through the flexible use of dual pointers.

PS: Double pointer is a way of thinking.

id source topic answer
1 Sword Finger Offer 22 questions Kth node from the bottom in the linked list answer
2 LeetCode 876 The middle node of the linked list answer
3 LeetCode 141 Circular linked list I: Determine whether the linked list has a ring answer

Guess you like

Origin blog.csdn.net/qq_40395874/article/details/115038501