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/min_num_opp_arr_cont.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 other/min_num_opp_arr_cont.cpp (limited to 'other/min_num_opp_arr_cont.cpp') diff --git a/other/min_num_opp_arr_cont.cpp b/other/min_num_opp_arr_cont.cpp deleted file mode 100644 index 5dcb40f..0000000 --- a/other/min_num_opp_arr_cont.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include "leetcode.h" - -class Solution { -public: - int minOperations(vector &nums) { - int n = nums.size(), ans = n, j = 0; - sort(nums.begin(), nums.end()); - nums.erase(unique(nums.begin(), nums.end()), nums.end()); - for (int i = 0; i < nums.size(); ++i) { - while (j < nums.size() && nums[j] < nums[i] + n) - ++j; - ans = min(ans, n - j + i); - } - return ans; - } -}; - -int main() { - Solution obj; - vector nums = {4, 2, 5, 3}; - cout << obj.minOperations(nums); -} -- cgit v1.2.3