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/daily_temps.cpp | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 other/daily_temps.cpp (limited to 'other/daily_temps.cpp') diff --git a/other/daily_temps.cpp b/other/daily_temps.cpp deleted file mode 100644 index e244252..0000000 --- a/other/daily_temps.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "leetcode.h" - -class Solution { -public: - vector dailyTemperatures(vector &temperatures) { - int n = temperatures.size(); - vector nge(n, 0); - stack stk{}; - for (int i = n - 1; i >= 0; --i) { - while (!stk.empty() && temperatures[stk.top()] <= temperatures[i]) - stk.pop(); - if (!stk.empty()) - nge[i] = stk.top() - i; - stk.push(i); - } - return nge; - } -}; - -int main() { - Solution obj; - vector t1 = {73, 74, 75, 71, 69, 72, 76, 73}; - vector t2 = {30, 40, 50, 60}; - vector t3 = {30, 60, 90}; - obj.dailyTemperatures(t1); // expect 1,1,4,2,1,1,0,0 - obj.dailyTemperatures(t2); // expect 1,1,1,0 - obj.dailyTemperatures(t3); // expect 1,1,0 -} -- cgit v1.2.3