We discussed the sorting problem in the class.
Essentially the problem is that given a set of numbers as input, create an arrangement (permutation) of the numbers, so that each number is greater than the one before (to the right of) it.
You need to design an algorithm to do this. You can assume that there are "n" numbers.
Any algorithm is fine. Now remember, what is an algorithm: - a sequence of mechanized steps, that will get the job done for
i) any input, and in
ii) in finite time.
You can simply write down the steps in english, or write it in any programming language of your choice. I would prefer the later.
Please do this in about half a page (definitely less than a page) on your blog.
I will check the blog posts very early on the morning of Wednesday, and give scores.
See you in the class, next Wednesday.
- Aviral
No comments:
Post a Comment