Skip to content

Commit cf46d45

Browse files
author
0x01f7
committed
style: update comments
1 parent f15e4b4 commit cf46d45

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

algorithms/find_median_from_data_stream.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ def initialize
7777
@minpq = PriorityQueue.new(->(x1, x2) { x1 < x2 })
7878
end
7979

80-
# @param {integer} num
81-
# @return {void}
80+
# @param {Integer} num
81+
# @return {Void}
8282
# Adds a num into the data structure.
8383
def add_num(num)
8484
if @maxpq.empty?
@@ -97,7 +97,7 @@ def add_num(num)
9797
end; nil
9898
end
9999

100-
# @return {double}
100+
# @return {Float}
101101
# Returns median of current data stream
102102
def find_median
103103
@maxpq.size == @minpq.size ? (@maxpq.peek + @minpq.peek).fdiv(2) : @maxpq.peek

0 commit comments

Comments
 (0)