Advanced bracket balance. Kalsina Yana.#7
Open
yaprogrammer18-yanchi wants to merge 23 commits intomainfrom
Open
Advanced bracket balance. Kalsina Yana.#7yaprogrammer18-yanchi wants to merge 23 commits intomainfrom
yaprogrammer18-yanchi wants to merge 23 commits intomainfrom
Conversation
…ack is in AdvaBraBal dir
This reverts commit 29c0959.
WoWaster
requested changes
Nov 14, 2025
Collaborator
WoWaster
left a comment
There was a problem hiding this comment.
Со стилем всё ещё беды :( При том если в стеке минимум косяков, то вот в балансе что-то как-то всё плохо.
WoWaster
reviewed
Nov 14, 2025
WoWaster
requested changes
Dec 6, 2025
Collaborator
WoWaster
left a comment
There was a problem hiding this comment.
Совсем косметика и будет хорошо.
.gitignore
Outdated
| *.pdb | ||
|
|
||
| # Kernel Module Compile Results | ||
| # Kernel Module Comspile Results |
| char tmp = ' '; | ||
| int length = strlen(stringWithBrackets); | ||
| for (int i = 0; i < length; i++) { | ||
| tmp = stringWithBrackets[i]; |
Collaborator
There was a problem hiding this comment.
Безопаснее делать так:
Suggested change
| tmp = stringWithBrackets[i]; | |
| char ch = stringWithBrackets[i]; |
Чтобы переменная не была общей между итерациями цикла.
Ну и название tmp прям совсем не информативно. ch не сказать, что шибко лучше, но хотя бы понятно, что это некий символ
Comment on lines
29
to
31
| else if ((tmp == ')' || tmp == '}' || tmp == ']') && (isEmpty(stack))) { | ||
| isBalanced = false; | ||
| } |
Collaborator
There was a problem hiding this comment.
Suggested change
| else if ((tmp == ')' || tmp == '}' || tmp == ']') && (isEmpty(stack))) { | |
| isBalanced = false; | |
| } | |
| else if ((tmp == ')' || tmp == '}' || tmp == ']') && (isEmpty(stack))) { | |
| isBalanced = false; | |
| break; | |
| } |
?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Добавила файл к домашней работе "Продвинутый баланс скобок". Здесь три файла:
последние два файла изначально были созданы на ветке стека.