Skip to content

Latest commit

 

History

History
6 lines (5 loc) · 265 Bytes

File metadata and controls

6 lines (5 loc) · 265 Bytes

Given an int list length 3, if there is a 2 in the list immediately followed by a 3, set the 3 element to 0. Return the changed list.

For example:

  • fix23([1, 2, 3])[1, 2, 0]
  • fix23([2, 3, 5])[2, 0, 5]
  • fix23([1, 2, 1])[1, 2, 1]