Software Development Engineer Interview Questions

32,861 software development engineer interview questions shared by candidates

Write a function solution that, given a string S consisting of N characters, returns the maximum number of letters 'a' that can be inserted into S (including at the front and end of S) so that the resulting string doesn't contain three consecutive letters If string S already contains the substring "aaa", then your function should return -1 .
avatar

SDE-intern

Interviewed at OpenText

3.2
Apr 12, 2023

Write a function solution that, given a string S consisting of N characters, returns the maximum number of letters 'a' that can be inserted into S (including at the front and end of S) so that the resulting string doesn't contain three consecutive letters If string S already contains the substring "aaa", then your function should return -1 .

Viewing 2391 - 2400 interview questions

Glassdoor has 32,861 interview questions and reports from Software development engineer interviews. Prepare for your interview. Get hired. Love your job.