Qualcomm Interview Question

Some questions got straight off from leetcode and hackerrank