Skip to content

Commit ba82f64

Browse files
committed
update
1 parent 90af2af commit ba82f64

File tree

172 files changed

+248
-248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+248
-248
lines changed

Python/3sum-smaller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Time: O(n^2)
22
# Space: O(1)
33

4-
class Solution:
4+
class Solution(object):
55
# @param {integer[]} nums
66
# @param {integer} target
77
# @return {integer}

Python/add-and-search-word-data-structure-design.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Time: O(min(n, h)), per operation
22
# Space: O(min(n, h))
33

4-
class TrieNode:
4+
class TrieNode(object):
55
# Initialize your data structure here.
66
def __init__(self):
77
self.is_string = False
88
self.leaves = {}
99

1010

11-
class WordDictionary:
11+
class WordDictionary(object):
1212
def __init__(self):
1313
self.root = TrieNode()
1414

Python/add-binary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Space: O(1)
33

44

5-
class Solution:
5+
class Solution(object):
66
# @param a, a string
77
# @param b, a string
88
# @return a string

Python/add-two-numbers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Time: O(n)
22
# Space: O(1)
33

4-
class ListNode:
4+
class ListNode(object):
55
def __init__(self, x):
66
self.val = x
77
self.next = None

Python/basic-calculator-ii.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Space: O(n)
33

44

5-
class Solution:
5+
class Solution(object):
66
# @param {string} s
77
# @return {integer}
88
def calculate(self, s):

Python/basic-calculator-iv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import itertools
1111

1212

13-
class Poly(collections.Counter):
13+
class Poly(collections.Counter)(object):
1414
def __init__(self, expr=None):
1515
if expr is None:
1616
return

Python/basic-calculator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Space: O(n)
33

44

5-
class Solution:
5+
class Solution(object):
66
# @param {string} s
77
# @return {integer}
88
def calculate(self, s):

Python/best-time-to-buy-and-sell-stock-ii.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Space: O(1)
33

44

5-
class Solution:
5+
class Solution(object):
66
# @param prices, a list of integer
77
# @return an integer
88
def maxProfit(self, prices):

Python/candy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import operator
55
from functools import reduce
66

7-
class Solution:
7+
class Solution(object):
88
# @param ratings, a list of integer
99
# @return an integer
1010
def candy(self, ratings):

Python/climbing-stairs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Time: O(n)
22
# Space: O(1)
33

4-
class Solution:
4+
class Solution(object):
55
"""
66
:type n: int
77
:rtype: int

0 commit comments

Comments
 (0)