You are viewing a single comment's thread. Return to all comments →
I have an even more space-efficient solution in O(1) auxiliary space (better than O(d) space) and O(n) time. https://www.hackerrank.com/challenges/beautiful-triplets/forum/comments/423984
Seems like cookies are disabled on this browser, please enable them to open this website
Beautiful Triplets
You are viewing a single comment's thread. Return to all comments →
I have an even more space-efficient solution in O(1) auxiliary space (better than O(d) space) and O(n) time. https://www.hackerrank.com/challenges/beautiful-triplets/forum/comments/423984