this is my code
hello @dhruvilcodes
check ur updated code here->
also try to solve this in o(n);
@dhruvilcodes
all test cases are passing.
pls refresh ur tab and try to submit again
thank you very much sir