Skip to content

benpop/lua-binsert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Bisect and binary insert on sorted lists.

Insert items into a list so the list remains sorted.

Functions:
	bisect(list, item)  -->  return index where item would be inserted
	binsert(list, item)  -->  insert item into list, return index where item was inserted

Based on Python's bisect library.
	Python-2.7.3/Lib/bisect.py
	Python-2.7.3/Modules/_bisectmodule.c

Works with both Lua 5.1 and 5.2.

~~benpop~~

About

Bisect and binary insertion on sorted lists.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages