Closed ShampooDeng closed 5 months ago
https://doc.rust-lang.org/std/collections/struct.BTreeMap.html https://doc.rust-lang.org/std/primitive.slice.html#method.binary_search Use BTreeMap to store incident edge, and use binary_search to find event point between left and right edges.
BTreeMap
binary_search
complete with 9816505dd492f40933ec2411b6d3cb7e8c818fbb
https://doc.rust-lang.org/std/collections/struct.BTreeMap.html https://doc.rust-lang.org/std/primitive.slice.html#method.binary_search Use
BTreeMap
to store incident edge, and usebinary_search
to find event point between left and right edges.