Sorting algorithms/Cocktail sort: Difference between revisions

m
→‎{{header|R}}: Syntax highlighting.
(Added solution for Action!)
m (→‎{{header|R}}: Syntax highlighting.)
Line 3,522:
=={{header|R}}==
The previously solution missed out on a cool R trick for swapping items. As R is 1-indexed, we have made some minor adjustments to the given pseudo-code. Otherwise, we have aimed to be faithful to it.
<lang rrsplus>cocktailSort<-function(A)
{
repeat
331

edits