Skip to content

Comment on Stochastic, Nerdtastic Restaurant Bill Splittingparent

Comments

What algorithm? I think these problems are fun.

I don't got a name for it, as it wasn't a specific algorithm being followed, I Just "solved it" by coding it. I had to do it recursively because calling it once would not give an accurate number, so it called itself until the numbers matched up :) I can share the Ruby code once I clean it up. I intend to open source the web app anyway.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.