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/stamping_sequence.cpp | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 other/stamping_sequence.cpp (limited to 'other/stamping_sequence.cpp') diff --git a/other/stamping_sequence.cpp b/other/stamping_sequence.cpp deleted file mode 100644 index b9ba317..0000000 --- a/other/stamping_sequence.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include "leetcode.h" - -class Solution { -public: - vector movesToStamp(string stamp, string target) { - if (stamp == target) - return {0}; - int sLen = stamp.size(), tLen = target.size() - sLen + 1, i, j; - vector ans; - bool tDiff = true, sDiff; - while (tDiff) { - for (i = 0, tDiff = false; i < tLen; i++) { - for (j = 0, sDiff = false; j < sLen; j++) { - if (target[i + j] == '*') - continue; - else if (target[i + j] != stamp[j]) - break; - else - sDiff = true; - } - if (j == sLen && sDiff) { - for (j = i, tDiff = true; j < sLen + i; j++) - target[j] = '*'; - ans.push_back(i); - } - } - for (i = 0; i < target.size(); i++) - if (target[i] != '*') - return {}; - reverse(ans.begin(), ans.end()); - } - return ans; - } -}; -- cgit v1.2.3