You are given two binary trees: an original tree and a cloned tree. The cloned tree is a copy of the original tree, and you are given a reference to a node in the original tree. Your task is to return the reference to the corresponding node in the cloned tree.
You are given a matrix of distinct numbers with dimensions m x n. A lucky number in the matrix is an element that is the minimum value in its row and the maximum value in its column. Your task is to find and return all such lucky numbers.
Given two arrays of integers nums and index, the task is to create a target array by inserting elements of nums at the positions specified by index. After processing all elements, return the target array.
You are given a binary string s consisting of characters ‘0’ and ‘1’. Your task is to split the string into two non-empty substrings (a left substring and a right substring) and return the maximum score that can be achieved by splitting the string. The score is the sum of the number of ‘0’s in the left substring and the number of ‘1’s in the right substring. Find the maximum score by evaluating all possible splits.
You are given a list of integers representing the number of candies each kid has. You are also given an integer representing the number of extra candies. Your task is to return a boolean array indicating whether, after adding all the extra candies to each kid’s total, they will have the greatest number of candies among all the kids.
You are given an array paths where each element represents a pair of cities [cityAi, cityBi], indicating a direct route from cityAi to cityBi. Your task is to find the destination city, which is the city without any outgoing path to another city.