From a23ea33e8ae5dc29ef97d88ec90f2574e388c049 Mon Sep 17 00:00:00 2001 From: himanimadaan Date: Wed, 14 Oct 2020 12:48:42 +0530 Subject: [PATCH] Added new gfg strings problem- Longest Even length substring --- GFG/Strings/Longest Even length substring.cpp | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 GFG/Strings/Longest Even length substring.cpp diff --git a/GFG/Strings/Longest Even length substring.cpp b/GFG/Strings/Longest Even length substring.cpp new file mode 100644 index 0000000..ed4d317 --- /dev/null +++ b/GFG/Strings/Longest Even length substring.cpp @@ -0,0 +1,29 @@ +#include +using namespace std; +int main() + { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + int T; + cin>>T; + while(T--){ + string s; + cin>>s; + int res=0; + int l,r,lsum=0,rsum=0; + for(int i=0;i=0 && r