[algogeeks] UVa - Gold Coins

2011-02-16 Thread Pedro Rezende
It seems to be a very easy problem, but I'm not finding an *equation *that solves it... could someone help me with the steps? Brief: A king pays 1 gold coin to a knight on the first day. 2 gold coins for the next 2 days, 3 gold coins for the next 3 days, and so on... Given a day N, how much gold

Re: [algogeeks] Re: Google Interview Question

2011-01-07 Thread Pedro Rezende
Hi all! And what could be the best way to test / debug issues like these? 2011/1/7 vaibhav agrawal agrvaib...@gmail.com @Douglas, nicely put!!! On Fri, Jan 7, 2011 at 8:37 PM, Douglas Diniz dgdi...@gmail.com wrote: Some examples, supposing you do always the same thing: 1-) You have a