Skip to content

Instantly share code, notes, and snippets.

View AdelBeit's full-sized avatar

Adele Beitvashahi AdelBeit

View GitHub Profile
#
# @lc app=leetcode id=300 lang=python3
#
# [300] Longest Increasing Subsequence
#
from typing import List
# @lc code=start
#
# @lc app=leetcode id=139 lang=python3
#
# [139] Word Break
#
from typing import List
# @lc code=start
class Solution:
#
# @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
#
# @lc app=leetcode id=413 lang=python3
#
# [413] Arithmetic Slices
#
from typing import List
# @lc code=start
#
# @lc app=leetcode id=5 lang=python3
#
# [5] Longest Palindromic Substring
#
# @lc code=start
class Solution:
def longestPalindrome(self, s: str) -> str:
#
# @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
#
# @lc app=leetcode id=45 lang=python3
#
# [45] Jump Game II
#
from typing import List
# @lc code=start
class Solution:
#
# @lc app=leetcode id=55 lang=python3
#
# [55] Jump Game
#
from typing import List
# @lc code=start
class Solution:
#
# @lc app=leetcode id=213 lang=python3
#
# [213] House Robber II
#
from typing import List
# @lc code=start
class Solution:
#
# @lc app=leetcode id=79 lang=python3
#
# [79] Word Search
#
from typing import List
from collections import deque
# @lc code=start