The question was the exact same as this one:
https://leetcode.com/discuss/interview-question/5972942
Answer can be found here:
https://leetcode.com/discuss/interview-question/1671654/google-onsite-new-grad-checks-for-groups-of-three-values-within-d-distance-of-one-another
Look at foraccode's reply for the code. I gave the same solution but instead of using an array, used a binary search tree.
Comments (4)


