Skip to content

Commit 0fe8910

Browse files
committed
Resolving error
1 parent 41b420e commit 0fe8910

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pydatastructs/linear_data_structures/algorithms.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1906,9 +1906,7 @@ def radix_sort(array, comp=lambda u, v: u <= v, **kwargs):
19061906
start = kwargs.get('start', 0)
19071907
end = kwargs.get('end', len(array) - 1)
19081908

1909-
sub_array = []
1910-
for i in range(start, end + 1):
1911-
sub_array.append(array[i])
1909+
sub_array = [array[i] for i in range(start, end + 1) if array[i] is not None]
19121910

19131911
# Remove None values from sub_array before sorting
19141912
sub_array = [x for x in sub_array if x is not None]

0 commit comments

Comments
 (0)