MCPcopy Create free account
hub / github.com/grantjenks/python-sortedcontainers / slow_find_le

Function slow_find_le

tests/sortedcollection.py:254–259  ·  view source on GitHub ↗

Last item with a key less-than or equal to k.

(seq, k)

Source from the content-addressed store, hash-verified

252 return -1
253
254 def slow_find_le(seq, k):
255 'Last item with a key less-than or equal to k.'
256 for item in reversed(seq):
257 if item <= k:
258 return item
259 return -1
260
261 def slow_find_lt(seq, k):
262 'Last item with a key less-than k.'

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected