What is the difference between Set and Array in Ruby except for the fact that sets keep unique elements while arrays can keep duplicate elements?>
Set
Array
For me the main difference is that Sets are implemented as hashes, so you have O(1) membership tests for elements.
O(1)