Given the root of a binary tree, return an array containing the node values in pre-order traversal order. In pre-order traversal, visit the current node first, then traverse the left subtree, then traverse the right subtree.
Example 1:
Input: root = [1,null,2,3]
Output: [1,2,3]
Explanation: Visit 1, then 2, then 3.
Example 2:
Input: root = [1,2,3,4,5]
Output: [1,2,4,5,3]
Explanation: Visit root, then the full left subtree, then the right subtree.
0 <= number of nodes <= 10^4-10^4 <= Node.val <= 10^4