Movatterモバイル変換


[0]ホーム

URL:



Codeforces
In EnglishПо-русски
Enter |Register



→ Pay attention
→ Top rated
#UserRating
1tourist3892
2jiangly3797
3orzdevinwang3706
4jqdai08153682
5ksun483588
6ecnerwala3557
7Ormlis3532
8Benq3468
9Radewoosh3463
10Um_nik3450
Countries |Cities |OrganizationsView all →
→ Top contributors
#UserContrib.
1cry165
2-is-this-fft-161
3Qingyu159
4atcoder_official157
5Dominater069154
5adamant154
7djm03178151
7luogu_official151
9errorgorn149
10awoo148
View all →
→ Find user
→ Recent actions
Detailed →

lazy_abhay's blog

By lazy_abhay,31 hour(s) ago,In English

Segment Tree Visualizer

Hello Codeforces!

I recently built aSegment Tree Visualizer to help understand how segment trees work.

** PLEASE OPEN ON DESKTOP OR LAPTOP ONLY **

Try it Live:Grow the Segment Tree
GitHub Source:Open the Engine


Features

  • Visual Tree Layout – See how the segment tree is built node by node.
  • Interactive Controls – Build the tree, update values, and run range queries.
  • Clean UI – Dark theme, improved spacing, smooth UX.
  • Supports: Sum, Min, Max, OR, AND, XOR operations.

How to Use

  1. Input an array (e.g.1,2,3,4,5).
  2. Choose an operation from the dropdown.
  3. Click“Build Tree” to visualize it.
  4. Use"Query in Range" or"Update At Index" to explore further.

Screenshot

Demo


  • Vote: I like it
  • +24
  • Vote: I do not like it

»
21 hour(s) ago,#|
 Vote: I like it+25Vote: I do not like it

I love Indians but not the cheater ones.

    »
    11 hours ago,#|
     Vote: I like it+3Vote: I do not like it

    Recommendation: Perhaps you could highlight the boxes that are reached in a query in say, blue, to help understand the operations better. For instance, if the query is query-in-range [3, 6], then you would highlight the ancestors of 6 in one color and 3 in another (until both lists overlap). Similarly, for the update at index queries, you can highlight the boxes that are ancestors whenever the value changes.

    • »
      »
      8 hours ago,#^|
       Vote: I like it0Vote: I do not like it

      Thanks for the feedback

      I’ve added the highlighting as you suggested :)


       
       
      In EnglishIn Russian



      Codeforces (c) Copyright 2010-2025 Mike Mirzayanov
      The only programming contests Web 2.0 platform
      Server time:Apr/05/2025 18:37:26 (n2).
      Desktop version, switch tomobile version.
      Privacy Policy |Terms and Conditions
      Supported by
      TON
       
      ITMO University
       
       
       
       
      User lists
       
       
      Name

      [8]ページ先頭

      ©2009-2025 Movatter.jp