Google Interview Question
Anonymous User
1286

Given a list of integers, determine if it's in a valid state based on the rules:

  1. You can form pairs [a, a] and/or
  2. You can form triplets [a, a, a] and/or
  3. You can form consecutive triplets like [1, 2, 3], [10, 11, 12].
  4. All the integers in the list have to be used.

Valid examples: [1,1,1,2,3], [1,1,2,3,4,5,6,7]

Comments (8)