DEV Community

loading...

Answer: Finding all common ranges finding between multiple clients

paddy3118 profile image Paddy3118 ・1 min read

This method creates a "number line" of points starting and stopping individual ranges, then traverses the number line from minimum point upwards counting an occupancy of +1 for every range started, -1 for every range stopped.

The Code

"""
See: https://stackoverflow.com/questions/65812746/finding-all-common-ranges-finding-between-multiple-clients

Created on Wed Jan 20 17:28:44 2021

@author: Paddy3118

Discussion (0)

pic
Editor guide