From 34babbb156af4f3808ae7a8c97af3d6afd7feea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Furkan=20T=C3=BCrkal?= Date: Wed, 25 Oct 2017 15:16:21 +0300 Subject: [PATCH] update readme.md --- array-rotation/README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/array-rotation/README.md b/array-rotation/README.md index 21befef..a5f4fdc 100644 --- a/array-rotation/README.md +++ b/array-rotation/README.md @@ -15,11 +15,12 @@ **METHOD 1 (Use temp array)** Input arr[] = [1, 2, 3, 4, 5, 6, 7], d = 2, n =7 -1) Store `d` elements in a temp array + +* 1) Store `d` elements in a temp array temp[] = [1, 2] -2) Shift rest of the `arr[]` +* 2) Shift rest of the `arr[]` arr[] = [3, 4, 5, 6, 7, 6, 7] -3) Store back the `d` elements +* 3) Store back the `d` elements arr[] = [3, 4, 5, 6, 7, 1, 2] Algorithm Complexity