## Invert Binary tree

Google: 90% of our engineers use the software you wrote (Homebrew), but you can’t invert a binary tree on a…

## Tree traversals without recursion

package treetravernonrecur; import java.util.*; class node { node left; node right; int data; int visited; public node(int val,int visit) {…

## Tree size and Maximum element in tree

package treeprobs; class node1 { node1 left; node1 right; int data; public node1(int val) { data=val; } } public class…

## Finding Duplicate element using hashset

package checkduplicate; import java.util.*; public class CheckdupliHash { public static void main(String args[]) { ArrayList<Integer> al=new ArrayList<Integer>(); al=addNumbers(al); System.out.println(“Duplicacy”+checkdup(al)); }…

## Finding duplicate element in array in O(n)

//Code to check the duplicacy of numbers in a array using negation technique //Constraint is numbers allowed in array of…

## Given a positive integer which fits in a 32 bit signed integer, find if it can be expressed as A^P where P > 1 and A > 0. A and P both should be integers.

Problem: Given a positive integer which fits in a 32 bit signed integer, find if it can be expressed as…

## Given an even number ( greater than 2 ), return two prime numbers whose sum will be equal to given number.

Problem: Given an even number ( greater than 2 ), return two prime numbers whose sum will be equal to…