Add Dart codes to the documents. (#529)

This commit is contained in:
Yudong Jin
2023-06-02 02:40:26 +08:00
committed by GitHub
parent 041a989d33
commit 025051c81b
38 changed files with 849 additions and 96 deletions

View File

@@ -24,6 +24,7 @@ int findOne(List<int> nums) {
// 当元素 1 在数组尾部时,达到最差时间复杂度 O(n)
if (nums[i] == 1) return i;
}
return -1;
}
@@ -36,5 +37,6 @@ int main() {
print('\n数组 [ 1, 2, ..., n ] 被打乱后 = $nums');
print('数字 1 的索引为 + $index');
}
return 0;
}