From a96b65cbfad7f62f3db6b2eab105e4e25c0414c5 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Fri, 27 Jun 2025 12:23:02 -0600 Subject: chore: remove old cpp and rust solutions --- other/count_and_say.cpp | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 other/count_and_say.cpp (limited to 'other/count_and_say.cpp') diff --git a/other/count_and_say.cpp b/other/count_and_say.cpp deleted file mode 100644 index a1086b4..0000000 --- a/other/count_and_say.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "leetcode.h" - -class Solution { -public: - string countAndSay(int n) { - if (n == 0) - return ""; - string ans = "1"; - while (--n) { - string curr = ""; - for (int i = 0; i < ans.size(); i++) { - int count = 1; - while ((i + 1 < ans.size()) && (ans[i] == ans[i + 1])) - count++, i++; - curr += to_string(count) + ans[i]; - } - ans = curr; - } - return ans; - } -}; - -int main() { - Solution obj; - cout << obj.countAndSay(4); -} -- cgit v1.2.3