Showing 3 of 104 questions
You're given two arrays. Construct the longest possible non-decreasing subarray by picking elements from either array at each index.
#1. Longest Non-decreasing Subarray From Two Arrays
Find the minimum number of moves a knight needs to reach a target position on an infinite chessboard, starting from (0, 0).
#2. Minimum Knight Moves
Find the maximum sum of any path in a binary tree, where a path can start and end at any node. The path must contain at least one node.
#3. Binary Tree Maximum Path Sum