I have solved this question with 100% accuracy, but I am not able to calculate the Time Complexity & Space Complexity of my solution.
Can you please explain the Time & Space Complexity of my solution?
My Solution -> https://ide.codingblocks.com/s/574986