Digital Marketing

public ListNode reverseList(ListNode head) {
/* recursive solution */
return reverseListInt(head, null);

private ListNode reverseListInt(ListNode head, ListNode newHead) {
if (head == null)
return newHead;
ListNode next =; = newHead;
return reverseListInt(next, head);


Popular posts from this blog

Fixed WSL sshd: no hostkeys available -- exiting

PowerMTA pmta command

How to fix: mv: failed to preserve ownership