you give array tree treesi xi yi represent location tree gardenyou ask fence entire garden minimum length rope expensive the garden fence tree enclosedreturn coordinate tree exactly locate fence perimeter Example 1input point 112220243342output 1120332442example 2input point 122242output 422212 Constraints1 pointslength 3000pointsilength 20 xi yi 100all give point unique