Question d’entretien chez Intrepid Pursuits

Solve for n factorial using recursion.

Réponses aux questions d'entretien

Utilisateur anonyme

25 juill. 2017

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

Utilisateur anonyme

15 févr. 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)

Utilisateur anonyme

20 oct. 2018

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