Skip to content

Instantly share code, notes, and snippets.

#!/bin/python
import sys
import bisect
def type_1_query(tv, value, minimum_time_to_right):
# find the position of the minimum value
pos = bisect.bisect_left(tv, (value, -1))
# print "min ", value, " at idx", pos
# sort all valid member based on time