Doordash Phone Interview | E4 | Seattle, WA
Anonymous User
1200

I was asked a variation of this problem https://leetcode.com/problems/count-all-valid-pickup-and-delivery-options/

but instead of counting up all valid options they asked to actually generate valid pickup/delivery sequences as output, i solved the question using the brute force way but couldnt figure out the time complexity.
i figured the time complexity was around the order of O(n!) since its a combination problem but it seemed that the interview implied it wasnt right, anyone know how to figure that part out?

Comments (2)