From 543285d87b57bac50c16300716c2653fafb8b8df Mon Sep 17 00:00:00 2001 From: juan Date: Sun, 4 Sep 2022 13:41:08 +0800 Subject: [PATCH] vault backup: 2022-09-04 13:41:08 --- .obsidian/plugins/obsidian-style-settings/data.json | 3 ++- .../pages/Leetcode Non-Overlapping-Intervals.md | 13 ++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.obsidian/plugins/obsidian-style-settings/data.json b/.obsidian/plugins/obsidian-style-settings/data.json index e0bd1e1..afb4657 100644 --- a/.obsidian/plugins/obsidian-style-settings/data.json +++ b/.obsidian/plugins/obsidian-style-settings/data.json @@ -8,5 +8,6 @@ "obsidian-prism-theme@@pt-hide-view-header": false, "obsidian-prism-theme@@accent-style-dt": "pt-accent-style-borderandfilled-dt", "obsidian-prism-theme@@accent-style-lt": "pt-accent-style-borderandfilled-lt", - "obsidian-prism-theme@@background-type-lt": "pt-background-default-lt" + "obsidian-prism-theme@@background-type-lt": "pt-background-default-lt", + "obsidian-prism-theme@@light-mark-highlight-style": "pt-highlight-style-filled-lt" } \ No newline at end of file diff --git a/OJ notes/pages/Leetcode Non-Overlapping-Intervals.md b/OJ notes/pages/Leetcode Non-Overlapping-Intervals.md index 06c5acf..5300cb8 100644 --- a/OJ notes/pages/Leetcode Non-Overlapping-Intervals.md +++ b/OJ notes/pages/Leetcode Non-Overlapping-Intervals.md @@ -4,7 +4,7 @@ > ##### Algorithms: > -> #algorithm +> #algorithm #greedy > > ##### Data structures: > @@ -12,7 +12,7 @@ > > ##### Difficulty: > -> #coding_problem #difficulty- +> #coding_problem #difficulty-medium > > ##### Additional tags: > @@ -61,7 +61,14 @@ Given an array of intervals `intervals` where `intervals[i] = [starti, endi]`, r ### Thoughts > [!summary] -> This is a #template_remove_me +> This is a #greedy problem, similar to [[Leetcode Merge-Intervals]] + +#### Key concept: + +first sort the intervals. + +pick the intervals with smallest end, which will allow us to +make more room for following ones. ### Solution