Asked lots of questions on CS concepts... UDP vs TCP http vs https DynamoDB partition How TreeMap in Java is implemented SQL indexes Coding: Add operation in LinkedList. For example: 1->2->3 + 2->4 => 1->6->7
Anoniem
Add operation in LinkedList. For example: 1->2->3 + 2->4 => 1->6->7 Obviously we cannot convert it to integer as it might overflow. Mentioned we can convert the LinkedList to a string, add them together, convert it back to linkedlist but obviously we can optimized to O(1) space from O(n) space. Wrote the code to reverse the linkedlist and add them together, reverse the linkedlist result and return it