Skip to content

Conversation

@JansenMartin
Copy link

No description provided.

return [] if array1 == nil || array2 == nil

# Figure out which array is longer (so longest will be sorted)
# (If they're the same, array1 will be sorted)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great comment here.

i += 1
end

# For each element in smaller array, perform binary search in sorted array

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice re-use of your binary search from previous homework. 👍

end
end

return results

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants