From cae3a923ad0aecb3a020088f211e2c3fb097597e Mon Sep 17 00:00:00 2001 From: Swastika Gupta <64654203+Swastyy@users.noreply.github.com> Date: Sun, 1 Aug 2021 20:49:28 +0530 Subject: [PATCH] Update wildcard_matching.cpp --- backtracking/wildcard_matching.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backtracking/wildcard_matching.cpp b/backtracking/wildcard_matching.cpp index 76250308c..6418e1e36 100644 --- a/backtracking/wildcard_matching.cpp +++ b/backtracking/wildcard_matching.cpp @@ -35,10 +35,10 @@ namespace wildcard_matching { * @param pos2 is the last index * @returns 1 if pattern matches with matching string otherwise 0 */ -std::vector> dpTable(1000, std::vector(1000, -1)); -int32_t wildcard_matching(std::string s, std::string p, int pos1, int pos2) { - int n = s.length(); - int m = p.length(); +std::vector> dpTable(1000, std::vector(1000, -1)); +uint32_t wildcard_matching(std::string s, std::string p, uint32_t pos1, uint32_t pos2) { + uint32_t n = s.length(); + uint32_t m = p.length(); // matching is successfull if both strings are done if (pos1 == n && pos2 == m) { return 1;