BMW Group interview question

Basically, around the coding task on how I solved the problem and alternative approaches.