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/design_underground_system.cpp | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 other/design_underground_system.cpp (limited to 'other/design_underground_system.cpp') diff --git a/other/design_underground_system.cpp b/other/design_underground_system.cpp deleted file mode 100644 index f0904d2..0000000 --- a/other/design_underground_system.cpp +++ /dev/null @@ -1,20 +0,0 @@ -class UndergroundSystem { -public: - unordered_map> checkIns; - unordered_map> routes; - UndergroundSystem() {} - void checkIn(int id, string stationName, int t) { - checkIns[id] = {stationName, t}; - } - void checkOut(int id, string stationName, int t) { - auto [stn, start] = checkIns[id]; - checkIns.erase(id); - string route = stn + "," + stationName; - routes[route].first++; - routes[route].second += t - start; - } - double getAverageTime(string startStation, string endStation) { - auto &[count, sum] = routes[startStation + "," + endStation]; - return (double)sum / count; - } -}; -- cgit v1.2.3