JavaScript Required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
Skip to content
soln standardAlgorithm
sqa past papers
Algorithm Exercises
More
Share
Explore
Algorithm Exercises
solutions to formative exercises for standard algorithms
data structure
competitor
:
name
,
category
,
score, penalty
: 200 competitors
Senga Jones,Senior,67,-2
Agnes Adam,Junior,88,0
Raquel Heeks,Adult,92,0
Meriel Harverson,Senior,47,-1
Data structure tasks
declare as parallel arrays
declare as record-type and an array of records
find max / min
procedure to display name and category of person with biggest penalty (min value): parallel arrays
function to return position of junior member with highest score : parallel array
function to return name of player in a category input by user with best final points (score + penalty) array of records
count occurrence
procedure to count the number of adults, juniors and seniors: parallel arrays
function to return number of members with no penalty points in a category entered by user : array of records
search
procedure to find a penalty value entered by the user, display all properties of the member, parallel arrays
function to return position of a member where name is entered by user : array of records must be an efficient search
save a copy
procedure to save a copy of only the Senior and Adult competitors with an event ID and the final points where
the event ID is the first letter of the category, the first 3 letter and last three letters of name
the final points is the score + penalty
example
Sen
ga Jo
nes
,
S
enior,67,-2 would be saved as S-Sen-nes,65
data structure
find max / min
count occurrence
search
save a copy
Related Docs
Public Neurodiversity Support Center
Mykola Bilokonsky
Expanding what’s possible for startups and students
Coda
Assignment Tracker
Jason Sol
Apply for the Coda Growth Fellowship!
Trustin Yoon
Coda's Employee Resource Group Playbook
Rachel Colson
The Homework Nag Eliminator For Students & Parents Template
Gretchen Teagarden
LaTeX Math Reference
Oleg Vaskevich
Amplify Accelerator Open Source Learning Lab
Lars Schmidt
Lorem Ipsum Anything
Justin Hales
Law School Admissions Checklist and Results Tracker Template
David Busis
Codex: Coda Maker Community
Terry Strickland
Grade calculator
Jeremy Olson
Flashcard App with Spaced Repetition
Gil Goldshlager
How to Build a DIY Kids Sandbox [+ Pictures]
Lane Shackleton
School Notebook
Justin Hales
Related Categories
Education
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
Ctrl
P
) instead.