Home > IB Computer Science 2017 > Must-know algorithms for IB Comp Sci

Must-know algorithms for IB Comp Sci

November 5, 2015 Leave a comment Go to comments

SL

  • Finding position of a specific item in a list
  • Find max/min from a list
  • Summing/averaging a list
  • Counting occurrences of a specific item in list
  • Grouping every N items, e.g. by month/week etc
  • Bubble sort

HL

  • Two-dimensional array algorithms
    • Traversing
    • Transposing
  • Binary search
  • Stack (3 methods)
  • Queue (3 methods)
  • Binary tree
    • 3 traversals
    • insert

Other standard algorithms (SL and HL)

  • Palindrome: whether an array is the same backwards as forwards
  • Rotation in place: Shifting each item in an array n places forwards with elements at the end of the array wrapping round
  • Merging sorted arrays into a single sorted array
  • Fisher-Yates shuffle: randomizing an array in place
Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s