Meta Interview Question

write a algorithm to calculate the running time for a sequence of tasks.