Aint_Stain's blog

By Aint_Stain, history, 8 years ago, In English

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

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

| Write comment?
»
8 years ago, # |
  Vote: I like it +4 Vote: I do not like it
»
8 years ago, # |
  Vote: I like it +5 Vote: I do not like it

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 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Which writer does the book belongs?

    • »
      »
      »
      8 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      "Introduction to algorithms" by Thomas Thomas H.Cormen,Charles E.Leiserson,Ronald L.Rivest and Clifford Stein four people oversee (Clifford Stein is the second edition began to participate in co-author).

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

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/