From efdb9b36d6fb436c491ac7d2b675e3934f370463 Mon Sep 17 00:00:00 2001 From: chayan das <110921638+Chayandas07@users.noreply.github.com> Date: Wed, 1 Jan 2025 14:14:28 +0530 Subject: [PATCH] Create 1422. Maximum Score After Splitting a String --- 1422. Maximum Score After Splitting a String | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 1422. Maximum Score After Splitting a String diff --git a/1422. Maximum Score After Splitting a String b/1422. Maximum Score After Splitting a String new file mode 100644 index 0000000..9735941 --- /dev/null +++ b/1422. Maximum Score After Splitting a String @@ -0,0 +1,15 @@ +class Solution { +public: + int maxScore(string s) { + int m=0,o=0,z=0,n=s.length(); + for(int i=0;i<=n;i++){ + if(s[i]=='1') o++; + } + for(int i=0;i