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/letter_combo_number.cpp | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 other/letter_combo_number.cpp (limited to 'other/letter_combo_number.cpp') diff --git a/other/letter_combo_number.cpp b/other/letter_combo_number.cpp deleted file mode 100644 index c15a628..0000000 --- a/other/letter_combo_number.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include "leetcode.h" - -class Solution { -public: - vector letterCombinations(string digits) { - if (digits.empty()) - return {}; - vector ans; - ans.push_back(""); - for (auto digit : digits) { - vector tmp; - for (auto candidate : nums[digit - '0']) - for (auto s : ans) - tmp.push_back(s + candidate); - ans.swap(tmp); - } - for (int i = 0; i < digits.size(); i++) - cout << ans[i]; - return ans; - } - -private: - const vector nums = {"", "", "abc", "def", "ghi", - "jkl", "mno", "pqrs", "tuv", "wxyz"}; -}; - -int main() { - string digits = "23"; - cout << digits << endl; - Solution obj; - obj.letterCombinations(digits); -} -- cgit v1.2.3