Samsung Electronics Interview Question

Some LeetCode-style questions of easy-medium difficulty.