Bosch interview question

Time complexity, overwriting C++ classes, basic problem to solve in any language (I chose Python)