mission-peace / interview

Interview questions
Apache License 2.0
11.08k stars 5.17k forks source link

Index access out of range in regex expression matching implementation. #283

Open jyj407 opened 4 years ago

jyj407 commented 4 years ago

[j - 2] [i - 2] access must be guarded by pattern.size() >= 2 to prevent index out of range error.