JSRUN 用代码说话
我是大神
movi
第55274位JSRUN用户

活跃于 2022-11-03 02:47 访问量:4081
关注


***Sherlock and Anagrams*** Two strings are anagrams of each other if the letters of one string can be rearranged to form the other string. Given a string, find the number of pairs of substrings of the string that are anagrams of each other. ///Sample Input ifailuhkqq kkkk cdcd /// Output 3 10 5


***Maximum Occurring Character***


***checkMagazine - Hash Tables*** ///Function Description Complete the checkMagazine function in the editor below. It must print if the note can be formed using the magazine, or . checkMagazine has the following parameters: string magazine[m]: the words in the magazine string note[n]: the words in the ransom note //Sample Input 1 6 5 two times three is not four two times two is four ///Sample Output 1 No ///Explanation 1 'two' only occurs once in the magazine.


**2D Array-hourglassSum** ///An hourglass in A is a subset of values with indices falling in this pattern in ARR's graphical representation: a b c d e f g ///Example -9 -9 -9 1 1 1 0 -9 0 4 3 2 -9 -9 -9 1 2 3 0 0 8 6 6 0 0 0 0 -2 0 0 0 0 1 2 4 0 The hourglass sums are: -63, -34, -9, 12, -10, 0, 28, 23, -27, -11, -2, 10, 9, 17, 25, 18


**Counting Valleys - Array** ///Input Format The first line contains an integer 'steps', the number of steps in the hike. The second line contains a single string 'path', of 'steps' characters that describe the path. ///Sample Input 8 UDDDUDUU ///Sample Output 1


没有了
1/2 下一页