Problem: [problem:1927B]↵
↵
My 1st approach:[submission:277732437] — Gave TLE on test 3↵
↵
Read editorial, understood that their approach was similar but they did not store the alphabets, they only stored the count.↵
↵
2nd submission after reading editorial:[submission:277733314] — Still gave TLE on test 3↵
↵
Tried to submit the exact code given in the editorial([submission:277733398]) — Still gave TLE on test 3↵
↵
↵
Can someone please suggest a better way of solving it?(I went through a few submissions but they did the same thing and got AC so i was confused about what was wrong in my submissions)(Or some of the other submissions which were different, i could not exactly grasp what they were trying to do/what approach they followed)
↵
My 1st approach:[submission:277732437] — Gave TLE on test 3↵
↵
Read editorial, understood that their approach was similar but they did not store the alphabets, they only stored the count.↵
↵
2nd submission after reading editorial:[submission:277733314] — Still gave TLE on test 3↵
↵
Tried to submit the exact code given in the editorial([submission:277733398]) — Still gave TLE on test 3↵
↵
↵
Can someone please suggest a better way of solving it?(I went through a few submissions but they did the same thing and got AC so i was confused about what was wrong in my submissions)(Or some of the other submissions which were different, i could not exactly grasp what they were trying to do/what approach they followed)