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

Adding a new module to bronze: Precomputations #5188

Closed
wants to merge 0 commits into from

Conversation

enplasmatic
Copy link

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

  • I have tested my code.
  • I have added my solution according to the steps here.
  • 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.
  • I have linked this PR to any issues that it closes.

This module will explain the importance of precomputing values before running main code in a solution (e.g., finding frequency of an element beforehand)

Copy link
Member

@envyaims envyaims left a comment

Choose a reason for hiding this comment

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

I'm not sure what this module is really about. It feels more like a technique that comes with solving problems than an actual algorithm or type of problems. I think it's super vague on what "precomputation" covers, unlike prefix sums which is much more concrete.

Btw, please check in with us before you write a whole module in the future.

Here are some common examples of precomputation techniques:
- Finding the frequency of each element in an array beforehand
- Noting down where each element appears in an array beforehand
- Performing an operation on each element of an array beforehand
Copy link
Member

@envyaims envyaims Mar 11, 2025

Choose a reason for hiding this comment

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

what does "performing an operation on an element" mean?

<Spoiler title="Hint">


Is there anything we can precompute before we run the main code?
Copy link
Member

Choose a reason for hiding this comment

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

how do you categorize the precomputational part of the code vs the main part of the code? I argue that your "precomputation" is an essential part of the main algorithm for solving the problem.

Copy link
Author

Choose a reason for hiding this comment

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

would you suggest improving / making the module more clear, or scrapping it entirely?

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.

2 participants