All soln written in C++
All the soln are under the res function which might call some other helper functions
The main function might not be right i havent ran the code i have just written sample stuff
All these soln might not be the best ones but i have put down wtever works, some of them are the best practices and some of them are just brute force. As the difficulty of the problem increases automatically the best practices will come into picture.
If u find any errors in the main fucntions or doubts u can use the discussion forms.Will try my best to answer all of them.