Given an integer array nums, construct a singly linked list containing all elements in the same order and return the head of the list.
Each element in nums should become a node in the linked list.
Input: An integer array nums.
Output: Head of the newly constructed singly linked list.
Input: [1,2,3,4,5]
Output: [1,2,3,4,5]
Explanation: Create nodes 1→2→3→4→5. Return head node (value=1).Input: [10,20,30]
Output: [10,20,30]
Explanation: Three nodes: 10→20→30. Return head(10).Input: [7]
Output: [7]
Explanation: Single element array → single node list.1 <= nums.length <= 10^5-10^9 <= nums[i] <= 10^9