Design and Analysis of Algorithms 214.: Introduction To The C Programming Language
Design and Analysis of Algorithms 214.: Introduction To The C Programming Language
U.U.Samantha Rajapaksha
B.Sc.(Eng.)
complex data structures that will persist beyond exit from the
module that built them.
Dynamically allocated variables are created an area of
int * a;
a = (int *) (malloc( sizeof( int ) ) );
1 x ← A[r]
2i←p-1
3 for j ← p to r - 1
4 do if A[j] ≤ x
5 then i ← i + 1
6 exchange A[i] ↔ A[j]
7 exchange A[i + 1] ↔ A[r]
8 return i + 1