Add 1 to the list

Problemtc :O(n), sc:O(1) ⛶/* class Node{ int data; Node next; Node(int x){ data = x; next = null; } } */ class Solution { public Node addOne(Node head) { ...
0 Read More