Math.floor() helps determine the middle element of the array, which becomes the root of the subtree.