In this question https://codeforces.net/contest/1367/problem/C for the same algorithm I tried 2 different approaches
- Using function link: https://codeforces.net/contest/1367/submission/84101002
- 2.Without using function link: https://codeforces.net/contest/1367/submission/84126840 If I am using the function then I am getting TLE and if I'm not using the function I'm gettig AC. Why so?
There was problem in way you input the string in the first code..
Fixed code: https://codeforces.net/contest/1367/submission/84132869