From a4fd4cf269972038073ebca570cc15cbc13b6889 Mon Sep 17 00:00:00 2001 From: Shubham Patil <72293804+shubhamp474@users.noreply.github.com> Date: Tue, 6 Oct 2020 18:44:07 +0530 Subject: [PATCH] Create Lapindromes Lapindrome is defined as a string which when split in the middle, gives two halves having the same characters and same frequency of each character --- Lapindromes | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Lapindromes diff --git a/Lapindromes b/Lapindromes new file mode 100644 index 0000000..da373e7 --- /dev/null +++ b/Lapindromes @@ -0,0 +1,52 @@ +#include +#include +#include +#include +#include + +using namespace std; + +int main(){ + int t; + cin>>t; + + while(t--){ + string str; + cin>>str; + + int arr1[26]={0}; + int arr2[26]={0}; + if(str.length()%2==0){ + for(int i=0 ;i