Tieto interview question

example: Lifecycle of react component