Akamai Interview Report
- 0of 0 votes
AnswersMost efficient way to check whether a number is Prime or not.
- gdg July 23, 2014 in United States| Report Duplicate | Flag | PURGE
Akamai - 0of 0 votes
Answersstruct node { int data; struct node* left; struct node* right; }; void Postorder(struct node* root,struct node** leaf) { if (root == NULL) return; if(root->data%2==0) *leaf->left=root; //WHY I'M GETTING PROBLEM IN THIS LINE //[Error] request for member 'left' in '* leaf', which is of non-class type 'node*' Postorder(root->left,leaf); Postorder(root->right,leaf); } int main() { struct node *root = newNode(1); root->left = newNode(2); root->right = newNode(3); struct node* leaf=root; Postorder(root,&leaf); getchar(); return 0;
}
- gdg July 23, 2014 in United States| Report Duplicate | Flag | PURGE
Akamai
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.