Can someone pls explain what is “longest prefix” in the problem statement of COMPILER . It is a stack based question
Question link please.
1 Like
Assuming you meant the CodeChef problem, the longest prefix refers to the longest string of brackets from the start which make proper sense in Lira’s language. It may be possible that its length is 0. Also, note that its length will always be even. Hope that helps you.
Thanks a ton!!
Oh really sorry , I’m a newbie ,so forgot to add the link https://www.codechef.com/MAY14/problems/COMPILER