my solutions for the 3 problems

I've used C/C++ for all problems plus a JavaScript solution for the one
with the duplicates.
The problem statement had a constrain for using other datastructures. This is not an acceptable solution.