diff --git a/content/leetcode/2023/8.md b/content/leetcode/2023/8.md index 167b5d522..d5708802d 100644 --- a/content/leetcode/2023/8.md +++ b/content/leetcode/2023/8.md @@ -3,6 +3,33 @@ title: "2023.8" draft: false --- +# 2023.8.5 + +```python +# +# @lc app=leetcode.cn id=75 lang=python3 +# +# [75] 颜色分类 +# + +# @lc code=start +from typing import List + + +class Solution: + def sortColors(self, nums: List[int]) -> None: + """ + Do not return anything, modify nums in-place instead. + """ + for i in range(len(nums)): + for j in range(i, len(nums)): + if nums[j] < nums[i]: + nums[i], nums[j] = nums[j], nums[i] + + +# @lc code=end +``` + # 2023.8.4 ```python