text: Subtract LinkedList Helper is a recursive function , move till the last Node , and subtract the digits and create the Node and return the Node . If d1 < d2 , * we borrow the number from previous digit .
code: function subtractLinkedListHelper ( l1 , l2 ) { if ( l1 == null && l2 == null && borrow == false ) return null ; var previous = subtractLinkedListHelper ( ( l1 != null ) ? l1 . next : null , ( l2 != null ) ? l2 . next : null ) ; var d1 = l1 . data ; var d2 = l2 . data ; var sub = 0 ;