From c0eb73aff096c235a2628a408d3b8cc3ae1493a5 Mon Sep 17 00:00:00 2001 From: joshiujjawal22 Date: Mon, 18 May 2020 23:35:06 +0530 Subject: [PATCH] Rotation of an array without using extra space --- ...on of array without using extra space.java | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 Others/Rotation of array without using extra space.java diff --git a/Others/Rotation of array without using extra space.java b/Others/Rotation of array without using extra space.java new file mode 100644 index 000000000..c25dbaefc --- /dev/null +++ b/Others/Rotation of array without using extra space.java @@ -0,0 +1,54 @@ +package Others; + +import java.util.*; + +/** + * Rotation of array without using extra space + * + * + * @author Ujjawal Joshi + * @date 2020.05.18 + */ + +class main{ + public static void main(String[] args) + { + Scanner sc=new Scanner(System.in); + int n=sc.nextInt(); + int a[][]=new int[n][n]; + + for(int i=0;i