Originally posted by redruM
yes but that was for your course...this was for hsc.
just trying to show how shit it was when i went to it.
they also showed the worst/best case scenario's in sorts/searches. that you dont even need to know for hsc sdd.
i mean like the O(n<sup>2</sup>) thing...
Wow. Cool. I did an assignment on 4U maths last year on that. I also built a program which demonstrates these sorting cases.
I'm sure that whilst ttalking about order of equations, they would have covered a number of things which were actually HIGHLY relevant to HSC SDD. Whilst the three algorithms that you need to know all have order or O(n^2), they have a different equation for the number of SWAPS in the three equations. Like, the bubble sort still has O(n^2) swaps/comparisons, whilst the Selection has comparisons of O(n^2) and swaps of only O(n).
Can you see why this would make the selection sort so much faster?
Can you also see why this makes for the fact that there is basically NO DIFFERENCE in speed when you are dealing with a list of very small 'n'?
If you cant, then you should learn this.
If they ask a question on sorting in your HSC, they will want you to COMPARE THE THREE ALGORITHMS. They will want you to know WHY one is faster than the other, and thus WHY this one is more suitable for whatever crappy fill-in scenario they are asking the question in the context of.
However one point, if you do happen to know about orders, dont bother writing about big-o notation in your SDD exam: you are wasting time because the marker will not know what you are talking about. (You will know too much for the purposes of SDD)
If you are a competent SDD student/programmer, then this thing will probably be useful. Especially in the future when you do have to write these things yourself.
If you dont know what you are on about, then maybe you would find things like best and worse case scenarios in sorting irrelevant and useless.
But you should probably understand that a bubble sort has a shit of a time with a worst case scenario, whilst a selection/insertion sort 'really' doesnt care what the data is and how much in order it is prior to sorting.
Personally, I cant see how any form of organised HSC study/revision/(and (hopefully not) learning for the first time) can be not worth going to. Especially if its only 30 bucks.
How long till the HSC now?