Блог пользователя Aint_Stain

Автор Aint_Stain, история, 10 лет назад, По-английски

Can anyone give me suggestion about approach to Two pointer.Good Articles, Video link,Or good description!!

  • Проголосовать: нравится
  • +2
  • Проголосовать: не нравится

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

First,you can read a very good book:_Introduction to Algorithms_,it has this algorithm,and you can consult this blog or this one,too.After Basic understanding two pointers,you can practise with some problems.Such as uva 1121,Poj 3320 or 2566,codeforces 264A or 190D.And then I think you will learn it well.Come on !^_^

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Is quicksort's partition technique also considered two-pointer? In that case, I found this nice problem, I'd call it a 3 pointer — try to solve it O(n) time one pass with O(1) memory: https://leetcode.com/problems/sort-colors/