Yep, that's what I put. Was only that or selection anyway.AE86 said:I choose insertion too because it's sorted passes are always ordered for each pass and doesn't necessarily need to look at all the thousands of elements in one pass
didn't see this post, I was thinking that bubble and selection are quite similar, considering they both have to keep on passing through the arrayraidan said:I did selection sort for that one, basically said that because it only technically needs to go through the algorithm 1 time, whereas the bubble sort has to keep going back through the algorithm until all the high numbers have been swapped around till they are at the back of the array. I cant remember what my argument about insetion sort was, i think it was pretty lame though. I dont expect to go that well for that question, sorta BS'd
yes a chance of 1/2 to get it right, great odds huh lolMedNez said:Yep, that's what I put. Was only that or selection anyway.
it is the same amount of searches but it has to search through all 10,000 elements to find the next max value, where as an insertion only needs to shuffle it doesnt need to go through all 10,000 elements to find the max then go through all 9,999 to find the next max, etc etcJebu said:As i just said in another thread, insertion will start with 0+1+2+3+...+9,999 as with each pass the sorted area grows, and comparisons have to be made with it. Alternatively, with selection sort the first pass will take 10,000, then 9,999....1 (as the sorted area does not have to be checked, the value simply has to be swapped into the first unsorted position) etc.. down to 1. Hence same amount of searches? or is it just me who sees this logic?
binary search ?? ehhhhh lolPoP 'n' Fresh said:i said insertion, but seeing as it was a huge array, i changed it slightly so it did a binary search to place the element in the required position??? wtf that doesnt make sense now i dont think... its ordered.... argh my brain