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_refueling_stops.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 other/min_num_refueling_stops.cpp (limited to 'other/min_num_refueling_stops.cpp') diff --git a/other/min_num_refueling_stops.cpp b/other/min_num_refueling_stops.cpp deleted file mode 100644 index 34d929b..0000000 --- a/other/min_num_refueling_stops.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include "leetcode.h" - -class Solution { -public: - int minRefuelStops(int target, int startFuel, vector> &stations) { - int n = stations.size(), ans = 0; - priority_queue pq; - for (int i = 0; i <= n; i++) { - int dist = i == n ? target : stations[i][0]; - while (startFuel < dist) { - if (!pq.size()) - return -1; - startFuel += pq.top(); - ans++; - pq.pop(); - } - if (i < n) - pq.push(stations[i][1]); - } - return ans; - } -}; -- cgit v1.2.3