Skip to content
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

Wavelet Tree Module #4813

Open
wants to merge 79 commits into
base: master
Choose a base branch
from
Open

Wavelet Tree Module #4813

wants to merge 79 commits into from

Conversation

crafticat
Copy link

Place an "x" in the corresponding checkbox if it is done or does not apply to this pull request.

  • [ x] I have tested my code.
  • [x ] I have added my solution according to the steps here.
  • [x ] I have followed the code conventions mentioned here.
    • I understand that if it is clear that I have not attempted to follow these conventions, my PR will be closed.
    • If changes are requested, I will re-request a review after addressing them.
  • [ x] I have linked this PR to any issues that it closes.

crafticat and others added 30 commits May 15, 2024 21:07
Changed time complexity
Added braces
Changed the uniqueID
@crafticat
Copy link
Author

All the issues were answered.
Is there anything else you would like to discuss?

Copy link

stale bot commented Jan 1, 2025

This pull request has been automatically marked as stale because it has not had recent activity. Please address the requested changes and re-request reviews. Thank you for your contribution!

@stale stale bot added the stale label Jan 1, 2025
Copy link

stale bot commented Jan 15, 2025

This pull request has been automatically marked as stale because it has not had recent activity. Please address the requested changes and re-request reviews. Thank you for your contribution!

@stale stale bot added the stale label Jan 15, 2025

$$
\begin{aligned}
\texttt{occurrences}(l, r) = \texttt{occurrences}(r) - \texttt{occurrences}(l)
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick, but shouldn't it be - occurrences(l - 1)?

Copy link
Author

Choose a reason for hiding this comment

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

No because I am doing including, excluding i.e [l, r)

When $\texttt{occurrences}(y)$ is the number of occurences of x in the first y elements.
aka
$$
\text{occurrences} = \sum_{i=1}^{y} \mathbb{1}(x_i = x)
Copy link
Contributor

Choose a reason for hiding this comment

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

i don't think writing out the formula is necessary

Copy link
Author

Choose a reason for hiding this comment

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

It wasnt clear before (I was asked about it), so I added it to make it a little more clear.

content/6_Advanced/Wavelet.mdx Show resolved Hide resolved
content/6_Advanced/Wavelet.mdx Show resolved Hide resolved
content/6_Advanced/Wavelet.mdx Outdated Show resolved Hide resolved
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.

4 participants