Skip to content

Interview Q&A

Avery Lieu edited this page Feb 11, 2017 · 37 revisions

Coding

Easy

Medium

Hard



Brain Teasers

Easy

Sudoku Sub-Grid

Explain how you would fill in one 3x3 sub-grid in Sudoku algorithmically with each horizontal, vertical, and diagonal adding up to 15.

Example:

a b c
d e f
g h i

Horizontally:

  1. a + b + c = 15
  2. d + e + f = 15
  3. g + h + i = 15

Vertically:

  1. a + d + g = 15
  2. b + e + h = 15
  3. c + f + i = 15

Diagonally:

  1. a + e + i = 15
  2. g + e + c = 15

Explanation:

  1. Find all of the possible combinations adding up to 15

⋅⋅⋅ 1 + 9 + 5, 2 + 8 + 5, 3 + 7 + 5, 4 + 6 + 5

  1. Keep track of how many unique combinations each number can be apart of

⋅⋅⋅ In the above example, 5 is used 4 times

  1. Note how many combinations each square requires

⋅⋅⋅|3|2|3| ⋅⋅⋅|:---|:---|:---| ⋅⋅⋅|2|4|2| ⋅⋅⋅|3|2|3|

Medium

Hard



Theory/Technology

Clone this wiki locally