VisuAlgo Min Segment Tree Max Segment Tree Sum Segment Tree
Exploration Mode

Create

RMQ

Update

Go

Random

Random Sorted

Enter L:
Enter R:

GO

Enter L:
Enter R:
Enter VALUE:

GO

About Team Terms of use
slow
fast
go to beginning previous frame pause play next frame go to end
A segment tree is a binary tree which can solve range update and range RMQ in O(log(n)) time. All the nodes have both left child and right child or nor of them.
Next
To toggle between the RMinQ Tree, RManQ Tree and the RSumQ Tree, select the respective header.
Next
All available operations on the segment Tree will be shown here. Select an action and provide the necessary input, and the action will be animated in the visualisation area.
Next
View the visualisation here!
Next
As the action is being carried out, each step will be described in the status panel.
Next
You can also follow the psuedocode highlights to trace the algorithm.
Next
Control the animation with the player controls! Keyboard shortcuts are:
Spacebar: play/pause/replay
Left/right arrows: step backward/step forward
-/+: decrease/increase speed
Next
Return to "Exploration Mode" to start exploring!