Software Trainee Interview Questions

9,112 software trainee interview questions shared by candidates

A string is given which contains characters from the following set: ["|","*"]. Example, string can be of type "|**|*|". Also, two arrays are given. First array contains value of starting indexes, and second array contains value of ending indexes. For each corresponding pair of starting index array value and ending index array value you need to find maximum stars present in string between two bars that lies between starting index and ending index. Example: for string "|**|*|" and we have start index array[1,1] and end index array[5,6]. for pair (1,5) we have string "|**|*" so maximum stars between bar is 2. for pair (1,6) we have string "|**|*|" so maximum stars between bar is 3. So answer is [2,3].
avatar

Software Engineer Trainee

Interviewed at MountBlue Technologies

3.7
Nov 23, 2020

A string is given which contains characters from the following set: ["|","*"]. Example, string can be of type "|**|*|". Also, two arrays are given. First array contains value of starting indexes, and second array contains value of ending indexes. For each corresponding pair of starting index array value and ending index array value you need to find maximum stars present in string between two bars that lies between starting index and ending index. Example: for string "|**|*|" and we have start index array[1,1] and end index array[5,6]. for pair (1,5) we have string "|**|*" so maximum stars between bar is 2. for pair (1,6) we have string "|**|*|" so maximum stars between bar is 3. So answer is [2,3].

Viewing 2221 - 2230 interview questions

Glassdoor has 9,112 interview questions and reports from Software trainee interviews. Prepare for your interview. Get hired. Love your job.