[Uber面经】Number of Valid Parenthesis Uber 电面 数据岗

兔精精 2020-7-27 658


For given n find the number of valid combinations of valid parenthesis.I told him direct formula of Catalan number(becuase i encountered this prob earlier) but he specifically wanted this problem Solution using dynamic programming and wanted working solution with explanation with Test cases.I didn't managed to get to the working solution. Eg n=1 valid par=0 n=2 valid par=1

最新回复 (0)
返回