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

Function lRot

Arrays/31_Menu_for_Array.c:370–384  ·  view source on GitHub ↗

Left Rotation Function

Source from the content-addressed store, hash-verified

368
369//Left Rotation Function
370void lRot(struct array *arr)
371{
372 int i,x;
373 x=arr->A[0];
374 for(i=0;i<arr->length-1;i++)
375 {
376 arr->A[i]=arr->A[i+1];
377 }
378 arr->A[arr->length-1]=x;
379 printf("\nThe elements in the array after left rotation are: \n");
380 for(i=0;i<=arr->length-1;i++)
381 {
382 printf("%d ",arr->A[i]);
383 }
384}
385
386//Left Rotation Function
387void rRot(struct array *arr)

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected