Is changing the method of using variable changes time limit ? in my first try I used global variable and updated it where needed and got AC but in second phase for a change I used pointer instead of global variable got TLE ?