Software Developer 2 Interview Questions

2,525 software developer 2 interview questions shared by candidates

1. Given string s and integer k. Find max number of vowels in substring of size k. a,e,i,o,u s = "abciiidef", k = 3 Output: 3 ("iii") s = "aeiou", k = 2 Output: 2 s = "abhishek", k = 4 Output : 2 2. You have N bags of candy. The ith bag contains arr[i] pieces of candy. It takes you 1 minute to eat all of the pieces of candy in the bag , and as soon as you finish, the bag refills with x/2 pieces of candies. You have k minutes to eat as much candy as possible. How many pieces of candy can you eat? N = 5 k = 3 arr = [2, 1, 7, 4, 2] output = 14
avatar

SDE-2 Backend

Interviewed at Amazon

3.5
Dec 6, 2021

1. Given string s and integer k. Find max number of vowels in substring of size k. a,e,i,o,u s = "abciiidef", k = 3 Output: 3 ("iii") s = "aeiou", k = 2 Output: 2 s = "abhishek", k = 4 Output : 2 2. You have N bags of candy. The ith bag contains arr[i] pieces of candy. It takes you 1 minute to eat all of the pieces of candy in the bag , and as soon as you finish, the bag refills with x/2 pieces of candies. You have k minutes to eat as much candy as possible. How many pieces of candy can you eat? N = 5 k = 3 arr = [2, 1, 7, 4, 2] output = 14

Viewing 1511 - 1520 interview questions

Glassdoor has 2,525 interview questions and reports from Software developer 2 interviews. Prepare for your interview. Get hired. Love your job.