From 55a67f776dd9acd258cae16ffb636751666b0f40 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Mon, 3 Feb 2025 15:37:19 -0700 Subject: chore: Remove incomplete solutions --- underground_system.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 underground_system.cpp (limited to 'underground_system.cpp') diff --git a/underground_system.cpp b/underground_system.cpp deleted file mode 100644 index fd4fbbf..0000000 --- a/underground_system.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include "leetcode.h" - -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; - } -}; - -int main() {} -- cgit v1.2.3