i dont get right output
Link list k element reverse
You are using wrong approach of building a tree, your reverse logic is fine, the problem is with building of list only, You simply can use buildlist function, which will take data, and insert at Tail of linked list,
void buildlist(node *&head,int N)
{
int data;
while(N>0)
{
cin>>data;
insertAtTail(head,data);
Nā;
}
}
pls correct my code
i dont get output yet now.
Plz send your updated code, as per the approach I told you,
I have modified your code, try to submit now