User talk:Iamseiko

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

Welcome![edit]

Hello, Iamseiko, and welcome to Wikipedia! Thank you for your contributions. I hope you like the place and decide to stay. Here are a few links to pages you might find helpful:

You may also want to take the Wikipedia Adventure, an interactive tour that will help you learn the basics of editing Wikipedia. You can visit The Teahouse to ask questions or seek help.

Please remember to sign your messages on talk pages by typing four tildes (~~~~); this will automatically insert your username and the date. If you need help, check out Wikipedia:Questions, ask me on my talk page, or click here to ask for help on your talk page, and a volunteer should respond shortly. Again, welcome! --CiaPan (talk) 07:36, 15 September 2015 (UTC)[reply]

Quicksort[edit]

I have reverted your edit in Quicksort because it was wrong. --CiaPan (talk) 07:36, 15 September 2015 (UTC)[reply]

PS.

The (pseudo)code you put was simply syntactically incorrect. See the section: there is a while True loop there, which contained one do ... while loop to decrement j, another do ... while loop to increment i.
Your do j = j - 1 looks somewhat like an incomplete loop, but it's hard to tell why it decrements j and it is completely unknown how long it should iterate.

However despite its incompleteness, the instruction to decrement j at that point simply makes the code wrong. The first do ... while loop sets appropriate value of j and decrementing it any further would bring a wrong value to a comparision in the following if i < j condition. --CiaPan (talk) 07:54, 15 September 2015 (UTC)[reply]


Oh, I get it. I was looking at it like a while loop instead of a do..while loop. I thought that only the i was being incremented, and j was not, which wouldn't have made any sense. Thanks for clearing that out for me. Iamseiko (talk) 01:40, 16 September 2015 (UTC)[reply]