IBM interview question

only programming based question and logic based