The interview was 45min long. The interviewer asked me to introduce myself and asked some behavoural questions. We then moved to the technical problem.
The question wasn't very difficult and I quickly coded the brute force solution, but I couldn't think of the optimal one and answer the follow up questions.