How to make bst from inorder input array

i dont know how to make bst from inorder input array
please guide / help me

hey jai, i am uploading the code for array to bst, you can refer from here. code contains comments for you to understand
https://ide.codingblocks.com/s/45626

The inorder traversal of the bst actually gives a sorted array.
There can be various bst from same inorder input array.
To construct the exact bst you would actually require combination of two traversals like inorder and preorder, inorder and postorder, etc.

But you can make balanced bst from the inorder input/sorted array. You can go through this article.

Hope this helps.

THANKS BHAIYA ,JUST ONE SLIGHT DOUBT
FROM GEEKS FOR GEEKS SITE THAT U REFERRED
in second case
Input: Array {1, 2, 3}
Output: A Balanced BST // case 1
2
/
1 3

Input: Array {1, 2, 3, 4} // case 2
Output: A Balanced BST
3
/
2 4
/
1

shouldnt 2 be the topmost root bcoz acc. to indexing from 0 and mid=(s+e)/2 it should

bcoz this can change the structure of tree
so which one should i consider for 2nd case
geeks for geeks wala tree or the tree acc to my theory

Consider the tree obtained according to theory and concept.
On running their code on
Input: Array {1, 2, 3, 4} // case 2
you’ll realize that the output obtained is
n PreOrder Traversal of constructed BST 2 1 3 4
which is as per the concept.