Time Limit error in 560D , Equivalent strings .

Revision en4, by vintage_Petr_Mitrichev, 2019-03-22 21:27:22

Hello , IN problem Equivalent string , I am using Divide and Conquer approach to solve.

I am check all four cases , left_left , right_right , left_right , right_left

by the code is giving time limit exeeded . Since we are not making more than log n divisions , why it is giving TLE and how to optimize it . Can anyone tell me .

Pseudo code

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en7 English vintage_Petr_Mitrichev 2019-03-23 02:36:26 10 Tiny change: 'Hello , IN problem [' -> 'In problem ['
en6 English vintage_Petr_Mitrichev 2019-03-22 22:52:21 8 Tiny change: 'll me . \n\n<spoil' -> 'll me . \nThanks\n\n<spoil'
en5 English vintage_Petr_Mitrichev 2019-03-22 21:57:35 3 Tiny change: ' am check all four ' -> ' am checking all four '
en4 English vintage_Petr_Mitrichev 2019-03-22 21:27:22 4 Tiny change: 'n\n~~~~~\nbool lefle' -> 'n\n~~~~~\n bool lefle'
en3 English vintage_Petr_Mitrichev 2019-03-22 21:26:23 281
en2 English vintage_Petr_Mitrichev 2019-03-22 21:25:08 23 Tiny change: 'iving TLE . Can any' -> 'iving TLE and how to optimize it . Can any'
en1 English vintage_Petr_Mitrichev 2019-03-22 21:24:41 1270 Initial revision (published)