I have an endless stack of the cards, also every of them relatives to one of the N types. I need to evaluate math expectation of taken cards to get the cards with all types.
UPD.
I have an endless stack of the cards, also every of them relatives to one of the N types. I need to evaluate math expectation of taken cards to get the cards with all types.
UPD.
Пусть есть корневое дерево. Насколько оптимально быстро можно делать присвоение/добавление только лишь предкам/потомкам какой-то(произвольной) вершины?