Example #1
0
        public void SuggestedProducts_3()
        {
            var solution = new _1268_SearchSuggestionsSystem();
            var result   = solution.SuggestedProducts(new string[] { "bags", "baggage", "banner", "box", "cloths" }, "bags");

            AssertHelper.AssertList(new List <IList <string> >()
            {
                new string[] { "baggage", "bags", "banner" },
                new string[] { "baggage", "bags", "banner" },
                new string[] { "baggage", "bags" },
                new string[] { "bags" },
            }, result);
        }
Example #2
0
        public void SuggestedProducts_1()
        {
            var solution = new _1268_SearchSuggestionsSystem();
            var result   = solution.SuggestedProducts(new string[] { "mobile", "mouse", "moneypot", "monitor", "mousepad" }, "mouse");

            AssertHelper.AssertList(new List <IList <string> >()
            {
                new string[] { "mobile", "moneypot", "monitor" },
                new string[] { "mobile", "moneypot", "monitor" },
                new string[] { "mouse", "mousepad" },
                new string[] { "mouse", "mousepad" },
                new string[] { "mouse", "mousepad" },
            }, result);
        }
Example #3
0
        public void SuggestedProducts_2()
        {
            var solution = new _1268_SearchSuggestionsSystem();
            var result   = solution.SuggestedProducts(new string[] { "havana" }, "havana");

            AssertHelper.AssertList(new List <IList <string> >()
            {
                new string[] { "havana" },
                new string[] { "havana" },
                new string[] { "havana" },
                new string[] { "havana" },
                new string[] { "havana" },
                new string[] { "havana" },
            }, result);
        }