BFE
.dev
EN
Practice
Explore
EN
JavaScript Coding Questions
178. Twitter mentions
Discuss
Current implementation: O(nk + k log k) time, O(n + k) space. In the worst case, time becomes O(n²)