online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode() {} * ListNode(int val) { this.val = val; } * ListNode(int val, ListNode next) { this.val = val; this.next = next; } * } */ class Solution { public ListNode reverseList(ListNode head) { if(head.next==null) { return head; } ListNode H=head; head=head.next; ListNode temp=reverseList(head); ListNode newHead=temp; ListNode tt=newHead; while(tt.next!=null) { tt= tt.next; } tt.next=H; return newHead; } }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue