6.S095 | January IAP 2018 | Undergraduate

Programming for the Puzzled

Puzzle 9: The Disorganized Handyman

A disorganized handyman has mixed up his nuts and bolts in a bag and your task is to match them as quickly as possible. Curiously, as described in this video, a famous algorithm for sorting numbers, quicksort, provides an insight into solving this problem.

Puzzle Description

Python Code

Assignment

  • Do one or more of the exercises in The Disorganized Handyman puzzle.

Solution

Programming Constructs and Algorithmic Paradigms Covered in this Puzzle

  • In-place pivoting
  • Recursive in-place sorting

Course Info

Instructor
As Taught In
January IAP 2018
Learning Resource Types
Lecture Videos
Programming Assignments with Examples