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_area_cake.cpp | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 other/max_area_cake.cpp (limited to 'other/max_area_cake.cpp') diff --git a/other/max_area_cake.cpp b/other/max_area_cake.cpp deleted file mode 100644 index da1f745..0000000 --- a/other/max_area_cake.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include "leetcode.h" - -class Solution { -public: - int maxArea(int h, int w, vector &horizontalCuts, - vector &verticalCuts) { - sort(horizontalCuts.begin(), horizontalCuts.end()); - sort(verticalCuts.begin(), verticalCuts.end()); - int maxH = max(horizontalCuts[0], h - horizontalCuts.back()); - int maxV = max(verticalCuts[0], w - verticalCuts.back()); - for (int i = 1; i < horizontalCuts.size(); i++) - maxH = max(maxH, horizontalCuts[i] - horizontalCuts[i - 1]); - for (int i = 1; i < verticalCuts.size(); i++) - maxV = max(maxV, verticalCuts[i] - verticalCuts[i - 1]); - return ((long)maxH * maxV % 1000000007); - } -}; - -int main() { - Solution obj; - int h = 5, w = 4; - vector horizontalCuts = {1, 2, 4}; - vector verticalCuts = {1, 3}; - cout << obj.maxArea(h, w, horizontalCuts, verticalCuts); -} -- cgit v1.2.3