AntInLoop

Z-Algorithm Game — Z-Array & Z-Box Challenge

Compute Z[i] prefix match lengths while tracking the sliding [L, R] Z-box window in linear O(n) time.

Time Complexity: O(n)

Study the algorithm · Watch Visualizer · All Algorithm Games