From 04a5dcbb3feecc6a1e091ea0629bd3f93b4861a0 Mon Sep 17 00:00:00 2001 From: juan Date: Thu, 7 Jul 2022 21:24:34 +0800 Subject: [PATCH] vault backup: 2022-07-07 21:24:34 --- .obsidian/starred.json | 2 +- CTF notes/CTF-index.md | 1 + Index.md | 3 ++- CS notes/CS-index.md => OJ notes/OJ-index.md | 0 {CS notes => OJ notes}/pages/Binary Search Algorithm.md | 0 .../pages/Floyd's Cycle Finding Algorithm.md | 0 {CS notes => OJ notes}/pages/Kadane's Algorithm.md | 0 {CS notes => OJ notes}/pages/Leetcode Valid-Parentheses.md | 0 .../pages/Leetcode Best-Time-To-Buy-And-Sell-Stock.md | 0 .../pages/Leetcode Binary-Tree-Inorder-Traversal.md | 0 .../pages/Leetcode Binary-Tree-Level-Order-Traversal.md | 0 .../pages/Leetcode Binary-Tree-Postorder-Traversal.md | 0 .../pages/Leetcode Binary-Tree-Preorder-Traversal.md | 0 .../pages/Leetcode First-Unique-Character-In-a-String.md | 0 .../pages/Leetcode Implement-Queue-Using-Stacks.md | 0 .../pages/Leetcode Insert-Into-a-Binary-Search-Tree.md | 0 .../pages/Leetcode Intersection-of-Two-Arrays-II.md | 0 {CS notes => OJ notes}/pages/Leetcode Invert-Binary-Tree.md | 0 {CS notes => OJ notes}/pages/Leetcode Linked-List-Cycle.md | 0 .../pages/Leetcode Maximum-Depth-Of-Binary-Tree.md | 0 .../Leetcode Maximum-Difference-Between-Increasing-Elements.md | 0 {CS notes => OJ notes}/pages/Leetcode Maxinum-subarray.md | 2 +- {CS notes => OJ notes}/pages/Leetcode Merge-Sorted-Array.md | 0 .../pages/Leetcode Merge-Two-Sorted-Lists.md | 0 {CS notes => OJ notes}/pages/Leetcode Pascal's-Triangle.md | 0 {CS notes => OJ notes}/pages/Leetcode Path-Sum.md | 0 {CS notes => OJ notes}/pages/Leetcode Ransom-Note.md | 0 .../pages/Leetcode Remove-Duplicates-From-Sorted-List.md | 0 .../pages/Leetcode Remove-Linked-List-Elements.md | 0 {CS notes => OJ notes}/pages/Leetcode Reshape-The-Matrix.md | 0 {CS notes => OJ notes}/pages/Leetcode Reverse-Linked-List.md | 0 .../pages/Leetcode Search-In-a-Binary-Tree.md | 0 {CS notes => OJ notes}/pages/Leetcode Search-a-2D-Matrix.md | 0 {CS notes => OJ notes}/pages/Leetcode Symmetric-Tree.md | 0 {CS notes => OJ notes}/pages/Leetcode Two-Sum.md | 0 {CS notes => OJ notes}/pages/Leetcode Valid-Anagram.md | 0 {CS notes => OJ notes}/pages/Leetcode Valid-Sudoku.md | 0 {CS notes => OJ notes}/pages/Two pointers approach.md | 0 {CS notes => OJ notes}/pages/cpp_Range_based_for_loop.md | 0 {CS notes => OJ notes}/pages/cpp_std_multiset.md | 0 {CS notes => OJ notes}/pages/cpp_std_sort.md | 0 {CS notes => OJ notes}/pages/cpp_std_unordered_map.md | 0 Wiki/Notes for CS.md | 2 +- 43 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 CTF notes/CTF-index.md rename CS notes/CS-index.md => OJ notes/OJ-index.md (100%) rename {CS notes => OJ notes}/pages/Binary Search Algorithm.md (100%) rename {CS notes => OJ notes}/pages/Floyd's Cycle Finding Algorithm.md (100%) rename {CS notes => OJ notes}/pages/Kadane's Algorithm.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Valid-Parentheses.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Best-Time-To-Buy-And-Sell-Stock.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Binary-Tree-Inorder-Traversal.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Binary-Tree-Level-Order-Traversal.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Binary-Tree-Postorder-Traversal.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Binary-Tree-Preorder-Traversal.md (100%) rename {CS notes => OJ notes}/pages/Leetcode First-Unique-Character-In-a-String.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Implement-Queue-Using-Stacks.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Insert-Into-a-Binary-Search-Tree.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Intersection-of-Two-Arrays-II.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Invert-Binary-Tree.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Linked-List-Cycle.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Maximum-Depth-Of-Binary-Tree.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Maximum-Difference-Between-Increasing-Elements.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Maxinum-subarray.md (95%) rename {CS notes => OJ notes}/pages/Leetcode Merge-Sorted-Array.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Merge-Two-Sorted-Lists.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Pascal's-Triangle.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Path-Sum.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Ransom-Note.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Remove-Duplicates-From-Sorted-List.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Remove-Linked-List-Elements.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Reshape-The-Matrix.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Reverse-Linked-List.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Search-In-a-Binary-Tree.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Search-a-2D-Matrix.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Symmetric-Tree.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Two-Sum.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Valid-Anagram.md (100%) rename {CS notes => OJ notes}/pages/Leetcode Valid-Sudoku.md (100%) rename {CS notes => OJ notes}/pages/Two pointers approach.md (100%) rename {CS notes => OJ notes}/pages/cpp_Range_based_for_loop.md (100%) rename {CS notes => OJ notes}/pages/cpp_std_multiset.md (100%) rename {CS notes => OJ notes}/pages/cpp_std_sort.md (100%) rename {CS notes => OJ notes}/pages/cpp_std_unordered_map.md (100%) diff --git a/.obsidian/starred.json b/.obsidian/starred.json index 815324d..bf985fd 100644 --- a/.obsidian/starred.json +++ b/.obsidian/starred.json @@ -8,7 +8,7 @@ { "type": "file", "title": "CS-index", - "path": "CS notes/CS-index.md" + "path": "OJ notes/OJ-index.md" }, { "type": "file", diff --git a/CTF notes/CTF-index.md b/CTF notes/CTF-index.md new file mode 100644 index 0000000..851e29c --- /dev/null +++ b/CTF notes/CTF-index.md @@ -0,0 +1 @@ +# CTF-index diff --git a/Index.md b/Index.md index 10d04d1..55d6c83 100644 --- a/Index.md +++ b/Index.md @@ -13,7 +13,8 @@ ___ ## Table of contents ### Computer science notes -- [[CS-index]] +- [[OJ-index]] +- [[CTF-index]] ### Misc - [[Wiki-Index]] diff --git a/CS notes/CS-index.md b/OJ notes/OJ-index.md similarity index 100% rename from CS notes/CS-index.md rename to OJ notes/OJ-index.md diff --git a/CS notes/pages/Binary Search Algorithm.md b/OJ notes/pages/Binary Search Algorithm.md similarity index 100% rename from CS notes/pages/Binary Search Algorithm.md rename to OJ notes/pages/Binary Search Algorithm.md diff --git a/CS notes/pages/Floyd's Cycle Finding Algorithm.md b/OJ notes/pages/Floyd's Cycle Finding Algorithm.md similarity index 100% rename from CS notes/pages/Floyd's Cycle Finding Algorithm.md rename to OJ notes/pages/Floyd's Cycle Finding Algorithm.md diff --git a/CS notes/pages/Kadane's Algorithm.md b/OJ notes/pages/Kadane's Algorithm.md similarity index 100% rename from CS notes/pages/Kadane's Algorithm.md rename to OJ notes/pages/Kadane's Algorithm.md diff --git a/CS notes/pages/Leetcode Valid-Parentheses.md b/OJ notes/pages/Leetcode Valid-Parentheses.md similarity index 100% rename from CS notes/pages/Leetcode Valid-Parentheses.md rename to OJ notes/pages/Leetcode Valid-Parentheses.md diff --git a/CS notes/pages/Leetcode Best-Time-To-Buy-And-Sell-Stock.md b/OJ notes/pages/Leetcode Best-Time-To-Buy-And-Sell-Stock.md similarity index 100% rename from CS notes/pages/Leetcode Best-Time-To-Buy-And-Sell-Stock.md rename to OJ notes/pages/Leetcode Best-Time-To-Buy-And-Sell-Stock.md diff --git a/CS notes/pages/Leetcode Binary-Tree-Inorder-Traversal.md b/OJ notes/pages/Leetcode Binary-Tree-Inorder-Traversal.md similarity index 100% rename from CS notes/pages/Leetcode Binary-Tree-Inorder-Traversal.md rename to OJ notes/pages/Leetcode Binary-Tree-Inorder-Traversal.md diff --git a/CS notes/pages/Leetcode Binary-Tree-Level-Order-Traversal.md b/OJ notes/pages/Leetcode Binary-Tree-Level-Order-Traversal.md similarity index 100% rename from CS notes/pages/Leetcode Binary-Tree-Level-Order-Traversal.md rename to OJ notes/pages/Leetcode Binary-Tree-Level-Order-Traversal.md diff --git a/CS notes/pages/Leetcode Binary-Tree-Postorder-Traversal.md b/OJ notes/pages/Leetcode Binary-Tree-Postorder-Traversal.md similarity index 100% rename from CS notes/pages/Leetcode Binary-Tree-Postorder-Traversal.md rename to OJ notes/pages/Leetcode Binary-Tree-Postorder-Traversal.md diff --git a/CS notes/pages/Leetcode Binary-Tree-Preorder-Traversal.md b/OJ notes/pages/Leetcode Binary-Tree-Preorder-Traversal.md similarity index 100% rename from CS notes/pages/Leetcode Binary-Tree-Preorder-Traversal.md rename to OJ notes/pages/Leetcode Binary-Tree-Preorder-Traversal.md diff --git a/CS notes/pages/Leetcode First-Unique-Character-In-a-String.md b/OJ notes/pages/Leetcode First-Unique-Character-In-a-String.md similarity index 100% rename from CS notes/pages/Leetcode First-Unique-Character-In-a-String.md rename to OJ notes/pages/Leetcode First-Unique-Character-In-a-String.md diff --git a/CS notes/pages/Leetcode Implement-Queue-Using-Stacks.md b/OJ notes/pages/Leetcode Implement-Queue-Using-Stacks.md similarity index 100% rename from CS notes/pages/Leetcode Implement-Queue-Using-Stacks.md rename to OJ notes/pages/Leetcode Implement-Queue-Using-Stacks.md diff --git a/CS notes/pages/Leetcode Insert-Into-a-Binary-Search-Tree.md b/OJ notes/pages/Leetcode Insert-Into-a-Binary-Search-Tree.md similarity index 100% rename from CS notes/pages/Leetcode Insert-Into-a-Binary-Search-Tree.md rename to OJ notes/pages/Leetcode Insert-Into-a-Binary-Search-Tree.md diff --git a/CS notes/pages/Leetcode Intersection-of-Two-Arrays-II.md b/OJ notes/pages/Leetcode Intersection-of-Two-Arrays-II.md similarity index 100% rename from CS notes/pages/Leetcode Intersection-of-Two-Arrays-II.md rename to OJ notes/pages/Leetcode Intersection-of-Two-Arrays-II.md diff --git a/CS notes/pages/Leetcode Invert-Binary-Tree.md b/OJ notes/pages/Leetcode Invert-Binary-Tree.md similarity index 100% rename from CS notes/pages/Leetcode Invert-Binary-Tree.md rename to OJ notes/pages/Leetcode Invert-Binary-Tree.md diff --git a/CS notes/pages/Leetcode Linked-List-Cycle.md b/OJ notes/pages/Leetcode Linked-List-Cycle.md similarity index 100% rename from CS notes/pages/Leetcode Linked-List-Cycle.md rename to OJ notes/pages/Leetcode Linked-List-Cycle.md diff --git a/CS notes/pages/Leetcode Maximum-Depth-Of-Binary-Tree.md b/OJ notes/pages/Leetcode Maximum-Depth-Of-Binary-Tree.md similarity index 100% rename from CS notes/pages/Leetcode Maximum-Depth-Of-Binary-Tree.md rename to OJ notes/pages/Leetcode Maximum-Depth-Of-Binary-Tree.md diff --git a/CS notes/pages/Leetcode Maximum-Difference-Between-Increasing-Elements.md b/OJ notes/pages/Leetcode Maximum-Difference-Between-Increasing-Elements.md similarity index 100% rename from CS notes/pages/Leetcode Maximum-Difference-Between-Increasing-Elements.md rename to OJ notes/pages/Leetcode Maximum-Difference-Between-Increasing-Elements.md diff --git a/CS notes/pages/Leetcode Maxinum-subarray.md b/OJ notes/pages/Leetcode Maxinum-subarray.md similarity index 95% rename from CS notes/pages/Leetcode Maxinum-subarray.md rename to OJ notes/pages/Leetcode Maxinum-subarray.md index 6eb18d5..0670967 100644 --- a/CS notes/pages/Leetcode Maxinum-subarray.md +++ b/OJ notes/pages/Leetcode Maxinum-subarray.md @@ -83,7 +83,7 @@ public: ### Thoughts -This is a [[Kadane's algorithm]] problem, and the philosophy behind it id divide and conquer. +This is a [[Kadane's Algorithm]] problem, and the philosophy behind it id divide and conquer. local_max is the max accumulated number we've found, and global_max is the max local_max we've found. ```cpp local_max = max(nums[i] + local_max, nums[i]) diff --git a/CS notes/pages/Leetcode Merge-Sorted-Array.md b/OJ notes/pages/Leetcode Merge-Sorted-Array.md similarity index 100% rename from CS notes/pages/Leetcode Merge-Sorted-Array.md rename to OJ notes/pages/Leetcode Merge-Sorted-Array.md diff --git a/CS notes/pages/Leetcode Merge-Two-Sorted-Lists.md b/OJ notes/pages/Leetcode Merge-Two-Sorted-Lists.md similarity index 100% rename from CS notes/pages/Leetcode Merge-Two-Sorted-Lists.md rename to OJ notes/pages/Leetcode Merge-Two-Sorted-Lists.md diff --git a/CS notes/pages/Leetcode Pascal's-Triangle.md b/OJ notes/pages/Leetcode Pascal's-Triangle.md similarity index 100% rename from CS notes/pages/Leetcode Pascal's-Triangle.md rename to OJ notes/pages/Leetcode Pascal's-Triangle.md diff --git a/CS notes/pages/Leetcode Path-Sum.md b/OJ notes/pages/Leetcode Path-Sum.md similarity index 100% rename from CS notes/pages/Leetcode Path-Sum.md rename to OJ notes/pages/Leetcode Path-Sum.md diff --git a/CS notes/pages/Leetcode Ransom-Note.md b/OJ notes/pages/Leetcode Ransom-Note.md similarity index 100% rename from CS notes/pages/Leetcode Ransom-Note.md rename to OJ notes/pages/Leetcode Ransom-Note.md diff --git a/CS notes/pages/Leetcode Remove-Duplicates-From-Sorted-List.md b/OJ notes/pages/Leetcode Remove-Duplicates-From-Sorted-List.md similarity index 100% rename from CS notes/pages/Leetcode Remove-Duplicates-From-Sorted-List.md rename to OJ notes/pages/Leetcode Remove-Duplicates-From-Sorted-List.md diff --git a/CS notes/pages/Leetcode Remove-Linked-List-Elements.md b/OJ notes/pages/Leetcode Remove-Linked-List-Elements.md similarity index 100% rename from CS notes/pages/Leetcode Remove-Linked-List-Elements.md rename to OJ notes/pages/Leetcode Remove-Linked-List-Elements.md diff --git a/CS notes/pages/Leetcode Reshape-The-Matrix.md b/OJ notes/pages/Leetcode Reshape-The-Matrix.md similarity index 100% rename from CS notes/pages/Leetcode Reshape-The-Matrix.md rename to OJ notes/pages/Leetcode Reshape-The-Matrix.md diff --git a/CS notes/pages/Leetcode Reverse-Linked-List.md b/OJ notes/pages/Leetcode Reverse-Linked-List.md similarity index 100% rename from CS notes/pages/Leetcode Reverse-Linked-List.md rename to OJ notes/pages/Leetcode Reverse-Linked-List.md diff --git a/CS notes/pages/Leetcode Search-In-a-Binary-Tree.md b/OJ notes/pages/Leetcode Search-In-a-Binary-Tree.md similarity index 100% rename from CS notes/pages/Leetcode Search-In-a-Binary-Tree.md rename to OJ notes/pages/Leetcode Search-In-a-Binary-Tree.md diff --git a/CS notes/pages/Leetcode Search-a-2D-Matrix.md b/OJ notes/pages/Leetcode Search-a-2D-Matrix.md similarity index 100% rename from CS notes/pages/Leetcode Search-a-2D-Matrix.md rename to OJ notes/pages/Leetcode Search-a-2D-Matrix.md diff --git a/CS notes/pages/Leetcode Symmetric-Tree.md b/OJ notes/pages/Leetcode Symmetric-Tree.md similarity index 100% rename from CS notes/pages/Leetcode Symmetric-Tree.md rename to OJ notes/pages/Leetcode Symmetric-Tree.md diff --git a/CS notes/pages/Leetcode Two-Sum.md b/OJ notes/pages/Leetcode Two-Sum.md similarity index 100% rename from CS notes/pages/Leetcode Two-Sum.md rename to OJ notes/pages/Leetcode Two-Sum.md diff --git a/CS notes/pages/Leetcode Valid-Anagram.md b/OJ notes/pages/Leetcode Valid-Anagram.md similarity index 100% rename from CS notes/pages/Leetcode Valid-Anagram.md rename to OJ notes/pages/Leetcode Valid-Anagram.md diff --git a/CS notes/pages/Leetcode Valid-Sudoku.md b/OJ notes/pages/Leetcode Valid-Sudoku.md similarity index 100% rename from CS notes/pages/Leetcode Valid-Sudoku.md rename to OJ notes/pages/Leetcode Valid-Sudoku.md diff --git a/CS notes/pages/Two pointers approach.md b/OJ notes/pages/Two pointers approach.md similarity index 100% rename from CS notes/pages/Two pointers approach.md rename to OJ notes/pages/Two pointers approach.md diff --git a/CS notes/pages/cpp_Range_based_for_loop.md b/OJ notes/pages/cpp_Range_based_for_loop.md similarity index 100% rename from CS notes/pages/cpp_Range_based_for_loop.md rename to OJ notes/pages/cpp_Range_based_for_loop.md diff --git a/CS notes/pages/cpp_std_multiset.md b/OJ notes/pages/cpp_std_multiset.md similarity index 100% rename from CS notes/pages/cpp_std_multiset.md rename to OJ notes/pages/cpp_std_multiset.md diff --git a/CS notes/pages/cpp_std_sort.md b/OJ notes/pages/cpp_std_sort.md similarity index 100% rename from CS notes/pages/cpp_std_sort.md rename to OJ notes/pages/cpp_std_sort.md diff --git a/CS notes/pages/cpp_std_unordered_map.md b/OJ notes/pages/cpp_std_unordered_map.md similarity index 100% rename from CS notes/pages/cpp_std_unordered_map.md rename to OJ notes/pages/cpp_std_unordered_map.md diff --git a/Wiki/Notes for CS.md b/Wiki/Notes for CS.md index e8bcc53..39c25ac 100644 --- a/Wiki/Notes for CS.md +++ b/Wiki/Notes for CS.md @@ -5,4 +5,4 @@ 5. ```matrix[i][j]``` in scanning a 2d array. 6. figure out ```matrix[i][j]``` and ```matrix[i][n-1]``` -More can be found in [[CS-index]] \ No newline at end of file +More can be found in [[OJ-index]] \ No newline at end of file