Question-Importance Of Time

All test cases are passing but is the approach correct ?

@nileshgupta757 Yes your approach is correct

Okay !
Thanks a lot !