LeetCode --- 1678. Goal Parser Interpretation 解题报告

Posted 杨鑫newlfe

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了LeetCode --- 1678. Goal Parser Interpretation 解题报告相关的知识,希望对你有一定的参考价值。

You own a Goal Parser that can interpret a string command. The command consists of an alphabet of "G""()" and/or "(al)" in some order. The Goal Parser will interpret "G" as the string "G""()" as the string "o", and "(al)" as the string "al". The interpreted strings are then concatenated in the original order.

Given the string command, return the Goal Parser\'s interpretation of command.

Example 1:

Input: command = "G()(al)"
Output: "Goal"
Explanation: The Goal Parser interprets the command as follows:
G -> G
() -> o
(al) -> al
The final concatenated result is "Goa

以上是关于LeetCode --- 1678. Goal Parser Interpretation 解题报告的主要内容,如果未能解决你的问题,请参考以下文章