Alice and Bob take turns removing stones from either end of a row. Each player gains points equal to the sum of the remaining stones after their turn. Bob aims to minimize the score difference, while Alice aims to maximize it. The task is to determine the maximum difference between Alice and Bob
The task involves finding the minimum number of operations, where each operation consists of replacing an element in an array with an element from another, to make source array strictly increasing.
The problem is to increment all elements of submatrices by 1, given a matrix of integers, the task is to return the updated matrix where all elements of submatrices are incremented by 1
Given an undirected tree, the problem is to find the sum of the distances between each pair of nodes in the tree, and return an array that contains the sum of distances between the node i and all other nodes, in the same order as the input