Domanda di colloquio di Reddit

Solve an algorithms question without using a Set data structure. Problem modeled theoretical streams of text messages, you had to find the ones that were 5 before and 5 after.