#Nodes #Greater #Than #X #codingninja
Nodes Greater Than X
For a given a binary tree of integers and an integer X, find and return the total number of nodes of the given binary tree which are having data greater than X.
Sample Input 1:
1 4 2 3 -1 -1 -1
2
Sample Output 1:
2
Explanation for Sample Input 1:
Out of the four nodes of the given binary tree, [3, 4] are the node data that are greater than X = 2.
Sample Input 2:
5 6 10 2 3 -1 -1 -1 -1 -1 9 -1 -1
5
Sample Output 2:
3
I try to solve very easy concept So please watch this video .
All java code with easy trick.
By "LIFE CODING WITH JAVA". all program free no any cost So please like ,subscribe, share and comment.
If you any doubt related to any video then comment me. As soon as I will help you .
my contact number: 6206472735..
#LIFE CODING WITH JAVA
@java62
#java
#coding
#with java
#for loops in java
#patterns in java
#while loops in java
#arrays in java
#dynamic in java
#linked list in java
#queue in java
#stack in java
#binary search in java
#merge search in java
#dsa in java
#recursion in java
#arraylist in java
#function in java
#all oops concept in java
#queue
#explain all concept related to java
#history of java
#only java course
#full stack web development
#coding ninjas all questions