[AlgoExpert] Detect ArbitrageRead more
[AlgoExpert] Palindrome Partitioning Min CutsRead more
[AlgoExpert] Longest Increasing SubsequenceRead more
[AlgoExpert] Two Edge Connecte4d GraphRead more
[AlgoExpert] LRU CacheRead more
[AlgoExpert] Rearrange Linked ListRead more
[AlgoExpert] Linked List PalindromeRead more
[AlgoExpert] Zip Linked ListRead more
[LeetCode] Sum of Mutated Array Closest to Target

1300. Sum of Mutated Array Closest to Target

Given an integer array arr and a target value target, return the integer value such that when we change all the integers larger than value in the given array to be equal to value, the sum of the array gets as close as possible (in absolute difference) to target.

In case of a tie, return the minimum such integer.

Notice that the answer is not neccesarilly a number from arr.

Read more
[AlgoExpert] Number Of Binary Tree TopologiesRead more