mirror of
https://github.com/krahets/hello-algo.git
synced 2025-12-19 07:17:54 +08:00
Update ts code and docs
This commit is contained in:
@@ -97,7 +97,7 @@ comments: true
|
||||
|
||||
```typescript title="leetcode_two_sum.ts"
|
||||
function twoSumBruteForce(nums: number[], target: number): number[] {
|
||||
let n = nums.length;
|
||||
const n = nums.length;
|
||||
// 两层循环,时间复杂度 O(n^2)
|
||||
for (let i = 0; i < n; i++) {
|
||||
for (let j = i + 1; j < n; j++) {
|
||||
|
||||
Reference in New Issue
Block a user