for(int i = 0; i < linkedListColors.size(); i++){ System.out.println( linkedListColors.get(i) ); }
function printLinkedList(head) { let cur=head while(cur){ console.log(cur.data) cur=cur.next } }