sarva

Results 4 issues of sarva

选择排序 第二版:找到最大值 如果你想在每次内循环中找到最大值并把其交换到数组的末尾(相比较 minIndex 有点麻烦),以下是实现的代码:

当遍历一下数组没有发生交换的时候,此时数组已经完成排序,直接返回 ```js export const bubbleWithGuard = arr => { let i = arr.length - 1; while (i > 0) { let guard = true; let pos; for (let j =...

```go n := len(s) for n > 0 { // 替代 while (n > 0) {} // 这里修改为 println(s[n-1]) 较好 println(s[n]) // 替代 for (; n > 0;) {} n--...

### 问题描述 有滚动条的柱状图, 且这个滚动条默认滚动到最右侧时,在浏览器尺寸变化后,会导致部分数据未渲染 ### 重现链接 https://codesandbox.io/p/sandbox/vigilant-frog-3j9x8m?file=%2Findex.ts ### 重现步骤 1. 进入页面 2. 通过点击浏览器header 让其放大缩小, 点如下图的位置 ### 预期行为 期望正确渲染 ### 平台 - 操作系统: [macOS,] - 网页浏览器: [Google Chrome] ### 屏幕截图或视频(可选) ###...