1. Question 1 Atlassian has a text collaborative tool called confluence; let's assume…
- User
1. Question 1
Atlassian has a text collaborative tool called confluence; let's assume the text editor gets an array of strings. Each string should be considered as a zero-indexed array of characters. All characters within the strings will fall within the ASCII range of lowercase letters (a-z), with decimal values ranging from 97 to 122. These decimal values are known as ordinal values and will be denoted as ord[a]=97, for instance.
Given an array of strings s = [s[0],s[1],...s[n-1]], and an integer m, we calculate a value of each s[i] of length len(s[i]) as:
value[i] = ord[s[i]] [0]<sup>m</sup> x ord[s[i][1]]<sup>m</sup> x ... x ord[s[i] [len(s[i])-1]]<sup>m</sup>Perform the calculation on each string, sum them up, and determine whether their sum is EVEN or ODD.
For instance, consider an array s = ['abc', 'abcd'] containing k=2 strings. When represented as a two-dimensional array of decimal ordinals, it becomes s' = [[97, 98, 99], [97, 98, 99, 100]]. To illustrate the impact of our exponent m=2, we execute the following operation: ""
solve in cpp handle all edge case and also test the give testcae
- Assistant