Real-world problems

Many problems in the real world use the two pointers pattern. Let’s look at an example.

Does your problem match this pattern?

Yes, if all of these conditions are fulfilled: