Skip to content

Commit e0b058b

Browse files
author
Joseph Luce
authored
Fix run-time.
1 parent e1fb8ca commit e0b058b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

leetcode/hard/295_find_median_from_data_stream.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# 295. Find Median from Data Stream
22

33
## Sort solution
4-
- Runtime: O(Nlog(N)) for addNum() and O(1) for findMedian()
4+
- Runtime: O(log(N)) for addNum() and O(1) for findMedian(), in total O(Nlog(N))
55
- Space: O(N)
66
- N = Number of elements in array
77

@@ -35,7 +35,7 @@ class MedianFinder:
3535
```
3636

3737
## Two Heap Solution
38-
- Runtime: O(Nlog(N)) for addNum() and O(1) for findMedian()
38+
- Runtime: O(log(N)) for addNum() and O(1) for findMedian(), in total O(Nlog(N))
3939
- Space: O(N)
4040
- N = Number of elements in array
4141

0 commit comments

Comments
 (0)