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) {
...
Problemtc :O(n) where n is no. of nodes in the original linked list
Iterative approach:
⛶/*
// Definition for a Node.
class Node {
int val;
Node next;
Node random;
public Node(int v...