Skip to content

Commit 9eda183

Browse files
committed
EDIT : Big-O
1 parent fbe1ac8 commit 9eda183

File tree

5 files changed

+5
-0
lines changed

5 files changed

+5
-0
lines changed

β€Žcontains-duplicate/heypaprika.pyβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Big-O μ˜ˆμƒ : O(n*k)
12
class Solution:
23
def containsDuplicate(self, nums: List[int]) -> bool:
34
num_dict = {}

β€Žhouse-robber/heypaprika.pyβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Big-O μ˜ˆμƒ : O(n)
12
class Solution:
23
def rob(self, nums: List[int]) -> int:
34
a = [0] * len(nums)

β€Žlongest-consecutive-sequence/heypaprika.pyβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Big-O μ˜ˆμƒ : O(nlog(n))
12
class Solution:
23
def longestConsecutive(self, nums: List[int]) -> int:
34
nums = sorted(list(set(nums)))

β€Žtop-k-frequent-elements/heypaprika.pyβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Big-O μ˜ˆμƒ : O(nlog(n))
12
import heapq
23
class Solution:
34
def topKFrequent(self, nums: List[int], k: int) -> List[int]:

β€Žvalid-palindrome/heypaprika.pyβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Big-O μ˜ˆμƒ : O(n)
12
class Solution:
23
def isPalindrome(self, s: str) -> bool:
34
s = "".join(s.lower().split(" "))

0 commit comments

Comments
Β (0)