Intern Track Roadmap

Algorithms: pseudo-code

This course covers algorithms and how to describe them in pseudocode before writing Ruby. It defines an algorithm by three properties: finiteness, definiteness and effectiveness. It presents pseudocode conventions, common patterns and the three control structures. Linear and binary search are compared, along with database indexes in Rails. Bubble sort and selection sort are contrasted with the sorts used in production. Big-O notation, time and space tradeoffs and the N+1 query problem follow. A six-step workflow from problem statement to tested Ruby code closes the course.

What you'll learn

  • ✓The three properties of an algorithm and the difference from a heuristic
  • ✓Pseudocode conventions and the accumulator, finder, collector and transformer patterns
  • ✓Sequence, selection, iteration and guard clauses
  • ✓Linear search, binary search and database indexes in Rails
  • ✓Bubble sort, selection sort and sort stability in Ruby
  • ✓Big-O notation and a six-step workflow from pseudocode to Ruby
Free preview · Lesson 1 4 min read

What is an algorithm?

An algorithm is a precise, finite sequence of well-defined steps that solves a specific problem or performs a specific task.

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...