Tag: c++
You are given a list of integers nums. Return the number of pairs i < j such that nums = nums. Constraints 0 ≤ n ≤ 100,000 where n …
Given a binary tree root, return the sum of the longest path from the root to a leaf node. If there are two equally long paths, return the larger …
You are given a string s of “a” and “b”s. “a”s can stay “a” or turn into “b”, but “b”s can’t change. Return the number of unique strings that …
You are given a binary tree root containing unique values, and an integer target. Find the node with value target and return the node that’s directly right of it …
You are given a list blocks where each block contains two integers where start < end. You can join two blocks if the end of one is equal to …