Tag Archives: refactored

Add Two Numbers (C++) refactored

Realized I could make it even cleaner. Changed the while loop condition which makes the code much cleaner gets rid of some unnecessary code. ListNode *addTwoNumbers(ListNode *l1, ListNode *l2) { // Start typing your C/C++ solution below // DO NOT write … Continue reading

Posted in Coding | Tagged , , | Leave a comment