Skip to content

Commit a3c6be4

Browse files
icembergappgurueu
andauthored
Update src/sorting/countingsort.lua
Co-authored-by: Lars Müller <[email protected]>
1 parent c08bc1a commit a3c6be4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sorting/countingsort.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ return function(
88
key_function = key_function or function(x) return x end
99

1010
-- Handle empty list case
11-
if #list == 0 then return end
11+
if list[1] == nil then return end
1212

1313
-- Find the range of keys (min_key and max_key)
1414
local min_key, max_key = math.huge, -math.huge

0 commit comments

Comments
 (0)