How Do I Optimize My KMP?

Правка en5, от coco_elon, 2016-06-03 00:40:56

NHAY is a SPOJ question involving pattern search. The Link: http://www.spoj.com/problems/NHAY/

My solution gives me TLE. Here is my code: https://ideone.com/A2N6An What are some optimizations that I can apply on my code?

Теги spoj, kmp

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en5 Английский coco_elon 2016-06-03 00:40:56 1059
en4 Английский coco_elon 2016-06-03 00:29:15 137
en3 Английский coco_elon 2016-06-03 00:27:11 143
en2 Английский coco_elon 2016-06-03 00:25:00 4 Tiny change: 'my code:\n#include' -> 'my code:\n\n\n#include'
en1 Английский coco_elon 2016-06-03 00:24:24 1277 Initial revision (published)