Pregunta de entrevista de Garmin

Implement binary search.

Respuestas de entrevistas

Anónimo

8 de jun de 2010

Ah, yes. I found the binary....

Anónimo

7 de mar de 2012

struct treeNode { int val; struct treeNode *left; struct treeNode *right; }; struct treeNode *find(struct treeNode *p, int val) { if (val val) return find(p->left, val); else if (val > p->val) return find(p->right, val); else return p; }