Skip to content

added wild to Algorithms #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions Wildcardmatching/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Readme

***Wild card matching using Dynamic Programming***

This is a dynamic programing approach to match the given string with a given pattern.

The pattern can be empty and can contain only lowercase letters a-z, and characters like ? or *.
The string can be empty and can contain only lowercase letters a-z.

'?' Matches any single character.
'*' Matches any sequence of characters (including the empty sequence).

The matching will cover the entire input string (not partial).

***Example 1:***

```Input:```
s = "aa"
p = "a"

```Output:``` aa doesn't match with the given pattern: a?

```Explanation:``` "a" does not match the entire string "aa".

***Example 2:***

```Input:```
s = "aa"
p = "*"

```Output:``` aa matches the pattern: *?

```Explanation:``` '*' matches any sequence.