Skip to content

Ruby: Add code for average stream numbers#3932

Open
mayanktap wants to merge 1 commit intoOpenGenus:masterfrom
mayanktap:patch-1
Open

Ruby: Add code for average stream numbers#3932
mayanktap wants to merge 1 commit intoOpenGenus:masterfrom
mayanktap:patch-1

Conversation

@mayanktap
Copy link

Fixes issue:
This PR implements the average stream number algorithm in Ruby. The issue corresponding to this PR is: #3931

Changes:
File added: cosmos/code/mathematical_algorithms/src/average_stream_numbers/average_stream_numbers.rb

@mayanktap
Copy link
Author

Hi @AdiChat
Can you please take a look at the PR as this piece of Code is missing? Or you can assign someone to review this PR.

Let me know in case of any discrepancy.

puts avg
resultant_array << avg
end
resultant_array
Copy link
Member

Choose a reason for hiding this comment

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

What purpose does the return serve? Also, instead of printing out the average, why not yield to a block each new computed average instead?

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