阿摩線上測驗 登入

申論題資訊

試卷:110年 - 110 國立臺灣大學_碩士班招生考試_工程科學及海洋工程學研究所丁組: 計算機概論(A)#100870
科目:研究所、轉學考(插大)、學士後-計算機概論
年份:110年
排序:0

申論題內容

1.(20%) Given a string c consist of"!" and "I" symbols, for every right parenthesis there exists a matching left parenthesis, we said that string is a balanced parentheses sequ quence. For example, 612f11d4cf8b5.jpgare balanced parentheses sequence. On the other hand, 612f11f825a6a.jpg are not balanced parentheses sequence. Plcase implement a function balanced_ parenthese (seq) which takes one string seq as the parameter. The function wil return true if the string seg is a balanced parentheses sequence or false otherwise.