From 1cb3fdec535d4a1bfd6d6a326010d274e9355fed Mon Sep 17 00:00:00 2001 From: Tanmay-312 Date: Tue, 27 Feb 2024 17:30:48 +0530 Subject: [PATCH] Added codes for 27 Feb --- GeeksForGeeks/February/27-2-24/GFG.java | 62 ++++++++++++++++++++++++ GeeksForGeeks/February/27-2-24/README.md | 2 + LeetCode/February/README.md | 2 + LeetCode/February/Solution.java | 36 ++++++++++++++ 4 files changed, 102 insertions(+) create mode 100644 GeeksForGeeks/February/27-2-24/GFG.java create mode 100644 GeeksForGeeks/February/27-2-24/README.md create mode 100644 LeetCode/February/README.md create mode 100644 LeetCode/February/Solution.java diff --git a/GeeksForGeeks/February/27-2-24/GFG.java b/GeeksForGeeks/February/27-2-24/GFG.java new file mode 100644 index 0000000..ace0e60 --- /dev/null +++ b/GeeksForGeeks/February/27-2-24/GFG.java @@ -0,0 +1,62 @@ +//{ Driver Code Starts +//Initial Template for Java + +//Initial Template for Java + +//Initial Template for Java + +/*package whatever //do not write package name here */ + +import java.io.*; +import java.util.*; + + +class Array { + + // Driver code + public static void main (String[] args) throws IOException{ + // Taking input using buffered reader + BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + + int testcases = Integer.parseInt(br.readLine()); + + // looping through all testcases + while(testcases-- > 0){ + int sizeOfArray = Integer.parseInt(br.readLine()); + int arr [] = new int[sizeOfArray]; + + String line = br.readLine(); + String[] elements = line.trim().split("\\s+"); + for(int i = 0;i