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=300 lang=python3 | |
| # | |
| # [300] Longest Increasing Subsequence | |
| # | |
| 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=139 lang=python3 | |
| # | |
| # [139] Word Break | |
| # | |
| 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=91 lang=python3 | |
| # | |
| # [91] Decode Ways | |
| # | |
| # @lc code=start | |
| class Solution: | |
| def numDecodings(self, s: str) -> int: | |
| # variation of fibbonacci problem |
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=413 lang=python3 | |
| # | |
| # [413] Arithmetic Slices | |
| # | |
| 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=5 lang=python3 | |
| # | |
| # [5] Longest Palindromic Substring | |
| # | |
| # @lc code=start | |
| class Solution: | |
| def longestPalindrome(self, s: str) -> str: |
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=62 lang=python3 | |
| # | |
| # [62] Unique Paths | |
| # | |
| # @lc code=start | |
| class Solution: | |
| def uniquePaths(self, m: int, n: int) -> int: | |
| # top down approach dynamic programming |
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=45 lang=python3 | |
| # | |
| # [45] Jump Game II | |
| # | |
| 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=55 lang=python3 | |
| # | |
| # [55] Jump Game | |
| # | |
| 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=213 lang=python3 | |
| # | |
| # [213] House Robber II | |
| # | |
| 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=79 lang=python3 | |
| # | |
| # [79] Word Search | |
| # | |
| from typing import List | |
| from collections import deque | |
| # @lc code=start |