You can define sample points on a grid. You can read the points on the grid to grab the minimum and the maximum values.
A simple way to do it would be to take a floating point number between 0 and 1 and pick a value (0.5, or 0.25, or 0.75 -- you can tweak this number to taste), call this number "L", then define a cut-off value "cuttoff_value = L*max_value". Then walk through all points on the grid, assessing the "grid_value" and only place trees on grid points that meet the critera "grid_value > cuttoff_value".
What I described should be simple; I don't know if you could call it "efficient"; it's definitely a naive approach to solve the problem.