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/split_array_consec_subseq.cpp | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 other/split_array_consec_subseq.cpp (limited to 'other/split_array_consec_subseq.cpp') diff --git a/other/split_array_consec_subseq.cpp b/other/split_array_consec_subseq.cpp deleted file mode 100644 index 622e296..0000000 --- a/other/split_array_consec_subseq.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "leetcode.h" - -class Solution { -public: - bool isPossible(vector &nums) { - unordered_map um; - for (auto &it : nums) - um[it]++; - for (auto &it : nums) { - if (um[it] == 0) - continue; - int freq = um[it], curr = it, count = 0; - while (um.count(curr) && um[curr] >= freq) { - freq = fmax(freq, um[curr]); - um[curr]--; - count++; - curr++; - } - if (count < 3) - return false; - } - return true; - } -}; - -int main() { - Solution obj; - vector nums = {1, 2, 3, 4, 5}; - if (obj.isPossible(nums)) - cout << "true"; - else - cout << "false"; -} -- cgit v1.2.3