Given the head of a singly linked list, return an array of node values in reverse order using recursion (do NOT reverse the list itself).
Recurse to the end first, then collect values on the way back.
Input: Head of a singly linked list.
Output: Array of node values from tail to head.
Input: [1,2,3,4,5]
Output: [5,4,3,2,1]
Explanation: Recurse to end: base case at NULL. Return [5], then prepend 4,3,2,1.Input: [10,20,30]
Output: [30,20,10]
Explanation: Recurse: reach 30, then 20, then 10. Collect: [30,20,10].Input: [7]
Output: [7]
Explanation: Single node. Base case: return [7].1 <= number of nodes <= 10^3-10^9 <= Node.val <= 10^9