Content deleted Content added
m →Parallelization: Added middle initials to correctly distinguish author as per citation (and [[]] red-coding) - there are multiple 'David Powers' active in IT. Spelling/grammar/punctuation/typographical correction |
|||
Line 61:
''// Temporary pivot index''
i := lo
'''for''' j := lo '''to''' hi - 1 '''do'''
''// If the current element is less than or equal to the pivot''
'''if''' A[j] <= pivot '''then'''
''// Move the temporary pivot index forward''▼
i := i + 1▼
''// Swap the current element with the element at the temporary pivot index''
swap A[i] '''with''' A[j]
▲ ''// Move the temporary pivot index forward''
▲ i := i + 1
''//
swap A[i] '''with''' A[hi]
'''return''' i ''// the pivot index''
|