I know this question might be trivial in its own way , but i am trying to generate a binary tree from level order input and then traverse through it to represent that the tree was saved in the data structure. Say if the input is like - [a,s,e,r,t,*,w] , it will generate a binary a binary tree of following representation -
a
/ \
s e
/\ /\
r t * w
Is there a way to implement this , its like generating a binary tree from a tree input. If anybody have already faced this kind of problem before , please share some sort of implementation in JAVA , Like using Queues.