Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions chantal-sockets
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
def binary_to_decimal(binary_array)
raise NotImplementedError
Copy link
Collaborator

Choose a reason for hiding this comment

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

Delete this line since you're now implementing the method and you'll need this removed for the tests to pass.

decimal = 0

binary_array.reverse.each_with_index do |num, i|
decimal += (num * 2 ** i)
end
return decimal
end