Code
Loading editor...
Tap Analyze to see visualization
Click Analyze to visualize
See step-by-step execution, variables, and output
Variables
Run code to see variables
Output
Console output will appear here
Click Analyze to visualize
See step-by-step execution, variables, and output
Run code to see variables
Console output will appear here
Build DP over string/pattern prefixes. Handle normal char or dot with diagonal transition, and star with either zero-occurrence or consume-one-character transitions.
Each pattern operator defines deterministic transitions from smaller prefix states, making full-match validity a DP reachability problem.
Updated Feb 2026