Difference between revisions of "Talk:LlListSort"

From Second Life Wiki
Jump to navigation Jump to search
(Bubble Sort?)
 
Line 17: Line 17:


both in LSO and in Mono. This means that the sort is not [http://en.wikipedia.org/wiki/Sorting_algorithm#Stability stable]. Since stability is a characteristic of Bubble Sort, it looks like the claim of using Bubble Sort is not correct. --[[User:Pedro Oval|Pedro Oval]] 20:01, 5 April 2014 (PDT)
both in LSO and in Mono. This means that the sort is not [http://en.wikipedia.org/wiki/Sorting_algorithm#Stability stable]. Since stability is a characteristic of Bubble Sort, it looks like the claim of using Bubble Sort is not correct. --[[User:Pedro Oval|Pedro Oval]] 20:01, 5 April 2014 (PDT)
:Good point. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 21:26, 5 April 2014 (PDT)

Revision as of 20:26, 5 April 2014

Bubble Sort?

This script: <lsl> default {

   state_entry()
   {
       llOwnerSay(llList2CSV(llListSort([3,2,3,5,3,1,1,4], 2, TRUE)));
   }

} </lsl>

outputs

1, 4, 3, 5, 3, 1, 3, 2

both in LSO and in Mono. This means that the sort is not stable. Since stability is a characteristic of Bubble Sort, it looks like the claim of using Bubble Sort is not correct. --Pedro Oval 20:01, 5 April 2014 (PDT)

Good point. -- Strife (talk|contribs) 21:26, 5 April 2014 (PDT)