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/search_suggestion_sys.cpp | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 other/search_suggestion_sys.cpp (limited to 'other/search_suggestion_sys.cpp') diff --git a/other/search_suggestion_sys.cpp b/other/search_suggestion_sys.cpp deleted file mode 100644 index 404c987..0000000 --- a/other/search_suggestion_sys.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "leetcode.h" -#include - -class Solution { -public: - vector> suggestedProducts(vector &products, - string searchWord) { - auto it = products.begin(); - sort(it, products.end()); - vector> ans; - string curr = ""; - for (char c : searchWord) { - curr += c; - vector suggested; - it = lower_bound(it, products.end(), curr); - for (int i = 0; i < 3 && it + i != products.end(); i++) { - string &s = *(it + i); - if (s.find(curr)) - break; - suggested.push_back(s); - } - ans.push_back(suggested); - } - return ans; - } -}; -- cgit v1.2.3