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/max_consecutive_ones3.cpp | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 other/max_consecutive_ones3.cpp (limited to 'other/max_consecutive_ones3.cpp') diff --git a/other/max_consecutive_ones3.cpp b/other/max_consecutive_ones3.cpp deleted file mode 100644 index cff044f..0000000 --- a/other/max_consecutive_ones3.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "leetcode.h" - -class Solution { -public: - int longestOnes(vector &nums, int k) { - int start = 0, end, count = 0, ans = 0; - for (int end = 0; end < nums.size(); end++) { - if (!nums[end]) - count++; - if (count == k + 1) { - while (nums[start]) - start++; - start++; - count--; - } - ans = max(ans, end - start + 1); - } - return ans; - } -}; - -int main() { - Solution obj; - vector nums = {1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0}; - int k = 2; - cout << obj.longestOnes(nums, k); -} -- cgit v1.2.3