Winston give mysterious function func he integer array arr integer target want find value l r value funcarr l r target minimum possiblereturn minimum possible value funcarr l r targetnotice func call value l r 0 l r arrlength Example 1input arr 9123715 target 5output 2explanation call func pair lr 001122334401122334021324031404 Winston got follow result 91237158037003000 the value close 5 7 3 minimum difference 2example 2Input arr 100000010000001000000 target 1output 999999explanation Winston call func possible value lr get 1000000 min difference 999999example 3Input arr 124816 target 0output 0 Constraints1 arrlength 1051 arri 1060 target 107