RASEL_MEYA's blog

By RASEL_MEYA, history, 4 years ago, In English

I have been learning the two-pointer algorithm for a few days now. However, it is difficult to understand which of the two-pointer related problems in CF are more easier. So, if someone suggested a basic or simple problems related to two-points, it would be easier for me to understand the two-pointer algorithm better.

plz... suggest me, any problem link.

  • Vote: I like it
  • +4
  • Vote: I do not like it

| Write comment?
»
4 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

2 pointers is just taking a pointer called i and a pointer called j and moving it as per your logic..

There really is no other concept involved.

https://codeforces.net/problemset/problem/253/B

https://codeforces.net/contest/1036/problem/D

Use the problemset to find more

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Triplets

another good problem on twopointers/binarysearch