You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add array to keep track of active addresses.
After buyout, calculate median price by iterating
through addresses array, indexing mapping, and adding prices to
a new array. Sort array, then find median!
This aims to solve fractional-company#3, but I am having trouble testing as it fails
a few cases.
zanussbaum
added a commit
to zanussbaum/contracts
that referenced
this issue
Sep 30, 2021
Add array to keep track of active addresses.
After buyout, calculate median price by iterating
through addresses array, indexing mapping, and adding prices to
a new array. Sort array, then find median!
This aims to solve fractional-company#3, but I am having trouble testing as it fails
a few cases.
Mean is a less effective buyout mechanism than median, but is more straightforward. Using BST or some other wizardry we should be able to use median.
The text was updated successfully, but these errors were encountered: