Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update 212-Word-Search-II.py#328

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
neetcode-gh merged 1 commit intoneetcode-gh:mainfromAgranatMarkit:main
Jul 2, 2022

Conversation

AgranatMarkit
Copy link
Contributor

Added following optimizations to bypass "Time Limit Exceeded":

  1. when we add word, we can unmark node in trie to prevent redundant hashing checks in our words set.node.isWord = false
  2. in the previous case we also should remove a word from the Trie. To prevent redundant heap deallocations, it's better to "mark" an Trie node usingrefs property. Ifrefs == 0, then node is deleted.

@AgranatMarkitAgranatMarkitforce-pushed themain branch 2 times, most recently froma30441a to89f538bCompareJune 22, 2022 14:22
@neetcode-ghneetcode-gh merged commit5041074 intoneetcode-gh:mainJul 2, 2022
neetcode-gh added a commit that referenced this pull requestJul 2, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@AgranatMarkit@neetcode-gh

[8]ページ先頭

©2009-2025 Movatter.jp