employer cover photo
employer logo
employer logo

Intrepid Pursuits

Is this your company?

Intrepid Pursuits Interview Question

Solve for n factorial using recursion.

Interview Answers

Anonymous

Jul 25, 2017

let num = 6 var runningNum = 1 for index in 1...num { runningNum = runningNum*index //print(runningNum) //Optional } print("\(num) factorial is \(runningNum)")

Anonymous

Feb 15, 2018

here is my python solution def factorial(base, n): if n == 0: return 1 elif n % 2 == 1: return base * factorial(base * base, n/2) else: return factorial(base * base, n/2)

Anonymous

Oct 20, 2018

What is the entire interview process like? How many coding challenges were there?