UNITY (programming language): Difference between revisions

Content deleted Content added
m > --> <
m Insertion sort --> bubble sort.
Line 6:
==Examples==
 
===InsertionsortBubble sort===
 
[[InsertionBubble sort]] the array by comparing adjacent numbers, and swapping them if they are in the wrong order. Using <math>\Theta(n)</math> time and <math>\Theta(n)</math> processors.
 
Program sort2
Line 23:
end
 
===MergesortMerge sort===
 
[[Merge sort]] the array using a constant time merge. Using <math>\Theta(\log n)</math> time and <math>\Theta(n^2)</math> processors. In this example, a value may be written many times simultaneously, and values might be duplicated, since we are not carefull with the <code>&lt;=</code> operator. If you expand the <code>a,b</code> quantification, you can get CREW [[PRAM]] complexity.