CNH Industrial interview question

1 DSA Question and basic OOPs concept