Rivian interview question

Coding