From d8b3e6bc6b09243450ce0e76439263b86d7808b9 Mon Sep 17 00:00:00 2001 From: shakircode <92287955+shakircode@users.noreply.github.com> Date: Mon, 11 Oct 2021 19:16:41 +0530 Subject: [PATCH 1/2] Create Rotate an array to the left.js 1 position --- Rotate an array to the left.js 1 position | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Rotate an array to the left.js 1 position diff --git a/Rotate an array to the left.js 1 position b/Rotate an array to the left.js 1 position new file mode 100644 index 0000000..205d71b --- /dev/null +++ b/Rotate an array to the left.js 1 position @@ -0,0 +1,9 @@ +var ar = [1, 2, 3]; +rotateLeft(ar); +println(ar); + +function rotateLeft(ar) +{ + var first = ar.shift(); + ar.push(first); +} From 030fd0f7fc3d7135cc3565ff135e2ce8fe4e4551 Mon Sep 17 00:00:00 2001 From: shakircode <92287955+shakircode@users.noreply.github.com> Date: Mon, 11 Oct 2021 19:17:19 +0530 Subject: [PATCH 2/2] Rename Rotate an array to the left.js 1 position to Rotate an array to the left 1 position.js --- ...eft.js 1 position => Rotate an array to the left 1 position.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Rotate an array to the left.js 1 position => Rotate an array to the left 1 position.js (100%) diff --git a/Rotate an array to the left.js 1 position b/Rotate an array to the left 1 position.js similarity index 100% rename from Rotate an array to the left.js 1 position rename to Rotate an array to the left 1 position.js