docs: add comments for clarity in indices_sorted_by_descending_values method

lab3
Artem-Darius Weber 3 days ago
parent 9032b20783
commit b1d90eab30

@ -1,4 +1,7 @@
# sort by and sort разница
# enumurable isn't Module, it's Mixture. What is this?
def indices_sorted_by_descending_values(array) def indices_sorted_by_descending_values(array)
array.each_with_index.to_a array.each_with_index.to_a
.sort_by { |(element, index)| -element } .sort_by { |(element, index)| -element }

Loading…
Cancel
Save