sachinjaiswal's blog

By sachinjaiswal, history, 2 years ago, In English

160347701 Could anybody please tell me why this code is working for below testcase :

1
100000
first String :- [aaaaaaa....till 50000 places] + [bbbbbbbb.... till 100000 places]
second String :- [bbbbbb....till 50000 places] + [aaaaaaa....till 100000 places]

According to the code and the testcase given ,the time complexity should be (N + (50000^2)) which should give TLE then why it is not giving TLE. Would anyone like to help me out.

  • Vote: I like it
  • +7
  • Vote: I do not like it

»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by sachinjaiswal (previous revision, new revision, compare).