I am getting no output. On CB IDE, I am getting TLE.
In my opinion of the code,
Space Complexity = O(N)
and Time Complexity = O(2N).
Is it Correct?
I did this in this way as there were no constraints…
Is there any better approach?
the link of my code :