From daeb29582d2e26f129c5ab472755ecb2735276a6 Mon Sep 17 00:00:00 2001 From: Gourav Goel <47769737+2701gouravgoel@users.noreply.github.com> Date: Sun, 23 Oct 2022 21:30:35 +0530 Subject: [PATCH 1/3] Create 45. Jump Game II.cpp --- 45. Jump Game II.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 45. Jump Game II.cpp diff --git a/45. Jump Game II.cpp b/45. Jump Game II.cpp new file mode 100644 index 0000000..8ae7acf --- /dev/null +++ b/45. Jump Game II.cpp @@ -0,0 +1,19 @@ +class Solution { +public: + int jump(vector& nums) + { + int n=nums.size(); + long long int dp[n]; + for(int i=0;i Date: Sun, 23 Oct 2022 21:33:38 +0530 Subject: [PATCH 2/3] Create 221. Maximal Square.cpp --- 221. Maximal Square.cpp | 57 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 221. Maximal Square.cpp diff --git a/221. Maximal Square.cpp b/221. Maximal Square.cpp new file mode 100644 index 0000000..29441fb --- /dev/null +++ b/221. Maximal Square.cpp @@ -0,0 +1,57 @@ +class Solution { +public: + int maximalSquare(vector> matrix) + { + int n=matrix.size(); + int m=matrix[0].size(); + int top[n][m]; + for(int i=0;i=0) + r-=top[i-k][j]; + if(j-k>=0) + r-=top[i][j-k]; + if(j-k>=0&&i-k>=0) + r+=top[i-k][j-k]; + if(r==k*k) + ans=max(ans,k*k); + } + } + } + return ans; + } +}; From 65cdcd9e2a1f83011e0ee4d4422c794e2735b5c2 Mon Sep 17 00:00:00 2001 From: Gourav Goel <47769737+2701gouravgoel@users.noreply.github.com> Date: Sun, 23 Oct 2022 21:34:39 +0530 Subject: [PATCH 3/3] Delete 45. Jump Game II.cpp --- 45. Jump Game II.cpp | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 45. Jump Game II.cpp diff --git a/45. Jump Game II.cpp b/45. Jump Game II.cpp deleted file mode 100644 index 8ae7acf..0000000 --- a/45. Jump Game II.cpp +++ /dev/null @@ -1,19 +0,0 @@ -class Solution { -public: - int jump(vector& nums) - { - int n=nums.size(); - long long int dp[n]; - for(int i=0;i