-
Notifications
You must be signed in to change notification settings - Fork 0
20. Valid Parentheses.md #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -0,0 +1 @@ | |||
20. Valid Parentheses |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
コードの書き忘れでしょうか?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
まだ完成していないので終わり次第レビュー依頼に投げさせていただきます。
その際はよろしくおねがいいたします
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
失礼しました!!
(https://discord.com/channels/1084280443945353267/1201211204547383386/1202541275115425822) | ||
上の用語わからなすぎて調べる。 | ||
おそらく形式言語理論の概念を用いてこの問題を解釈している? | ||
うちの学校のカリキュラムにはないが、形式言語理論の勉強はSWEとして必須? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
多くの人が一応知っている感じはありますが、あまり聞かれないやつです。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
そうだったんですね。余力があれば勉強してみます!
20. Valid Parentheses.md
Outdated
2回目3分38 | ||
3回目2分48 | ||
|
||
'''python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
バッククォート`です。
```python | ||
class Solution: | ||
def isValid(self, s: str) -> bool: | ||
valied_input = ["(",")","{","}","[","]"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
valid_input = "(){}[]"
というのでも in で判定できます。
|
||
https://github.com/yus-yus/leetcode/pull/6 | ||
かなり勉強になった。 | ||
特に問題文にはないが、brackets以外が入力として与えられた場合も考えているのがすごくためになった。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これは凄く大切ですね。
この練習では動くかどうかはそれほど関係ないという話があったと思いますが、実際コード書く時は動くのはスタートラインで、こういう本来の機能以外で考える事の方が多かったりはします。
20. Valid Parentheses
Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
An input string is valid if:
Open brackets must be closed by the same type of brackets.
Open brackets must be closed in the correct order.
Every close bracket has a corresponding open bracket of the same type.
次は206. Reverse Linked List