Category: recursive
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 …
Teaching Kids Programming: Videos on Data Structures and Algorithms Given a singly linked list of integers node, sort the nodes by their values in ascending order. Constraints n ≤ …
Given a binary tree root, remove all nodes with only one child. Constraints n ≤ 100,000 where n is the number of nodes in root Example 1 Input root …
Given a list of integers nums and an integer k, return whether there are four distinct elements in the list that add up to k. Constraints n ≤ 100 …
Given a singly linked list node, return its length. The linked list has fields next and val. Constraints n ≤ 100,000 where n is the number of nodes in …