notes/OJ notes/pages/Two pointers approach.md
2022-09-06 20:22:48 +08:00

1.1 KiB

Two pointers approach

2022-06-14 23:06


Algorithms:

#algorithm #two_pointers

Data structures:

#array #linked_list

Difficulty:

#CS_analysis


What is Two pointers approach?

By using two pointers, to in place modify array elements.

Why and when to use it?

  • There are two arrays, or linked lists
  • They are sorted, or operation in place will not interfere elements after.

When not use it?

Refer to this link

#TODO: complete this section