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

#19 Bit-manipulation in C++ #23

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

AkshatGupta468
Copy link

Description

Fenwick tree, Modular multiplication and exponentiation , Subset generation in C++

Have you read the Contributing Guidelines on Pull Requests?

Yes

Please answer the following questions for yourself before submitting an issue.

  • yes, I've read the contribution guidelines.
  • yes, I've checked the issue list before deciding what to submit.

Related Issues or Pull Requests

Mention your related issue/pull request number here
#19

Copy link
Collaborator

@ag278 ag278 left a comment

Choose a reason for hiding this comment

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

The description in each file must start before the coding part

@AkshatGupta468
Copy link
Author

I have moved the description above the code now

Comment on lines +105 to +125
// int n,q;
// cin>>n>>q;
// vector<ll> arr(n);
// for(auto &i:arr) cin>>i;
// Fenwick f(arr);
// for(int i=0;i<q;i++)
// {
// int w;
// cin>>w;
// if(w==1)
// {
// int k,u;
// cin>>k>>u;
// f.treeupdate_add(k,u-arr[k-1]);
// arr[k-1]=u;
// }
// else
// {
// int l,r;
// cin>>l>>r;
// cout<<f.range_sum(l,r)<<"\n";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove the commented code and add the example along with the output at the end of each code

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