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

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

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

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

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