Skip to content

Add solution for range queries using difference array#145

Merged
HGRgamer merged 1 commit intoopencodeiiita:mainfrom
KushagraSahu-01:patch-1
Jan 31, 2026
Merged

Add solution for range queries using difference array#145
HGRgamer merged 1 commit intoopencodeiiita:mainfrom
KushagraSahu-01:patch-1

Conversation

@KushagraSahu-01
Copy link
Contributor

Issue: #109
Implemented a solution for processing range update and point query using a difference array.

Implemented a solution for processing range update and point query using a difference array.
@OpenGitBot
Copy link

Hey @KushagraSahu-01

Thanks for opening this PR 🚀. Mentor will review your pull request soon and till then, keep contributing and stay calm.

Thanks for contributing in OpenCode'25 ✨✨!

@HGRgamer
Copy link
Contributor

Actually this solution is running in n*q time complexity and would give TLE normally
To fix that you would have to use fenwick tree or segment tree.

Still merging this

@HGRgamer HGRgamer merged commit 64cbbe5 into opencodeiiita:main Jan 31, 2026
@OpenGitBot
Copy link

Hey @KushagraSahu-01

Your PR has been merged 🥳🥳 and you have earned 10 points.

Thanks for contributing in OpenCode'25✨✨

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.

3 participants