umdreamer / leetcodeproblems

Solutions for LeetCode OJ
3 stars 9 forks source link

2023.6.7 Problem: 290. Word Pattern #33

Closed umdreamer closed 1 year ago

umdreamer commented 1 year ago
  1. Word Pattern Problem Link Given a pattern and a string s, find if s follows the same pattern.

Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty word in s.

Example 1:

Input: pattern = "abba", s = "dog cat cat dog"
Output: true

Example 2:

Input: pattern = "abba", s = "dog cat cat fish"
Output: false

Example 3:

Input: pattern = "aaaa", s = "dog cat cat dog"
Output: false

Constraints:

zxm-1235 commented 1 year ago

image

Lggg1234 commented 1 year ago

屏幕截图 2023-06-05 115542

24zlx commented 1 year ago

联想截图_20230607124038

yeyuxq commented 1 year ago

image

ZWJ2212061008 commented 1 year ago

image

123lrb commented 1 year ago

M0PT1N_H0YX0K%W$AYULKZS

huangyumei1 commented 1 year ago

QQ图片20230607151840

sjh397 commented 1 year ago

image

tangyexi commented 1 year ago
屏幕截图 2023-06-07 152444
PinkyLame commented 1 year ago

image

promisewith7 commented 1 year ago

image

syr2212061031 commented 1 year ago

})D~QGSPC)U0P8 21OK6 CI

shylieisme commented 1 year ago

1TTNIVK4L E92{$OH117S@Q

mafanjia commented 1 year ago

290

daowuwu commented 1 year ago

3(KM5G614K_2PWI$ B~%}RQ

zhjingyan commented 1 year ago

image

cuixiao02 commented 1 year ago
截屏2023-06-07 16 46 10
bedauern commented 1 year ago
Snipaste_2023-06-07_16-54-58
naqianqpg commented 1 year ago

DCQ@QPAX4KX7D%F)_ CL0WG

wangshiqi7 commented 1 year ago
截屏2023-06-07 17 18 28
1125766961 commented 1 year ago

image

gusuning commented 1 year ago
屏幕截图 2023-06-07 172655
liuhuanyu6 commented 1 year ago

image

liu-si-han commented 1 year ago
image
12baoxingyu-6 commented 1 year ago
image
686xiaozhang commented 1 year ago

QQ截图20230607184837

xkqwww commented 1 year ago

2

zyhzxy99 commented 1 year ago

P1I %52Y985U(~%S{{2Q$2

FXL1006 commented 1 year ago
image
zangfushuo commented 1 year ago
截屏2023-05-24 22 39 27
htywan commented 1 year ago

5

xiaolu2002 commented 1 year ago

image

foxbou commented 1 year ago

image