diff --git a/src/hackerrank/easy/Aravind_2d_easy.java b/src/hackerrank/easy/Aravind_2d_easy.java new file mode 100644 index 0000000..5baeced --- /dev/null +++ b/src/hackerrank/easy/Aravind_2d_easy.java @@ -0,0 +1,58 @@ +import java.util.Scanner; + +public class Aravind_2d_easy { + public static void main(String args[]) { + Scanner sc = new Scanner(System.in); + int arr[][] = new int[6][6]; + int sum[][] = new int[4][4]; + int largest=Integer.MIN_VALUE; + for (int i = 0; i < 6; i++) { + String[] arrRowItems = sc.nextLine().split(" "); + sc.skip("(\r\n|[\n\r\u2028\u2029\u0085])?"); + + for (int j = 0; j < 6; j++) { + int arrItem = Integer.parseInt(arrRowItems[j]); + arr[i][j] = arrItem; + } + } + + largest = fillHourSum(arr,sum,largest); + System.out.println(largest); + sc.close(); + } + + public static int fillHourSum(int[][] a, int[][] s, int larg) { + for(int i=0; i<=3; i++) { + for(int j=0; j<=3; j++) { + int sum =0; + for(int k=i; klarg? sum : larg; + } + } + //printArray(s); + return larg; + } + + public static void printArray(int[][] a) { + for(int i=0;i