Developer Internship Interview Questions

23,909 developer internship interview questions shared by candidates

you will be asked to take a flower out of the grid and put it in a bag and replace it with another flower. I think you have like 3 or 4 types of flowers denoted by Letters like D, O, R (somethig like that) in the end you have to make sure that all flowers in the bag are reused again. if you can't just print "false"
avatar

Software Engineer(Internship)

Interviewed at Riot Games

4
Oct 1, 2019

you will be asked to take a flower out of the grid and put it in a bag and replace it with another flower. I think you have like 3 or 4 types of flowers denoted by Letters like D, O, R (somethig like that) in the end you have to make sure that all flowers in the bag are reused again. if you can't just print "false"

You have 3 things 1) flower F 2) Walls W 3) empty spaces. you will get an input to determine the size of a matrix and then get input to show positions of flowers and walls e.x. 2,2 (size of matrix) F,0,1 (position of a flower) W,1,1 (position of a wall) and you are supposed to print the output of the grid like this BF BW because the position 0,0 and 1,0 are blank they presented in the output with B
avatar

Software Engineer(Internship)

Interviewed at Riot Games

4
Oct 1, 2019

You have 3 things 1) flower F 2) Walls W 3) empty spaces. you will get an input to determine the size of a matrix and then get input to show positions of flowers and walls e.x. 2,2 (size of matrix) F,0,1 (position of a flower) W,1,1 (position of a wall) and you are supposed to print the output of the grid like this BF BW because the position 0,0 and 1,0 are blank they presented in the output with B

You are given n tests numbered from 1, 2, 3.... N. Each test passes individually, but there are two tests which when ran together fails. You can call a function testSuite() and pass any number of test as you want. For example : Given N = 5, 1, 2, 3, 4, 5 Lets say 1 and 4 are failing tests. If you ran testSuite([1, 2, 3, 4, 5]) -> fail If you ran testSuite([1, 2, 3]) -> pass If you ran testSuite([1, 2, 4]) -> fail Likewise, testSuite([1, 4]) -> fail Can you write a algorithm (better than O(N^2) ofcourse) to find the failing tests? 2nd question: You are given a 0-indexed integer array nums and an integer k. A subarray is called equal if all of its elements are equal. Note that the empty subarray is an equal subarray. Return the length of the longest possible equal subarray after deleting at most k elements from nums. A subarray is a contiguous, possibly empty sequence of elements within an array. Example 1: Input: nums = [1,3,2,3,1,3], k = 3 Output: 3 Explanation: It's optimal to delete the elements at index 2 and index 4. After deleting them, nums becomes equal to [1, 3, 3, 3]. The longest equal subarray starts at i = 1 and ends at j = 3 with length equal to 3. It can be proven that no longer equal subarrays can be created. Example 2: Input: nums = [1,1,2,2,1,1], k = 2 Output: 4 Explanation: It's optimal to delete the elements at index 2 and index 3. After deleting them, nums becomes equal to [1, 1, 1, 1]. The array itself is an equal subarray, so the answer is 4. It can be proven that no longer equal subarrays can be created.
avatar

Software Engineer(Internship)

Interviewed at HugoSave

4.2
Sep 1, 2024

You are given n tests numbered from 1, 2, 3.... N. Each test passes individually, but there are two tests which when ran together fails. You can call a function testSuite() and pass any number of test as you want. For example : Given N = 5, 1, 2, 3, 4, 5 Lets say 1 and 4 are failing tests. If you ran testSuite([1, 2, 3, 4, 5]) -> fail If you ran testSuite([1, 2, 3]) -> pass If you ran testSuite([1, 2, 4]) -> fail Likewise, testSuite([1, 4]) -> fail Can you write a algorithm (better than O(N^2) ofcourse) to find the failing tests? 2nd question: You are given a 0-indexed integer array nums and an integer k. A subarray is called equal if all of its elements are equal. Note that the empty subarray is an equal subarray. Return the length of the longest possible equal subarray after deleting at most k elements from nums. A subarray is a contiguous, possibly empty sequence of elements within an array. Example 1: Input: nums = [1,3,2,3,1,3], k = 3 Output: 3 Explanation: It's optimal to delete the elements at index 2 and index 4. After deleting them, nums becomes equal to [1, 3, 3, 3]. The longest equal subarray starts at i = 1 and ends at j = 3 with length equal to 3. It can be proven that no longer equal subarrays can be created. Example 2: Input: nums = [1,1,2,2,1,1], k = 2 Output: 4 Explanation: It's optimal to delete the elements at index 2 and index 3. After deleting them, nums becomes equal to [1, 1, 1, 1]. The array itself is an equal subarray, so the answer is 4. It can be proven that no longer equal subarrays can be created.

Viewing 2231 - 2240 interview questions

Glassdoor has 23,909 interview questions and reports from Developer internship interviews. Prepare for your interview. Get hired. Love your job.