From 24c64783086aff3ab65c24ae4cbc621f7ec6b4e9 Mon Sep 17 00:00:00 2001 From: krahets Date: Wed, 1 Mar 2023 03:16:47 +0800 Subject: [PATCH] build --- chapter_computational_complexity/time_complexity.md | 12 ++++++------ chapter_hashing/hash_map.md | 9 ++++++--- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/chapter_computational_complexity/time_complexity.md b/chapter_computational_complexity/time_complexity.md index b46813dec..4e182fdfd 100755 --- a/chapter_computational_complexity/time_complexity.md +++ b/chapter_computational_complexity/time_complexity.md @@ -446,7 +446,7 @@ $$ === "JavaScript" ```javascript title="" - function algorithm(n){ + function algorithm(n) { var a = 1; // +1 a += 1; // +1 a *= 2; // +1 @@ -454,7 +454,6 @@ $$ for(let i = 0; i < n; i++){ // +1(每轮都执行 i ++) console.log(0); // +1 } - } ``` @@ -469,7 +468,6 @@ $$ for(let i = 0; i < n; i++){ // +1(每轮都执行 i ++) console.log(0); // +1 } - } ``` @@ -490,13 +488,15 @@ $$ === "C#" ```csharp title="" - void algorithm(int n) { + void algorithm(int n) + { int a = 1; // +1 a = a + 1; // +1 a = a * 2; // +1 // 循环 n 次 - for (int i = 0; i < n; i++) { // +1(每轮都执行 i ++) - Console.WriteLine(0); // +1 + for (int i = 0; i < n; i++) // +1(每轮都执行 i ++) + { + Console.WriteLine(0); // +1 } } ``` diff --git a/chapter_hashing/hash_map.md b/chapter_hashing/hash_map.md index eaba30d6f..98170340b 100755 --- a/chapter_hashing/hash_map.md +++ b/chapter_hashing/hash_map.md @@ -354,15 +354,18 @@ comments: true ```csharp title="hash_map.cs" /* 遍历哈希表 */ // 遍历键值对 Key->Value - foreach (var kv in map) { + foreach (var kv in map) + { Console.WriteLine(kv.Key + " -> " + kv.Value); } // 单独遍历键 key - foreach (int key in map.Keys) { + foreach (int key in map.Keys) + { Console.WriteLine(key); } // 单独遍历值 value - foreach (String val in map.Values) { + foreach (String val in map.Values) + { Console.WriteLine(val); } ```