Skip to content

Sockets - Shubha - #23

Open
shubha-rajan wants to merge 1 commit into
Ada-C11:masterfrom
shubha-rajan:master
Open

shubha-rajan wants to merge 1 commit into
Ada-C11:masterfrom
shubha-rajan:master

Conversation

@shubha-rajan

Copy link
Copy Markdown

No description provided.

@jillirami

Copy link
Copy Markdown

I wasn't sure on the logic of "!array1" until I read your comment on my pull request. Your code broke down the requirements of the question cleanly, and it is easy for me to read and understand. So great!!!

Comment thread lib/array_equals.rb
if !array1 && !array2
return true
elsif !array1 || !array2
return false

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is a handy thing to learn when working with logic: https://thepugautomatic.com/2012/09/de-morgans-laws-in-programming/

!(array1 && array2) == (!array1 || !array2) being equivalent means they can be written and convey the same outcomes.

Comment thread lib/array_equals.rb
else
return false
end
return true

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice work on your code! Very clear and easy to read.

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.

3 participants