I'm not going to take full credit for writing this program, because I wrote a majority of it from an example 800 pages ahead of my class in my C++ book. I do however understand how it's working. I wrote the program so that you can enter your own array in, versus the set array my book was using. There was also an error in the book's program. It had an issue with setting "k=0" in the initial "for" statements, i resolved them but I cannot remember what the problem with them was (I spent like 2 hours on this). There was also an error in the "quicksort" with initializing variable. It might have been a typo on my part, but again i dont remember.
The code is commented to show you that I do have understanding of what I wrote. I don't 100% know how everything works in it, but I do get what and why it's doing what it's doing.
No comments:
Post a Comment