Google | Onsite | New Grad | Checks for groups of three values within d distance of one another.
Anonymous User
3875

Couldn't solve this one...

Your task is to write a function that, given a distance d and a stream
of floating point values received one at a time, checks for groups of
three values within d distance of one another. Store the floating point values
in memory as they are received. When a group of three values meeting the
distance criteria is found, return the three values and remove them from the
memory.

Comments (13)