Skip to content

Instantly share code, notes, and snippets.

@blindsey
Created November 13, 2012 21:43
Show Gist options
  • Save blindsey/4068596 to your computer and use it in GitHub Desktop.
Save blindsey/4068596 to your computer and use it in GitHub Desktop.
Vungle Programming Question - Miles of Tiles

You have a picture frame. You would like to decorate the frame by gluing tiles on it. The frame is a square shape.

The frame is 1 inch wide all around. The inside of the frame is a 12 by 12 inches square. The outside of the frame is 14 by 14 inches square. There are 8 tiles, each a different length (3, 4, 5, 6, 7, 8, 9 and 10 inches) which can only be used once.

14 inches
12 inches

Determine how the 8 tiles should be placed in order to cover the frame with tiles. How many different arrangements are there? Write a program that prints out all of them.

Two possibilities (always start from the upper left corner):

  • CW 10,3,9,4,8,5,7,6
  • CCW 10,3,9,4,8,5,7,6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment