Samsung Electronics interview question

Simple array and data structure questions