From d8f3b40085619cb680c8f227c65a1f5acc393223 Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 23 Feb 2021 21:07:19 +0800 Subject: Move leetcode solutions to subdir. --- cpp/1347.cpp | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 cpp/1347.cpp (limited to 'cpp/1347.cpp') diff --git a/cpp/1347.cpp b/cpp/1347.cpp deleted file mode 100644 index 154a6b5..0000000 --- a/cpp/1347.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include - -using std::string; - -class Solution -{ -public: - int minSteps(string s, string t) - { - int s_count[26]{0}; - int t_count[26]{0}; - - for (auto c : s) - { - s_count[c - 'a']++; - } - - for (auto c : t) - { - t_count[c - 'a']++; - } - - int result = 0; - - for (int i = 0; i < 26; i++) - { - int a = s_count[i]; - int b = t_count[i]; - if (a > b) - result += a - b; - } - - return result; - } -}; \ No newline at end of file -- cgit v1.2.3