Skip to content

Add Segment Tree Data Structure#177

Merged
ionicc merged 2 commits into
codezoned:masterfrom
RishabhBhatnagar:master
Oct 12, 2019
Merged

Add Segment Tree Data Structure#177
ionicc merged 2 commits into
codezoned:masterfrom
RishabhBhatnagar:master

Conversation

@RishabhBhatnagar

@RishabhBhatnagar RishabhBhatnagar commented Oct 4, 2019

Copy link
Copy Markdown
Contributor

Description

Segment Tree is used for storing information about intervals, or segments. It allows querying which of the stored segments contain a given point.

A segment tree for a set I of n intervals uses O(n log n) storage and can be built in O(n log n) time. Segment trees support searching for all the intervals that contain a query point in O(log n + k), k being the number of retrieved intervals or segments.
\cite{https://en.m.wikipedia.org/wiki/Segment_tree }

Fixes #82

Type of change

  • New Script

@senthilkumar1729 senthilkumar1729 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you please provide a small description of Segment Tree at the top? 😄
The code looks good 👍 Thank you for contributing!

@RishabhBhatnagar

Copy link
Copy Markdown
Contributor Author

Can you please provide a small description of Segment Tree at the top?
The code looks good Thank you for contributing!

Description has been added.

@ionicc ionicc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You could add the description as a comment on the beginning of the script 😄

@RishabhBhatnagar

Copy link
Copy Markdown
Contributor Author

You could add the description as a comment on the beginning of the script

Description has been added in the file.

@ionicc ionicc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great work! Thanks for your contribution 😄

@ionicc ionicc merged commit a36b931 into codezoned:master Oct 12, 2019
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.

Add more Graph Algorithms

3 participants