Изменения

Перейти к: навигация, поиск

Многомерное дерево отрезков

2 байта убрано, 17:32, 6 июня 2015
Построение
'''for''' I = 1..n
'''if''' xILeft != xIRigth
t[x1][x2]...[xP][node] = t[x1][x2]...[xI * 2 + 1]...[node] <tex>\timesodot</tex> t[x1][x2]...[xI * 2 + 2]...[node]
'''return'''
t[x1][x2]...[xP][node] = newElem.value
'''for''' I = 1..n
'''if''' xILeft != xIRight
t[x1][x2]...[xP][node] = t[x1][x2]...[xI * 2 + 1]...[node] <tex>\timesodot</tex> t[x1][x2]...[xI * 2 + 2]...[node]
'''return'''
t[x1][x2]...[xP][node] = data[x1Left][x2Left]...[xPLeft][node]
Анонимный участник

Навигация