Skip to content

Instantly share code, notes, and snippets.

@tmcgann
Last active August 19, 2019 20:14
Show Gist options
  • Save tmcgann/2276011d1b5afc1123794405efc53dc1 to your computer and use it in GitHub Desktop.
Save tmcgann/2276011d1b5afc1123794405efc53dc1 to your computer and use it in GitHub Desktop.
A code challenge designed for a mid-level software engineer

Heavenly Shaved Ice

Problem

You own and operate an automated shaved ice shack called Heavenly Shaved Ice. When a customer picks a menu item the system needs to look up the recipe to fulfill the customer's order.

Code Challenge

Design a program that will yield the correct recipe (i.e. ingredient names and quantities) when given a specific recipe by name.

Ingredients:

  • Strawberry
  • Coconut
  • Lemon
  • Mango
  • Pineapple
  • Guava

Recipes:

  • Tiger's Blood: 2 pumps strawberry, 1 pump coconut
  • Strawberry Lemonade: 1 pump strawberry, 1 pump lemon
  • Paradise Island: 1 pump mango, 1 pump pineapple, 1 pump coconut, 1 pump guava

Expectations

  • Assume infinite inventory (i.e. ingredients)
  • More than one way to solve the problem
  • Think out loud; talk through your solution as you think about it
  • Focus on pieces of the problem you know how to solve based on your experience
  • Ask clarifying questions about the problem
  • Pseudo-code or real code; goal isn't to have a totally functioning solution
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment