fix bug in leaf function

This commit is contained in:
Maximilian Keßler 2022-04-17 13:56:44 +02:00
parent a0f3b12ece
commit ca3750e6d7

View file

@ -100,8 +100,9 @@ bool TreeNode::covered() {
}
bool SegmentTree::is_leaf(Index node_idx) {
return node_idx > _num_meta_nodes;
return node_idx >= _num_meta_nodes;
}
#endif //PROG_SEGMENT_TREE_H