Software Development Engineer In Test Sdet Interview Questions

3,728 software development engineer in test sdet interview questions shared by candidates

#3 - Hard Question: Candy Baskets Ramu's family runs a candy shop in the village. On one fine Sunday afternoon, Ramu's father returned from the city with a carton full of candies. He asks Ramu to pack them into small gift baskets containing tiny pouches. Each gift basket should contain N pouches, each containing a unique number of candies from 1 to N, respectively. Ramu decides to adopt the following approach. He will randomly grab a fistful of candies from the carton, which he will count and pack them into a new empty pouch. All pouches are identical, and can hold at most N candies. In event of a draw being larger than N candies, Ramu is allowed to eat the candies that cannot fit in the pouch (his reward for doing the job). He seals the pouch after putting on a label denoting the number of candies inside it. He doesn't want the pouches to pile up, so as soon as he has a set of pouches with label 1 to N, he would pack them into a gift basket and give it to his father. He would continue drawing until all the candies from the carton are exhausted. Once that happens, the pouches that could not be packed into gift baskets are distributed among Ramu's friends. Ramu is your friend and you should help him in his job. Ramu will tell you how many candies he got in every draw, and your task is to tell him immediately if he could pack a new gift basket after packing the current draw in the pouch.
Dec 7, 2024

#3 - Hard Question: Candy Baskets Ramu's family runs a candy shop in the village. On one fine Sunday afternoon, Ramu's father returned from the city with a carton full of candies. He asks Ramu to pack them into small gift baskets containing tiny pouches. Each gift basket should contain N pouches, each containing a unique number of candies from 1 to N, respectively. Ramu decides to adopt the following approach. He will randomly grab a fistful of candies from the carton, which he will count and pack them into a new empty pouch. All pouches are identical, and can hold at most N candies. In event of a draw being larger than N candies, Ramu is allowed to eat the candies that cannot fit in the pouch (his reward for doing the job). He seals the pouch after putting on a label denoting the number of candies inside it. He doesn't want the pouches to pile up, so as soon as he has a set of pouches with label 1 to N, he would pack them into a gift basket and give it to his father. He would continue drawing until all the candies from the carton are exhausted. Once that happens, the pouches that could not be packed into gift baskets are distributed among Ramu's friends. Ramu is your friend and you should help him in his job. Ramu will tell you how many candies he got in every draw, and your task is to tell him immediately if he could pack a new gift basket after packing the current draw in the pouch.

#2 - Medium Question: Sequential Display As an architect, you were given a vacant plot of land with K consecutive sections. Each section has the capacity to display one architectural element. Your goal is to create a design pattern, represented by a string S with a length N > K. However, due to space limitations, you need to display the string in N-K+1 stages. In the i-th stage (1≤i≤N-K+1), you will arrange the architectural elements to showcase the characters s[i], s[i+1], ..., s[i+K-1]. The energy required to transition from stage i to stage i+1 (for 1≤i≤N-K) is directly proportional to the number of architectural elements that need to be rearranged between these stages. You need to determine the total energy required for the entire process of displaying the string, which is the sum of energies required for transitioning between all consecutive pairs of stages.
Dec 7, 2024

#2 - Medium Question: Sequential Display As an architect, you were given a vacant plot of land with K consecutive sections. Each section has the capacity to display one architectural element. Your goal is to create a design pattern, represented by a string S with a length N > K. However, due to space limitations, you need to display the string in N-K+1 stages. In the i-th stage (1≤i≤N-K+1), you will arrange the architectural elements to showcase the characters s[i], s[i+1], ..., s[i+K-1]. The energy required to transition from stage i to stage i+1 (for 1≤i≤N-K) is directly proportional to the number of architectural elements that need to be rearranged between these stages. You need to determine the total energy required for the entire process of displaying the string, which is the sum of energies required for transitioning between all consecutive pairs of stages.

Viewing 611 - 620 interview questions

Glassdoor has 3,728 interview questions and reports from Software development engineer in test sdet interviews. Prepare for your interview. Get hired. Love your job.