Triad Systems interview question

Write factorial in recursion,binary search