# quick sort algorithmWatch

#1
hey im just writing out some notes for mates of mine on algorithms from D1 and i'm writing up on the quick sort algorithm but i was wondering what the best way to set out the answer was?

if i was to use the quick sort method whats the neatest way to write out my method?
0
10 years ago
#2
Ages since I did D1, but I'll try and help. Do it line by line. Neatness is the key here. It's very easy to make it messy. Do you have the Heinaman D1 Book? (The Purple one. May have spelled it wrong.) That layout is pretty good, and it's the one I use. And leave a large enough gap underneath each step so it's clear what begins where.
0
#3
(Original post by Aloysius)
Ages since I did D1, but I'll try and help. Do it line by line. Neatness is the key here. It's very easy to make it messy. Do you have the Heinaman D1 Book? (The Purple one. May have spelled it wrong.) That layout is pretty good, and it's the one I use. And leave a large enough gap underneath each step so it's clear what begins where.
i do, thats what i presumed but at the end of the example answer they have a summation of what they did - am i required to do this? or can i just re write the list? (there summation indicates all the mid points and what not)

i havent done D1 for ages as well xD

cheers
0
10 years ago
#4
Okay, just pulled out my D1 book. Hmm..

The summary at the end is just a way of explaining it in words. It's easier to remember by actually seeing the example solution they have when they explain it (just before Exercise 1B). Although, I also labeled each side of the pivot points as a Sublist (L1, L2, etc.), but that's just a personal thing.

If it gets messy (such as many terms on both sides of the pivot point), do each sublist separately and then combine it all together at the end. Sort of like how you would lay out a Binary-search. So long as it's neat, it'll still make sense.
0
X

new posts
Latest
My Feed

### Oops, nobody has postedin the last few hours.

Why not re-start the conversation?

see more

### See more of what you like onThe Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

### University open days

• University of the Arts London
MA Design: Ceramics, Furniture or Jewellery Open Day Postgraduate
Fri, 25 Jan '19
• Coventry University
Sat, 26 Jan '19
• Brunel University London
Sat, 26 Jan '19

### Poll

Join the discussion

#### Are you chained to your phone?

Yes (108)
19.78%
Yes, but I'm trying to cut back (222)
40.66%
Nope, not that interesting (216)
39.56%