Regular expression — Asked in Google, Flipkart and Facebook Interview

Problem Statement :

S = aa, P = a*
true

Explanation of Test Case :

Approach :

Bottom-up DP

Code :

Thanks for Reading

Upskilling students for tech placements!