leetcode 290 单词模式

class Solution {
public:
    bool wordPattern(string ptn, string str) {
        vector words=split(str);
        if(words.size()!=ptn.length())return false;
        map map1;//用两个map做双射
        map map2;
        int len=ptn.length();
        for(int i=0;i split(string str){
        vector ret;
        int len=str.length();
        int i=0,t=0;
        while(str[i]==' '&&i

 

你可能感兴趣的:(leetcode)