Skip to content

Commit b083bc9

Browse files
Add Knuth-Morris-Pratt (KMP) string matching algorithm [HACKTOBERFEST 2025] (#157)
1 parent 1ae8bda commit b083bc9

File tree

3 files changed

+362
-1
lines changed

3 files changed

+362
-1
lines changed

DIRECTORY.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,26 @@
4646
* [Coin Change](https://github.com/TheAlgorithms/R/blob/HEAD/dynamic_programming/coin_change.r)
4747
* [Longest Common Subsequence](https://github.com/TheAlgorithms/R/blob/HEAD/dynamic_programming/longest_common_subsequence.r)
4848
* [Longest Increasing Subsequence](https://github.com/TheAlgorithms/R/blob/HEAD/dynamic_programming/longest_increasing_subsequence.r)
49+
* [Matrix Chain Multiplication](https://github.com/TheAlgorithms/R/blob/HEAD/dynamic_programming/matrix_chain_multiplication.r)
50+
* [Minimum Path Sum](https://github.com/TheAlgorithms/R/blob/HEAD/dynamic_programming/minimum_path_sum.r)
51+
* [Subset Sum](https://github.com/TheAlgorithms/R/blob/HEAD/dynamic_programming/subset_sum.r)
4952

5053
## Graph Algorithms
54+
* [Bellman Ford Shortest Path](https://github.com/TheAlgorithms/R/blob/HEAD/graph_algorithms/bellman_ford_shortest_path.r)
5155
* [Breadth First Search](https://github.com/TheAlgorithms/R/blob/HEAD/graph_algorithms/breadth_first_search.r)
56+
* [Bridge Detector](https://github.com/TheAlgorithms/R/blob/HEAD/graph_algorithms/bridge_detector.r)
5257
* [Depth First Search](https://github.com/TheAlgorithms/R/blob/HEAD/graph_algorithms/depth_first_search.r)
5358
* [Dijkstra Shortest Path](https://github.com/TheAlgorithms/R/blob/HEAD/graph_algorithms/dijkstra_shortest_path.r)
54-
* [Bellman-Ford Shortest Path](https://github.com/TheAlgorithms/R/blob/HEAD/graph_algorithms/bellman_ford_shortest_path.r)
59+
* [Floyd Warshall](https://github.com/TheAlgorithms/R/blob/HEAD/graph_algorithms/floyd_warshall.r)
60+
61+
## Machine Learning
62+
* [Gradient Boosting](https://github.com/TheAlgorithms/R/blob/HEAD/machine_learning/gradient_boosting.r)
5563

5664
## Mathematics
5765
* [Amicable Numbers](https://github.com/TheAlgorithms/R/blob/HEAD/mathematics/amicable_numbers.r)
5866
* [Armstrong Number](https://github.com/TheAlgorithms/R/blob/HEAD/mathematics/armstrong_number.r)
5967
* [Bisection Method](https://github.com/TheAlgorithms/R/blob/HEAD/mathematics/bisection_method.r)
68+
* [Catalan Numbers](https://github.com/TheAlgorithms/R/blob/HEAD/mathematics/catalan_numbers.r)
6069
* [Euclidean Distance](https://github.com/TheAlgorithms/R/blob/HEAD/mathematics/euclidean_distance.r)
6170
* [Extended Euclidean Algorithm](https://github.com/TheAlgorithms/R/blob/HEAD/mathematics/extended_euclidean_algorithm.r)
6271
* [Factorial](https://github.com/TheAlgorithms/R/blob/HEAD/mathematics/factorial.r)
@@ -65,6 +74,8 @@
6574
* [Greatest Common Divisor](https://github.com/TheAlgorithms/R/blob/HEAD/mathematics/greatest_common_divisor.r)
6675
* [Josephus Problem](https://github.com/TheAlgorithms/R/blob/HEAD/mathematics/josephus_problem.r)
6776
* [Least Common Multiple](https://github.com/TheAlgorithms/R/blob/HEAD/mathematics/least_common_multiple.r)
77+
* [Modular Exponentiation](https://github.com/TheAlgorithms/R/blob/HEAD/mathematics/modular_exponentiation.r)
78+
* [Newton Raphson Method](https://github.com/TheAlgorithms/R/blob/HEAD/mathematics/newton_raphson_method.r)
6879
* [Perfect Number](https://github.com/TheAlgorithms/R/blob/HEAD/mathematics/perfect_number.r)
6980
* [Perfect Square](https://github.com/TheAlgorithms/R/blob/HEAD/mathematics/perfect_square.r)
7081
* [Permutation Calculation](https://github.com/TheAlgorithms/R/blob/HEAD/mathematics/permutation_calculation.r)
@@ -73,20 +84,26 @@
7384
* [Sieve Of Eratosthenes](https://github.com/TheAlgorithms/R/blob/HEAD/mathematics/sieve_of_eratosthenes.r)
7485

7586
## Quantitative Finance
87+
* [Black Scholes Option Pricing](https://github.com/TheAlgorithms/R/blob/HEAD/quantitative_finance/black_scholes_option_pricing.r)
7688
* [Kalman Filter](https://github.com/TheAlgorithms/R/blob/HEAD/quantitative_finance/kalman_filter.r)
7789
* [Markowitz Portfolio Optimization](https://github.com/TheAlgorithms/R/blob/HEAD/quantitative_finance/markowitz_portfolio_optimization.r)
7890
* [Monte Carlo Simulation](https://github.com/TheAlgorithms/R/blob/HEAD/quantitative_finance/monte_carlo_simulation.r)
91+
* [Risk Metrics](https://github.com/TheAlgorithms/R/blob/HEAD/quantitative_finance/risk_metrics.r)
92+
* [Time Series Analyzer](https://github.com/TheAlgorithms/R/blob/HEAD/quantitative_finance/time_series_analyzer.r)
7993

8094
## Regression Algorithms
8195
* [Ann](https://github.com/TheAlgorithms/R/blob/HEAD/regression_algorithms/ann.r)
96+
* [Anova Oneway](https://github.com/TheAlgorithms/R/blob/HEAD/regression_algorithms/anova_oneway.r)
8297
* [Linear Regression](https://github.com/TheAlgorithms/R/blob/HEAD/regression_algorithms/linear_regression.r)
8398
* [Linearregressionrawr](https://github.com/TheAlgorithms/R/blob/HEAD/regression_algorithms/linearregressionrawr.r)
8499
* [Multiple Linear Regression](https://github.com/TheAlgorithms/R/blob/HEAD/regression_algorithms/multiple_linear_regression.r)
85100

86101
## Searches
87102
* [Binary Search](https://github.com/TheAlgorithms/R/blob/HEAD/searches/binary_search.r)
103+
* [Jump Search](https://github.com/TheAlgorithms/R/blob/HEAD/searches/jump_search.r)
88104
* [Linear Search](https://github.com/TheAlgorithms/R/blob/HEAD/searches/linear_search.r)
89105
* [Rabin.Karp.String.Search](https://github.com/TheAlgorithms/R/blob/HEAD/searches/rabin.karp.string.search.r)
106+
* [Ternary.Search](https://github.com/TheAlgorithms/R/blob/HEAD/searches/ternary.search.r)
90107
* [Z.Algorithm.Search](https://github.com/TheAlgorithms/R/blob/HEAD/searches/z.algorithm.search.r)
91108

92109
## Sorting Algorithms
@@ -121,6 +138,7 @@
121138
* [Is.Anagram](https://github.com/TheAlgorithms/R/blob/HEAD/string_manipulation/is.anagram.r)
122139
* [Is.Lower](https://github.com/TheAlgorithms/R/blob/HEAD/string_manipulation/is.lower.r)
123140
* [Is.Uppercase](https://github.com/TheAlgorithms/R/blob/HEAD/string_manipulation/is.uppercase.r)
141+
* [Kmp String Matching](https://github.com/TheAlgorithms/R/blob/HEAD/string_manipulation/kmp_string_matching.r)
124142
* [Levenshtein](https://github.com/TheAlgorithms/R/blob/HEAD/string_manipulation/levenshtein.r)
125143
* [Longest.Palindromic.Subsequence](https://github.com/TheAlgorithms/R/blob/HEAD/string_manipulation/longest.palindromic.subsequence.r)
126144
* [Longest.Substring.No.Repeat](https://github.com/TheAlgorithms/R/blob/HEAD/string_manipulation/longest.substring.no.repeat.r)

0 commit comments

Comments
 (0)