Skip to content

Commit ccff480

Browse files
committed
added time and space complexity as a comment at the top of thef ile
1 parent 09656cd commit ccff480

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

typescript/0295-find-median-from-data-stream.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Time Complexity: O(logn)
3+
* Space Complexity: O(n)
4+
*/
5+
16
class MedianFinder {
27
public minHeap;
38
public maxHeap;

0 commit comments

Comments
 (0)