I have to make the program of inorder ,preorder,posto rder traversal of the binary search tree using recursion in stacks.I have made it by recursion only.How can I make this .
I have written the code for the recursive method.
void gettree(struct node **, int);
void inorder(struct node *);
void postorder(struc t node *);
void preorder(struct node *);
#include<stdio. h>
...
User Profile
Collapse
-
priority queue
Hi everyone .I am trying to make a priority queue .I have written the code,complier is not giving any error but I am not getting the right answer.
My program print only the last value that i have entered,and rest of the garbage value
Code is:
...Code:struct node *getnode(struct node *,struct node *,int,int); void display(struct node *,int n) ; #include<stdio.h> #include<conio.h>
-
linked list
I want to check if the string entered is a palindrome or not using the queues only
but I have done this using the queue and the array .I want to know how I can do this problem by using only the queues
code i have written is:
struct queue *getnode(struct queue *,struct queue*,char );
void display(struct queue *,int nc);
void pop(struct queue *front,char *k,int nc) ;
... -
Thank you for pointing out the error
I want to multiply these two polynomial
Code for multipliction is
void *multiply(struc t node *a,struct node *b,int ter1,int ter2)
{
struct node *p,*q,*c,*temp;
int i,j;
c=NULL;
p=a;
q=b;
for(i=0;i<ter1* ter2;i++)
{
c=insert(c);
}
temp=c;
for(i=0;i<ter1; i++)... -
Linked list
struct node *insert(struct node *p);
void *add (struct node *a,struct node *b);
#include<stdio. h>
#include<conio. h>
#include<alloc. h>
struct node
{
int cof,ex,ey,ez;
struct node *link;
};
void main ()
{
struct node *a,*b,*q;
int i,ter1,ter2;
clrscr();
printf("\n\nNo of terms you want to enter for first polynomial");...
No activity results to display
Show More
Leave a comment: