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

Function rRot

Arrays/31_Menu_for_Array.c:387–401  ·  view source on GitHub ↗

Left Rotation Function

Source from the content-addressed store, hash-verified

385
386//Left Rotation Function
387void rRot(struct array *arr)
388{
389 int i,x;
390 x=arr->A[arr->length-1];
391 for(i=arr->length-1;i>0;i--)
392 {
393 arr->A[i]=arr->A[i-1];
394 }
395 arr->A[0]=x;
396 printf("\nThe elements in the array after right rotation are: \n");
397 for(i=0;i<=arr->length-1;i++)
398 {
399 printf("%d ",arr->A[i]);
400 }
401}
402
403//Insert in sorted array Funtion
404void InsertSort(struct array *arr,int x)

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected