Turn on thread page Beta
    • Thread Starter
    Offline

    15
    ReputationRep:
    For my project I need to store the highest scores for the game, I need a sorting algorithm to do that. I figured out that insertion sort will be the best option for that. But I could also use merge sort(or o many others) which is in band A for the programming marking criteria. What should I use???
    Offline

    20
    ReputationRep:
    Seems like very difficult stuff :/
    Offline

    13
    ReputationRep:
    If you were doing this not for coursework I'd personally use the inbuilt sorting function of whatever language you are using as this would almost certainly be the most efficient, however to score better on the complexity it'd be a good place to implement your own sorting algorithm. Looking at the mark scheme, a merge sort would probably look the most impressive as recursive algorithms are generally thought of as more complex.

    Have you covered recursive algorithms yet in the theory section of your lessons? If so you can probably easily adapt the algorithm from one of the exam questions or the teaching resources. Or you can just look up examples that other people have created. (Although the examples in the text book to me seem needlessly complex, and I prefer a method where two functions are used one for division and one for merging)
    Offline

    18
    ReputationRep:
    (Original post by Faction Paradox)
    If you were doing this not for coursework I'd personally use the inbuilt sorting function of whatever language you are using as this would almost certainly be the most efficient, however to score better on the complexity it'd be a good place to implement your own sorting algorithm. Looking at the mark scheme, a merge sort would probably look the most impressive as recursive algorithms are generally thought of as more complex.

    Have you covered recursive algorithms yet in the theory section of your lessons? If so you can probably easily adapt the algorithm from one of the exam questions or the teaching resources. Or you can just look up examples that other people have created. (Although the examples in the text book to me seem needlessly complex, and I prefer a method where two functions are used one for division and one for merging)
    In a real world scenario it wouldn't matter as you'll only have a few scores but for marks I agree with the notion that a merge sort is the best call.
    Posted on the TSR App. Download from Apple or Google Play
    Offline

    13
    ReputationRep:
    (Original post by AmmarTa)
    In a real world scenario it wouldn't matter as you'll only have a few scores but for marks I agree with the notion that a merge sort is the best call.
    Well I mean it's always good practise to make all code as efficient as possible, but yeah for small numbers of items to be sorted it probably doesn't make much odds :P
 
 
 

University open days

  1. University of Bradford
    University-wide Postgraduate
    Wed, 25 Jul '18
  2. University of Buckingham
    Psychology Taster Tutorial Undergraduate
    Wed, 25 Jul '18
  3. Bournemouth University
    Clearing Campus Visit Undergraduate
    Wed, 1 Aug '18
Poll
How are you feeling in the run-up to Results Day 2018?
Help with your A-levels

All the essentials

The adventure begins mug

Student life: what to expect

What it's really like going to uni

Rosette

Essay expert

Learn to write like a pro with our ultimate essay guide.

Uni match

Uni match

Our tool will help you find the perfect course for you

Study planner

Create a study plan

Get your head around what you need to do and when with the study planner tool.

Study planner

Resources by subject

Everything from mind maps to class notes.

Hands typing

Degrees without fees

Discover more about degree-level apprenticeships.

A student doing homework

Study tips from A* students

Students who got top grades in their A-levels share their secrets

Study help links and info

Can you help? Study help unanswered threadsRules and posting guidelines

Groups associated with this forum:

View associated groups

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Write a reply...
Reply
Hide
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.