Upstart·Data Scientist·Technical Phone Screen
- Write a Python function to simulate radioactive decay with a half-life of one day. The function takes the number of days and number of atoms as inputs and returns the survival state of each atom. Also discuss how you'd verify the result against the theoretical distribution.
- Implement a factorial function in Python and describe multiple approaches you could use.
- Given an integer n, compute the number of trailing zeros in n! without explicitly calculating the factorial.
“I went with the straightforward approach: for each atom, flip a coin m times and check if it survived all of them.”