You are viewing a single comment's thread. Return to all comments →
Kotlin:
fun reversePrint(llist: SinglyLinkedListNode?): Unit { val list=ArrayList<Int>() var current=llist while(current!=null){ list.add(current.data) current=current.next } list.reverse() list.forEach{ println(it) } }
Seems like cookies are disabled on this browser, please enable them to open this website
Print in Reverse
You are viewing a single comment's thread. Return to all comments →
Kotlin: