Skip to main content
6 of 7
added 107 characters in body
Noodle9
  • 20.4k
  • 3
  • 23
  • 47

Python 3, 72 \$\cdots\$ 46 43 bytes

Saved 7 bytes thanks to the man himself Arnauld!!!
Saved 3 bytes thanks to dingledooper!!!

f=lambda l:l>[]!=1/len(l)>=l.pop()and-~f(l) 

Try it online!

Assumes the input is sorted from highest to lowest.

Noodle9
  • 20.4k
  • 3
  • 23
  • 47