Data Structures and Algorithms binary search on sorted inputs Rust JavaScript counting unival subtrees Rust JavaScript (fast) JavaScript (slow)