x Turn on thread page Beta
 You are Here: Home >< Maths

# D1 finding maximum number of comparisons in a bubble sort ambiguous watch

Q2B

Are what edexcel alluding to is:

12 -> 6 -> 3 -> 1

Therefore 4 comparisons?

thnx
2. Which question is the bubble sort one?
3. (Original post by NotNotBatman)
Which question is the bubble sort one?
2b it is binary not bubble.

D1 will do that to you
4. You can divide the number of items by 2 until the result is <1 and the number of times you divided it is the number of comparisons.
I usually just put it in my calculator and count.

it's because if you have 11 names, you'll have two sublists one with 6 names and one with 5 names and for the max number of comparisons you delete the list with 5 names. And you would always delete the list with less names for max comparisons.
5. (Original post by NotNotBatman)
You can divide the number of items by 2 until the result is <1 and the number of times you divided it is the number of comparisons.
I usually just put it in my calculator and count.

it's because if you have 11 names, you'll have two sublists one with 6 names and one with 5 names and for the max number of comparisons you delete the list with 5 names. And you would always delete the list with less names for max comparisons.

Thank you perfect.

TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

This forum is supported by:
Updated: March 17, 2016
Today on TSR

### Did he block me?

What should I do?

Poll
Useful resources

### Maths Forum posting guidelines

Not sure where to post? Read the updated guidelines here

### How to use LaTex

Writing equations the easy way

### Study habits of A* students

Top tips from students who have already aced their exams