Skip to content

Latest commit

 

History

History
7 lines (5 loc) · 261 Bytes

File metadata and controls

7 lines (5 loc) · 261 Bytes

Given a list of integers, return True if there are exactly 3 threes in the list but none of them are consecutive.

For example:

  • have_3_threes([3, 1, 3, 1, 3]) → True
  • have_3_threes([3, 1, 3, 3]) → False
  • have_3_threes([3, 4, 3, 3, 4]) → False