🐐
LeetGoat
Interview Prep
Competitive Programming
Discord
3D Range Query Picker
Range queries
2D range queries
Sets
Union find
Strings
Tree queries
Tree helpers
Graphs
Matrices
Math
Primes
Bit ops & Bitset
Geometry
Misc.
Golden References
2D
3D
Unselect all
3D point operations
one cell (x, y, z) of an X × Y × Z grid
pointGet
(x, y, z)
Read one cell
pointAssign
(x, y, z, v)
cell = v (can go down as well as up)
pointAdd
(x, y, z, v)
cell += v
pointChmax
(x, y, z, v)
cell = max(cell, v)
pointChmin
(x, y, z, v)
cell = min(cell, v)
3D box queries
x1..x2, y1..y2, z1..z2, inclusive
boxSum
(x1, y1, z1, x2, y2, z2)
Sum of the box
sumAll
()
Sum of everything
boxMin
(x1, y1, z1, x2, y2, z2)
Min of the box
minAll
()
Min of everything
boxMax
(x1, y1, z1, x2, y2, z2)
Max of the box
maxAll
()
Max of everything
3D corner queries
one bound per axis: when this is all you ask, a Fenwick tree is enough
sum
sumLteLteLte
(x, y, z)
sum over all three coordinates ≤ x, y, z
sumGteGteGte
(x, y, z)
sum over all three coordinates ≥ x, y, z
max
maxLteLteLte
(x, y, z)
max over all three coordinates ≤ x, y, z
maxGteGteGte
(x, y, z)
max over all three coordinates ≥ x, y, z
min
minLteLteLte
(x, y, z)
min over all three coordinates ≤ x, y, z
minGteGteGte
(x, y, z)
min over all three coordinates ≥ x, y, z