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 directed graph represented as an adjacency list, return its reverse so if an edge goes from A to B, it now goes from B to A. Each …
Given a positive integer n, return whether n can be written as the sum of distinct positive factorial numbers. Example 1 Input n = 31 Output true Explanation Since …
Given a list of integers nums, a string op representing either “+”, “-“, “/”, or “*”, and an integer val, perform the operation on every number in nums with …