HI, yay. Awesome attempt at the challenge. Yeah, the constraints are interview based. I tried both of your solutions against sample tests and neither solutions passed.
Feel free to refactor and test against the sample tests ->
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.