Skip to content

feat: add parseNestedBrackets#79

Merged
raklaptudirm merged 6 commits into
TheAlgorithms:masterfrom
yudukikun5120:feat/parse-nested-brackets
Nov 21, 2022
Merged

feat: add parseNestedBrackets#79
raklaptudirm merged 6 commits into
TheAlgorithms:masterfrom
yudukikun5120:feat/parse-nested-brackets

Conversation

@yudukikun5120

@yudukikun5120 yudukikun5120 commented Nov 20, 2022

Copy link
Copy Markdown
Contributor
  • Algorithm: Nested Brackets Parsing

Comment thread other/parse_nested_brackets.ts

@appgurueu appgurueu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd call this something like extractTopLevelParenthesized

@yudukikun5120

Copy link
Copy Markdown
Contributor Author

@appgurueu "top level" seems to exclude the lower level tags: <A<B>> => <A<B>> (excluding <B>). How do you think that?

Comment thread other/parse_nested_brackets.ts Outdated
Comment thread other/parse_nested_brackets.ts Outdated
Comment thread other/parse_nested_brackets.ts Outdated
Comment thread other/parse_nested_brackets.ts Outdated
@appgurueu

Copy link
Copy Markdown
Contributor

@appgurueu "top level" seems to exclude the lower level tags: <A<B>> => <A<B>> (excluding <B>). How do you think that?

Agreed, poor suggestion from me.

@yudukikun5120

Copy link
Copy Markdown
Contributor Author

@appgurueu I made suggested modifications and replies.

@appgurueu appgurueu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Time complexity is quadratic due to the string slicing but optimality is not a requirement. Consider annotating the time complexity.

@raklaptudirm raklaptudirm merged commit 0b8f3d3 into TheAlgorithms:master Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants