Example #1
0
        public static void KMPTest()
        {
            string pat = "ABRA";
            string txt = "ABACADABRAC";

            Console.WriteLine(SubstringSearching.KMPSearch(pat, txt));
        }
Example #2
0
        public static void BoyerMooreSearchTest()
        {
            string pat = "ABRA";
            string txt = "ABACADABRAC";

            Console.WriteLine(SubstringSearching.BoyerMooreSearch(pat, txt));
        }
Example #3
0
        public static void RabinKarpTest()
        {
            string pat = "ABRA";
            string txt = "ABACADABRAC";

            Console.WriteLine(SubstringSearching.RabinKarpSearch(pat, txt));
        }
Example #4
0
        public static void ImprovedBruteForceSearchTest()
        {
            string pat = "ABRA";
            string txt = "ABACADABRAC";

            Console.WriteLine(SubstringSearching.ImprovedBruteForceSearch(pat, txt));
        }