This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # @lc app=leetcode id=15 lang=python3 | |
| # | |
| # [15] 3Sum | |
| # | |
| from tkinter import E | |
| from typing import List | |
| # @lc code=start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # @lc app=leetcode id=82 lang=python3 | |
| # | |
| # [82] Remove Duplicates from Sorted List II | |
| # | |
| from re import I | |
| from typing import Optional | |
| # @lc code=start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # @lc app=leetcode id=162 lang=python3 | |
| # | |
| # [162] Find Peak Element | |
| # | |
| from typing import List | |
| # @lc code=start | |
| class Solution: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # @lc app=leetcode id=153 lang=python3 | |
| # | |
| # [153] Find Minimum in Rotated Sorted Array | |
| # | |
| from typing import List | |
| # @lc code=start | |
| class Solution: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # @lc app=leetcode id=74 lang=python3 | |
| # | |
| # [74] Search a 2D Matrix | |
| # | |
| from typing import List | |
| # @lc code=start | |
| class Solution: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # @lc app=leetcode id=34 lang=python3 | |
| # | |
| # [34] Find First and Last Position of Element in Sorted Array | |
| # | |
| from typing import List | |
| # @lc code=start | |
| class Solution: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # @lc app=leetcode id=191 lang=python3 | |
| # | |
| # [191] Number of 1 Bits | |
| # | |
| # @lc code=start | |
| class Solution: | |
| def hammingWeight(self, n: int) -> int: | |
| # split number into two parts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # @lc app=leetcode id=120 lang=python3 | |
| # | |
| # [120] Triangle | |
| # | |
| from typing import List | |
| # @lc code=start | |
| class Solution: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # @lc app=leetcode id=198 lang=python3 | |
| # | |
| # [198] House Robber | |
| # | |
| from typing import List | |
| # @lc code=start | |
| class Solution: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # @lc app=leetcode id=70 lang=python3 | |
| # | |
| # [70] Climbing Stairs | |
| # | |
| # @lc code=start | |
| class Solution: | |
| def climbStairs(self, n: int) -> int: | |
| # dynamic programming, nuff said |