mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-07 06:44:57 +08:00
Add TypeScript code and docs to AVL tree and the coding style for Typescript and JavaScript (#342)
* Add TypeScript code and docs to AVL tree and update JavaScript style * Update the coding style for Typescript and JavaScript
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
|
||||
/* 生成一个数组,元素为 { 1, 2, ..., n },顺序被打乱 */
|
||||
function randomNumbers(n) {
|
||||
let nums = Array(n);
|
||||
const nums = Array(n);
|
||||
// 生成数组 nums = { 1, 2, 3, ..., n }
|
||||
for (let i = 0; i < n; i++) {
|
||||
nums[i] = i + 1;
|
||||
|
Reference in New Issue
Block a user