LeetCode Problem 18 Solution with C++. Solution: Runtime 0 ms (Beats 100%), Memory 17.46 MB (Beats 55.23%).