Skip to content

Commit 2570777

Browse files
runtime complexity >>> time complexity
1 parent b3bab72 commit 2570777

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/coin_change.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
approach).
1212
1313
Both the dynamic programming (bottom-up) and memoization (top-down) solutions
14-
have O(S * n) runtime complexity where 'S' is the amount and 'n' is the number
15-
of coins.
14+
have O(S * n) time complexity where 'S' is the amount and 'n' is the number of
15+
coins.
1616
1717
This problem should not be confused with the coin change problem where you need
1818
to find the number of different ways to make up an amount using the given coins

src/flood_fill.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
if (0 <= i < m and 0 <= j < n):
4444
...
4545
46-
This solution has O(n) runtime complexity and O(n) space complexity, since, in
47-
the worst case, we will need to visit every pixel in the image.
46+
This solution has O(n) time complexity and O(n) space complexity, since, in the
47+
worst case, we will need to visit every pixel in the image.
4848
"""
4949

5050
from collections import deque

src/linked_list_cycle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
See: https://en.wikipedia.org/wiki/Cycle_detection
1212
13-
This solution has O(n) runtime complexity and O(1) space complexity.
13+
This solution has O(n) time complexity and O(1) space complexity.
1414
"""
1515

1616
from src.classes import ListNode

src/maximum_subarray.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
https://leetcode.com/problems/maximum-subarray
55
66
NOTES
7-
* This problem can be solved in O(n) runtime complexity and O(1) space
7+
* This problem can be solved in O(n) time complexity and O(1) space
88
complexity using Kadane's algorithm.
99
1010
The key insight is that at each position (i), you only need to decide whether

0 commit comments

Comments
 (0)