Meta interview question

write some code, analyze the worst case complexity