codewars4 [codewars] Which are in? Which are in?xGiven two arrays of strings a1 and a2 return a sorted array r in lexicographical order of the strings of a1 which are substrings of strings of a2.#Example 1: a1 = ["arp", "live", "strong"]a2 = ["lively", "alive", "harp", "sharp", "armstrong"]returns ["arp", "live", "strong"]#Example 2: a1 = ["tarp", "mice", "bull"]a2 = ["lively", "alive", "harp", "sharp", "armstrong"]returns .. 2019. 3. 29. [codewars] Who likes it? WhoLikeThis Who likes it?xYou probably know the "like" system from Facebook and other pages. People can "like" blog posts, pictures or other items. We want to create the text that should be displayed next to such an item.Implement a function likes :: [String] -> String, which must take in input array, containing the names of people who like an item. It must return the display text as shown in t.. 2019. 3. 24. [codewars] number fun NumberFun NumberFunxFYou might know some pretty large perfect squares. But what about the NEXT one?Complete the findNextSquare method that finds the next integral perfect square after the one passed as a parameter. Recall that an integral perfect square is an integer n such that sqrt(n) is also an integer.If the parameter is itself not a perfect square, than -1 should be returned. You may assu.. 2019. 3. 24. [codewars] Dubstep dubstep DubstepxxxxxxxxxxFor example, a song with words "I AM X" can transform into a dubstep remix as "WUBWUBIWUBAMWUBWUBX" and cannot transform into "WUBWUBIAMWUBX".Recently, Jonny has heard Polycarpus's new dubstep track, but since he isn't into modern music, he decided to find out what was the initial song that Polycarpus remixed. Help Jonny restore the original song.InputThe input consist.. 2019. 3. 23. 이전 1 다음