From 89d0b01e447ba03d0f91b1ccc412006367018764 Mon Sep 17 00:00:00 2001 From: Shanmukha Innovations Date: Mon, 2 Jul 2018 10:20:42 +0000 Subject: [PATCH] Update CountInStrings.md --- CS/{CountInStrings.md => EqualityInStrings.md} | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) rename CS/{CountInStrings.md => EqualityInStrings.md} (73%) diff --git a/CS/CountInStrings.md b/CS/EqualityInStrings.md similarity index 73% rename from CS/CountInStrings.md rename to CS/EqualityInStrings.md index c075148..03a8175 100644 --- a/CS/CountInStrings.md +++ b/CS/EqualityInStrings.md @@ -1,15 +1,14 @@ - ## Byomkesh needs to check for equality ## -Byomkesh : Ajit babu, are you game to solve a challenge ? -Ajit : Do I have a choice ? -Byomkesh : Ha, ha, hah. Do not feel so resigned. Challenges are good for the little grey cells as Hercule Poirot would say. -Ajit : I am no Hercule Poirot. Or Byomkesh Bakshi for that matter. -Byomkesh : Yes. yes. You are the one and only Ajit Kumar Mitra ! -Ajit : Ok. Let us hear your challenge. +Byomkesh : Ajit babu, are you game to solve a challenge ? \ +Ajit : Do I have a choice ? \ +Byomkesh : Ha, ha, hah. Do not feel so resigned. Challenges are good for the little grey cells as Hercule Poirot would say. \ +Ajit : I am no Hercule Poirot. Or Byomkesh Bakshi for that matter. \ +Byomkesh : Yes. yes. You are the one and only Ajit Kumar Mitra ! \ +Ajit : Ok. Let us hear your challenge. \ -Byomkesh : I have this string of characters. The string has only two types of characters - either 'A' or 'B'. -They can be repeated any number of times. I need to find out if the string has equal number of 'A's and 'B's or not. +Byomkesh : I have this string of characters. The string has only two types of characters - either 'A' or 'B'. \ +They can be repeated any number of times. I need to find out if the string has equal number of 'A's and 'B's or not. \ Ajit : This is easy for a change ! Just iterate through the string, count the number of each character and compare at the end. Byomkesh : Not so fast my friend. There are constraints.