Sign up for free to use this document yourself.
  • algorithm

  • 二分查找

    • default

      left = 0
      right = len(s)
      while left < right:
          mid = left + (right - left) // 2
    • fff

    {"cards":[{"_id":"55c66ced2f8977730c000015","treeId":"55c66cfd2f8977730c000013","seq":19285133,"position":1,"parentId":null,"content":"# algorithm\n"},{"_id":"55c66a102f8977730c000018","treeId":"55c66cfd2f8977730c000013","seq":19285136,"position":2,"parentId":null,"content":"## binary search\n二分查找"},{"_id":"55c6697a2f8977730c000019","treeId":"55c66cfd2f8977730c000013","seq":19285147,"position":3,"parentId":"55c66a102f8977730c000018","content":"# default \n\n left = 0\n right = len(s)\n while left < right:\n mid = left + (right - left) // 2\n"},{"_id":"55c65f782f8977730c00001a","treeId":"55c66cfd2f8977730c000013","seq":19285148,"position":4,"parentId":"55c66a102f8977730c000018","content":"fff"}],"tree":{"_id":"55c66cfd2f8977730c000013","name":"algorithm","publicUrl":"algorithm"}}