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

Create Segemented trees.cpp #126

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

Closed
D3v3sh5ingh wants to merge 184 commits into codeIIEST:master from D3v3sh5ingh:D3v3sh5ingh-patch-2
Closed

Create Segemented trees.cpp #126

D3v3sh5ingh wants to merge 184 commits into codeIIEST:master from D3v3sh5ingh:D3v3sh5ingh-patch-2

Conversation

Copy link
Contributor

@D3v3sh5ingh D3v3sh5ingh commented Dec 8, 2017

Segmented trees added

manumeral and others added 30 commits November 3, 2015 15:46
Resources for detailed Learning.
Added a wiki for Dijkstra's Algorithm
Adding solution for RSA algorithm
RSA algorithm implemented in python
RSA Algorithm implemented in python
sgrG24 and others added 17 commits December 7, 2017 09:45
* BackTracking Implementation
* _knights tour_
will PR this later
* delete_knightsTour
* Delete Sudoku.cpp
* Delete nQueen.cpp
* Backtrack
Copy link
Member

please mention the issue no

Copy link
Contributor Author

Issue # 92

Copy link
Member

now , you made a good PR.
congrats 👍

int getSumUtil(int *st, int ss, int se, int qs, int qe, int si)
{
// If segment of this node is a part of given range, then return
// the sum of the segment
Copy link
Member

@prateekiiest prateekiiest Dec 9, 2017

Choose a reason for hiding this comment

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

instead of ss, se use start, end

int getSum(int *st, int n, int qs, int qe)
{
// Check for erroneous input values
if (qs < 0 || qe > n-1 || qs > qe)
Copy link
Member

@prateekiiest prateekiiest Dec 9, 2017

Choose a reason for hiding this comment

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

similarly for qs, qe and st.

Copy link
Member

please show me the output of this code

Copy link
Contributor Author

@D3v3sh5ingh D3v3sh5ingh left a comment

Choose a reason for hiding this comment

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

Required changes done
Changed variable names for better understanding

Copy link
Contributor Author

screenshot 30

Output of the Code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /