题目地址
LeetCode#151 Reverse Words in a String
题目描述
Given an input string, reverse the string word by word.
有没有那么一丝可能。
LeetCode#151 Reverse Words in a String
Given an input string, reverse the string word by word.
LeetCode#890 Find and Replace Pattern
You have a list of words
and a pattern
, and you want to know which words in words
matches the pattern.
A word matches the pattern if there exists a permutation of letters p
so that after replacing every letter x
in the pattern with p(x)
, we get the desired word.
(Recall that a permutation of letters is a bijection from letters to letters: every letter maps to another letter, and no two letters map to the same letter.)
Return a list of the words in words
that match the given pattern.
You may return the answer in any order.
LeetCode#692 Top K Frequent Words
Given a non-empty list of words, return the k most frequent elements.
Your answer should be sorted by frequency from highest to lowest. If two words have the same frequency, then the word with the lower alphabetical order comes first.