Add cpp codes for the chapter

computational complexity, sorting, searching.
This commit is contained in:
Yudong Jin
2022-11-27 04:20:30 +08:00
parent 431a0f6caf
commit 19a4ccd86a
32 changed files with 1362 additions and 52 deletions

View File

@@ -59,7 +59,7 @@ public class space_complexity_types {
/* 平方阶 */
static void quadratic(int n) {
// 矩阵占用 O(n^2) 空间
int numMatrix[][] = new int[n][n];
int[][] numMatrix = new int[n][n];
// 二维列表占用 O(n^2) 空间
List<List<Integer>> numList = new ArrayList<>();
for (int i = 0; i < n; i++) {