From my experience, they weren't puzzles. They were pretty straightforward to do if you are familiar with arrays and hashes/dictionaries and when to use which.
Mine were different, the solution to one was literally "return len(x) - x.count(a)". If you didn't realize that, you spent an hour battling off-by-one errors.