Sort by

recency

|

1001 Discussions

|

  • + 0 comments

    For Python3 Platform

    def reversePrint(llist):
        values = []
        while(llist is not None):
            values.append(llist.data)
            llist = llist.next
        values.reverse()
        
        print(*values, sep="\n")
    
  • + 0 comments

    Here is Print in Reverse solution in python, java, c++ and c programming - https://programmingoneonone.com/hackerrank-print-in-reverse-problem-solution.html

  • + 0 comments

    Mi solución en Python 3:

    def reversePrint(llist):
        # Write your code here
        values = []
        cur= llist
        while cur:
            values.append(cur.data)
            cur = cur.next
        for val in reversed(values):
            print(val)
    
  • + 0 comments

    By recursion(Java)

    if(llist==null) return; if(llist.next==null){ System.out.println(llist.data); return; } else{ reversePrint(llist.next); System.out.println(llist.data); }

  • + 0 comments

    def reversePrint(llist): # Write your code here curr = llist if curr is None: return reversePrint(curr.next) print(curr.data)