deno.land / x / masx200_leetcode_test@10.6.5 / keyboard-row / index.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
function findWords(words: string[]): string[] { const one = new Set("qwertyuiop"); const two = new Set("asdfghjkl"); const three = new Set("zxcvbnm");
return words.filter((w) => [one, two, three].some((s) => Array.prototype.every.call(w, (c) => s.has(c.toLowerCase())) ) );}export default findWords;
masx200_leetcode_test

Version Info

Tagged at
a year ago