Jump to content

Talk:Algorithm

Page contents not supported in other languages.
From Simple English Wikipedia, the free encyclopedia

The ip that changed the first paragraph was me, so any comment my way please. Tryx 04:36, 30 November 2007 (UTC)[reply]

Please post only simple english. It is very difficult to understand the complex words you have said. "any comment my way please" is not at all simple. Thank you.

Sorting by numbers

I think the algorithm sorting by numbers does not work. You go through the all cards one time and the biggest card is on the top of stack B but after that all it does is the cards under the top one just go backwards, like 4213 4312 4213 4312 forever. If you want it to work, every time when all the cards are in stack B you have to take off the card from on top of stack B and put it in stack C or something and then you move stack B to stack A. Then when all the cards are in stack C they are sorted. Teenly 21:16, 5 March 2009 (UTC)[reply]

Thanks, Teenly; this is in fact an error; I need think about solving this. If you start with 4213 (top of stack at the left) you end up with 4312 at the end of the first run (4-42-412-4312 on Stack B); a second run gives you 4213 at the end (4-43-413-4213) - which is what we started out at the beginning. I'll think about it, and get back. --Eptalon (talk) 22:27, 5 March 2009 (UTC)[reply]
Following this discovery, I have replaced the Sorting by numbers algorithm. I hope it works now. --Eptalon (talk) 09:01, 6 March 2009 (UTC)[reply]