Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
GarrisonJ committed May 7, 2024
1 parent a650aac commit 87dea86
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/sorted_containers/sorted_array.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def difference(other)
end
alias - difference

# Returns -1, 0, or 1 as +self+ is less than, equal to, or greater than other. For each index +i+ in +self+,
# Returns -1, 0, or 1 if +self+ is less than, equal to, or greater than other. For each index +i+ in +self+,
# evaluates +self[i] <=> other[i]+
#
# @param other [SortedArray] The other array to compare.
Expand Down Expand Up @@ -578,8 +578,8 @@ def empty?
@size.zero?
end

# Returns +true+ if +self+ and +other+ are the same size,
# and if, for each index +i+ in +self+, +self[i].eql? other[i]+
# Returns +true+ if for every element in +self+ there is a corresponding element in +other+
# that are equal using +Object#eql?+.
#
# This method is different from method +SortedArray#==+,
# which compares using method +Object#==+
Expand Down Expand Up @@ -859,12 +859,12 @@ def to_s
"SortedArray(#{to_a})"
end

# Returns an index to insert `value` in the sorted list.
# Returns an index to insert +value+ in the sorted list.
#
# If the `value` is already present, the insertion point will be before
# If the +value+ is already present, the insertion point will be before
# (to the left of) any existing values.
#
# Runtime complexity: `O(log(n))` -- approximate.
# Runtime complexity: +O(log(n))+ -- approximate.
#
# @param value [Object] The value to insert.
# @return [Integer] The index to insert the value.
Expand All @@ -879,12 +879,12 @@ def bisect_left(value)
loc(pos, idx)
end

# Returns an index to insert `value` in the sorted list.
# Returns an index to insert +value+ in the sorted list.
#
# If the `value` is already present, the insertion point will be after
# If the +value+ is already present, the insertion point will be after
# (to the right of) any existing values.
#
# Runtime complexity: `O(log(n))` -- approximate.
# Runtime complexity: +O(log(n))+ -- approximate.
#
# @param value [Object] The value to insert.
# @return [Integer] The index to insert the value.
Expand Down

0 comments on commit 87dea86

Please sign in to comment.