Random

 @Import could be useful for building 3rd party library.


CI/CD on Gitlab VS Github


AbortController

update state with function in react


CPU intensive task required huge computational power can be handled with Java whereas I/O bound operations like real-time chat, media streaming, etc can be handled well with NodeJs.


Anonymous functions will always get a new reference on every render.


Recursive function to perform in-order traversal of the tree


public static void inorder(node root){

if(root==null)

  return;


inorder(root.left);

System.out.println(root.data+" ");

inorder(root.right);

}


public static void inorderWithoutRecursion(node root){

Stack<node> stack = new Stack();

node current = root;


while(!stack.empty() || current!=null){

if(current!=null){

stack.push(current);

current = current.left;

}else{

current = stack.pop();

System.out.println(current.data+" ");

current=current.right;

}

}

}


Comments