The coding question was: given list of integers temps, temps[i] represents the temperature at day i, return a list of for each day, how many days until a warmer day. ex: [45, 43, 44, 50, 60] → res = [3, 1, 1, 1, 0], ex: [43, 42, 41] → res = [0, 0, 0]. I did a brute force approach first, and then the interviewer asked for a more optimized solution. I didn't know what to do, so they helped guide me to a solution that used a stack.
Comments (3)


