i tried it differnt way i am unable reach lowest time complexity please help and I am running it on online compiler
cla