You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
写成 i += gap 说明理解不到位
当 gap 为1时,i += gap 没问题;
当 gap 大于1时,for (let i = gap; i < len; i += gap) 直到循环结束只处理了1组数据而已,但实际上有 gap 组数据。其它组数据怎么遍历呢?就是把 i += gap 改为 i++。i++ 可以保证 i 之前的数据,在它们各自的分组里面,都已经处理过了。
for(let i = gap; i < len; i +=gap) {
The text was updated successfully, but these errors were encountered: