deno.land / x / masx200_leetcode_test@10.6.5 / merge-strings-alternately / index.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
function mergeAlternately(word1: string, word2: string): string { return Array(2 * Math.max(word1.length, word2.length)) .fill(0) .map((_, i) => i % 2 ? word2[Math.floor(i / 2)] : word1[Math.floor(i / 2)] ) .join("");}export default mergeAlternately;
masx200_leetcode_test

Version Info

Tagged at
a year ago