We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c08bc1a commit a3c6be4Copy full SHA for a3c6be4
src/sorting/countingsort.lua
@@ -8,7 +8,7 @@ return function(
8
key_function = key_function or function(x) return x end
9
10
-- Handle empty list case
11
- if #list == 0 then return end
+ if list[1] == nil then return end
12
13
-- Find the range of keys (min_key and max_key)
14
local min_key, max_key = math.huge, -math.huge
0 commit comments