ListUtils is not working?

ListUtils is not working .

here is my blocks

blocks - 2020-11-11T235547.144

do it result

You could try this extension:

Btw, seems that your list is already sorted :thinking:

i already try this extension. Same Result.

can we do it with for loop

Seems that your list is already sorted :thinking: 1-10-100-102-103,etc…I guess that is the right ascending order .

sorry , i have value from 1 to 120.

Maybe you can show your whole list ? Do you have negitave values in your list.

1 Like

it showing 1-10 where is 2,3,4,5,6…

Do It Result: ((1 10 100 101 102 103 104 105 106 107 108 109 11 110 111 112 113 114 115 116 117 118 119 12 120 13 14 15 16 17 18 19 2 20 21 22 23 24 25 26 27 28 29 3 30 31 32 33 34 35 36 37 38 39 4 40 41 42 43 44 45 46 47 48 49 5 50 51 52 53 54 55 56 57 58 59 6 60 61 62 63 64 65 66 67 68 69 7 70 71 72 73 74 75 76 77 78 79 8 80 81 82 83 84 85 86 87 88 89 9 90 91 92 93 94 95 96 97 98 99))
—

They are in non-numerical order.
All starting with 1 first …
All starting with 2 …
All starting with 3…

The solution was what @Mohamed_Tamer suggested.

3 Likes

Yes,It seems that ListUtils extension doesn’t sort vales in numerical order ( just in alphabetical order ) :
image
However:
image

4 Likes

Try to make your list like this :
001, 002, 003…010, 011, 012…099, 100, 101

may be this works.

EDIT: Not working

Screenshot 2020-11-12 004009

2 Likes

It is working , just use a global variable

2 Likes

i guess it’s about using text blocks ( Strigns ) instead of math blocks ( Integers ) :
image
probably because leading zeros are getting automatically removed, when using math blocks, but not with strings:
image

2 Likes

Every number 0 to the left … is ignored
In the string 0 on the left … It is valid

In Sort list blocks the numbers are being treated as strings.
In BubbleSort blocks the numbers are being treated as numbers. :laughing:

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.