When I submitted my code, it showed time limit exceeded. I have encountered this for the first time and I know my code is correct. What should I do to get AC?
you have to code your program so that it can perform 10^7 or under that operation per second ,for that you have to learn time complexity .
I am giving you link of two video by codedigger and aditya verma respectively you must watch that , so that your doubt get cleared
code digger - TIME COMPLEXITY: Competitive Programming From scratch [ lecture 2 ] | (HINDI) [ 2020] - YouTube
aditya verma- Significance Of The Constraints | How To Solve Any Coding Problem In Your Interview Part 2 - YouTube