If a node has no connected directed edges, it is a terminal node. If all possible paths starting from this node lead to the terminal node, then this node is a secure node; Given the array nums and an integer k. We divide the given array nums into up to k adjacent non empty subarrays. The score is composed of the sum of the average values within each subarray; We need to move each element in the nums array to either the A or B arrays, so that the A and B arrays are not empty, and average (A)==average (B). If it can be completed, return true; otherwise, return false. There are small joys in life that you need to constantly explore and discover.
Show More