I wanted call out couple points at first.
1. It is still a start up and don't know how to interview people.
2. Interviewer simply throw a problem and watch the fun rather than understanding the code or providing hints to access the candidate.
3. Interviewer expects you to run your code on hacker-rank tool and also expects you to write unit test cases.
4. Given the one hour time, its not possible for someone to write working code along with test cases.
Stay away from this company until the mature enough and understand how to conduct interview.
I work at FAANG, interviewed 100s of candidates, coached many engineers on how to interview and also attended 50+ interviews in my career, this is the *worst* experience I had.