We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Array#include? in loop → Set — Using Array#includes? inside a loop is O(n) per check. Use a Set for O(1) lookups.
Array#includes?
Set
large_array.each do |x| if other_array.includes?(x) ... end end
There was an error while loading. Please reload this page.