import java.util.*; public class Solution { public ListNode ReverseList(ListNode head) { ListNode p=null,q=head; while(q!=null){ ...