1

Ι want to find the last node in a max heap ( with BFS or DFS). I need to use something without queue or stack. Is there any easier way ? Can anyone give me an example ?

struct node {
int value;
struct node *parent;
struct node *left;
struct node *right;
};




struct node * findLastNode(struct node * heapnode, int size) 
{

struct node * last = heapnode;

..............
}
james3
  • 21
  • 5

0 Answers0