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=15 lang=python3
#
# [15] 3Sum
#
from tkinter import E
from typing import List
# @lc code=start
#
# @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
#
# @lc app=leetcode id=162 lang=python3
#
# [162] Find Peak Element
#
from typing import List
# @lc code=start
class Solution:
#
# @lc app=leetcode id=153 lang=python3
#
# [153] Find Minimum in Rotated Sorted Array
#
from typing import List
# @lc code=start
class Solution:
#
# @lc app=leetcode id=74 lang=python3
#
# [74] Search a 2D Matrix
#
from typing import List
# @lc code=start
class Solution:
#
# @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:
#
# @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
#
# @lc app=leetcode id=120 lang=python3
#
# [120] Triangle
#
from typing import List
# @lc code=start
class Solution:
#
# @lc app=leetcode id=198 lang=python3
#
# [198] House Robber
#
from typing import List
# @lc code=start
class Solution:
#
# @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