Salem: Thanks for the suggestion on the recursive code. Honestly am a bit weak with recursion, hence I chose the iterative method.
The code that I posted earlier, did not give me any warnings like...
Type: Posts; User: Shyam Raj
Salem: Thanks for the suggestion on the recursive code. Honestly am a bit weak with recursion, hence I chose the iterative method.
The code that I posted earlier, did not give me any warnings like...
Thanks Salem, for your reply. I couldn't find out how to do it the recursive way, hence I tried the iteration method and now it seems to work fine. Here's the updated code of findNode().
int...
Hello, I've completed my program but there seems to be some minor issue which I've been trying hard to figure out. Here's the code:
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>...
Thanks Salem, its working. I'm making some modifications in the program to make it work my way. If I have any issues, I'll get back.
Thanks again.
I could only understand a bit of your previous comment. If you can give me some hint, I'll try it out myself.
I've been stuck up with this for the past 5 days.
Hi Salem, I understand what you're saying. The addNode()function returns a NODE type and am not storing it. But I am not sure what do I assign it to.
If I do it this way
tree->root =...
Hi Salem, I changed the code a bit, I guess it works fine but it doesn't print the output:
The changed code is like this:
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
typedef...
@anduril462: Rightly said mate, there were a few errors which i corrected. And as you said, the problem is definitely in the else part of addNode function, but I don't know how to assign that...
I removed the pointer to integer from all places and replaced with integer variables. I feel, the problem really lies in the way insertNode() is defined and called. In the else part of addNode()...
Hello All, I'm learning about BST from a book and I'm stuck half way while trying to code a BST. Here's my code:
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
typedef struct node
{...