From 8b7cf19ef76cdce2ee18bbbd76505f282dd498e9 Mon Sep 17 00:00:00 2001 From: Tanmay-312 Date: Mon, 29 Jan 2024 12:01:27 +0530 Subject: [PATCH] Added codes for 29 Jan --- GeeksForGeeks/January/29-1-24/GFG.java | 66 +++++++++++++++++++++++++ GeeksForGeeks/January/29-1-24/README.md | 2 + LeetCode/January/29-1-24/README.md | 2 + LeetCode/January/29-1-24/Solution.java | 30 +++++++++++ 4 files changed, 100 insertions(+) create mode 100644 GeeksForGeeks/January/29-1-24/GFG.java create mode 100644 GeeksForGeeks/January/29-1-24/README.md create mode 100644 LeetCode/January/29-1-24/README.md create mode 100644 LeetCode/January/29-1-24/Solution.java diff --git a/GeeksForGeeks/January/29-1-24/GFG.java b/GeeksForGeeks/January/29-1-24/GFG.java new file mode 100644 index 0000000..5f718b6 --- /dev/null +++ b/GeeksForGeeks/January/29-1-24/GFG.java @@ -0,0 +1,66 @@ +//{ Driver Code Starts +//Initial Template for Java + +import java.util.*; +import java.lang.*; +import java.io.*; +class GFG +{ + public static void main(String[] args) throws IOException + { + BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + int T = Integer.parseInt(br.readLine().trim()); + while(T-->0) + { + String str = br.readLine().trim(); + Solution ob = new Solution(); + int ans = ob.TotalCount(str); + System.out.println(ans); + } + } +} + +// } Driver Code Ends + + +//User function Template for Java + +class Solution +{ + public int TotalCount(String str) + { + // Code here + int i,j,sum=0,ans =1,n = str.length(); + int[][] sums = new int[n][n]; + + for(i=0;i input = new ArrayDeque<>(); + private Deque output = new ArrayDeque<>(); +}