This commit is contained in:
2026-06-05 22:32:49 +08:00
parent 14d05011d5
commit c67841fe07
202 changed files with 498 additions and 403 deletions
@@ -48,13 +48,13 @@ Explanation: Intervals [1,4] and [4,7] are considered overlapping.
Write your approach here.
** TODO Python
#+begin_src python
#+begin_src python :lc-problem 56 :lc-lang python3
class Solution:
def merge(self, intervals: List[List[int]]) -> List[List[int]]:
#+end_src
** TODO C++
#+begin_src cpp
#+begin_src cpp :lc-problem 56
class Solution {
public:
vector<vector<int>> merge(vector<vector<int>>& intervals) {
@@ -49,13 +49,13 @@ Explanation: Because the new interval [4,8] overlaps with [3,5],[6,7],[8,10].
Write your approach here.
** TODO Python
#+begin_src python
#+begin_src python :lc-problem 57 :lc-lang python3
class Solution:
def insert(self, intervals: List[List[int]], newInterval: List[int]) -> List[List[int]]:
#+end_src
** TODO C++
#+begin_src cpp
#+begin_src cpp :lc-problem 57
class Solution {
public:
vector<vector<int>> insert(vector<vector<int>>& intervals, vector<int>& newInterval) {
@@ -8,11 +8,11 @@
Write your approach here.
** TODO Python
#+begin_src python
#+begin_src python :lc-problem 252 :lc-lang python3
#+end_src
** TODO C++
#+begin_src cpp
#+begin_src cpp :lc-problem 252
#+end_src
@@ -8,11 +8,11 @@
Write your approach here.
** TODO Python
#+begin_src python
#+begin_src python :lc-problem 253 :lc-lang python3
#+end_src
** TODO C++
#+begin_src cpp
#+begin_src cpp :lc-problem 253
#+end_src
@@ -50,13 +50,13 @@ Explanation: You don&#39;t need to remove any of the intervals since they&#39;re
Write your approach here.
** TODO Python
#+begin_src python
#+begin_src python :lc-problem 435 :lc-lang python3
class Solution:
def eraseOverlapIntervals(self, intervals: List[List[int]]) -> int:
#+end_src
** TODO C++
#+begin_src cpp
#+begin_src cpp :lc-problem 435
class Solution {
public:
int eraseOverlapIntervals(vector<vector<int>>& intervals) {
@@ -48,13 +48,13 @@ Output: []
Write your approach here.
** TODO Python
#+begin_src python
#+begin_src python :lc-problem 986 :lc-lang python3
class Solution:
def intervalIntersection(self, firstList: List[List[int]], secondList: List[List[int]]) -> List[List[int]]:
#+end_src
** TODO C++
#+begin_src cpp
#+begin_src cpp :lc-problem 986
class Solution {
public:
vector<vector<int>> intervalIntersection(vector<vector<int>>& firstList, vector<vector<int>>& secondList) {
@@ -54,13 +54,13 @@ Explanation: The queries are processed as follows:
Write your approach here.
** TODO Python
#+begin_src python
#+begin_src python :lc-problem 1851 :lc-lang python3
class Solution:
def minInterval(self, intervals: List[List[int]], queries: List[int]) -> List[int]:
#+end_src
** TODO C++
#+begin_src cpp
#+begin_src cpp :lc-problem 1851
class Solution {
public:
vector<int> minInterval(vector<vector<int>>& intervals, vector<int>& queries) {