my solutions for the 3 problems

I've used C/C++ for all problems plus a JavaScript solution for the one
with the duplicates.
From the problem statement `Do not use 2 nesting for loops since the time complexity would be high.`