two pointers
👆👆 Two indices moving coordinatedly across an array
Technique using two moving indices.
中文对照 · Chinese
👆👆 两根手指从队伍两头同时往中间走
常用于有序数组找两数之和或判断回文串。
Code example
int l = 0, r = n - 1;Explore 100 bilingual word cards →
Technique using two moving indices.
👆👆 两根手指从队伍两头同时往中间走
常用于有序数组找两数之和或判断回文串。
int l = 0, r = n - 1;Explore 100 bilingual word cards →