mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 21:24:53 +08:00
Add missing Dart codes and fix some errors (#689)
* Add missing Dart codes and fix some errors * Update array_binary_tree.dart --------- Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
@ -20,8 +20,8 @@ void constant(int n) {
|
||||
// 常量、变量、对象占用 O(1) 空间
|
||||
final int a = 0;
|
||||
int b = 0;
|
||||
|
||||
List<int> nums = List.filled(10000, 0);
|
||||
ListNode node = ListNode(0);
|
||||
// 循环中的变量占用 O(1) 空间
|
||||
for (var i = 0; i < n; i++) {
|
||||
int c = 0;
|
||||
@ -61,7 +61,6 @@ void quadratic(int n) {
|
||||
List<List<int>> numMatrix = List.generate(n, (_) => List.filled(n, 0));
|
||||
// 二维列表占用 O(n^2) 空间
|
||||
List<List<int>> numList = [];
|
||||
|
||||
for (var i = 0; i < n; i++) {
|
||||
List<int> tmp = [];
|
||||
for (int j = 0; j < n; j++) {
|
||||
|
||||
Reference in New Issue
Block a user