Here's a Python implementation that reverses a singly linked list:

```
class ListNode:
    def __init__(self, val=0, next=None):
        self.val = val
        self.next = next

def reverseList(head: ListNode) -> ListNode:
    prev = None
    curr = head
    while curr:
        temp = curr.next
        curr.next = prev
        prev = curr
        curr = temp
    return prev
```

The function `reverseList` takes in the head of a singly linked list as its input and returns the new head of the reversed list. It uses a `prev` variable to keep track of the previous node, a `curr` variable to traverse the list, and a `temp` variable to temporarily store the next node in the list. It then iteratively sets the `next` pointers of the nodes to the previous node, updates the `prev`, `curr`, and `temp` variables, and continues until the entire list is reversed.
Data la testa di un elenco con collegamenti singoli, invertire l'elenco e restituire l'elenco invertito.