MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / Rev2

Function Rev2

Arrays/31_Menu_for_Array.c:330–337  ·  view source on GitHub ↗

Reverse the array bby swapping each equidistant element

Source from the content-addressed store, hash-verified

328
329//Reverse the array bby swapping each equidistant element
330void Rev2(struct array *arr)
331{
332 int i,j;
333 for(i=0,j=arr->length-1;i<j;i++,j--)
334 {
335 swap(&arr->A[i],&arr->A[j]);
336 }
337}
338
339//Left Shift Function
340void lShift(struct array *arr)

Callers 1

mainFunction · 0.85

Calls 1

swapFunction · 0.70

Tested by

no test coverage detected