programming-team-code / programming_team_code_rust

rustaceans
Creative Commons Zero v1.0 Universal
2 stars 0 forks source link

consistency with partition_point #56

Closed lrvideckis closed 1 month ago

lrvideckis commented 1 month ago

https://doc.rust-lang.org/std/primitive.slice.html#method.partition_point

for the predicate you pass in: for some prefix of the array, the predicate is true, then for the remaining suffix, the predicate is false

Let's match this: for the path from u to LCA, the variable which side should be true, then for the path from v to LCA, it should be false

lrvideckis commented 1 month ago

c++ has same interface https://en.cppreference.com/w/cpp/algorithm/partition