Software Development Engineering Intern
Software Development Engineering Intern Interview Questions and Answers
Q1. find the minimum number of arrows needed to burst balloons represented by an array where a[I] means the height of the balloon. The constraint was if we hit a balloon say the height of 4 then the arrow will only...
read moreFind minimum arrows needed to burst balloons in decreasing order of height
Sort the array in decreasing order of height
Initialize arrow count to 1 and max height to first balloon height
Iterate through the array and if current balloon height is greater than max height, increment arrow count and update max height
Return arrow count
Time complexity: O(nlogn) for sorting, O(n) for iteration
Space complexity: O(1)
Q2. return the maximum length of the alternating sequence and print the alternating sequence
The maximum length of the alternating sequence is returned along with the sequence itself.
Iterate through the array and check if each element alternates with the previous one.
Keep track of the current alternating sequence length and the maximum length seen so far.
If the current element breaks the alternating pattern, update the maximum length and reset the current length.
Print the alternating sequence by storing the elements in a separate array.
Software Development Engineering Intern Interview Questions and Answers for Freshers
Q3. return the letter in the string having the highest frequency
The answer is a letter in the string that appears most frequently.
Iterate through each letter in the string and count its frequency
Keep track of the letter with the highest frequency
Return the letter with the highest frequency
Q4. Given an m x n binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area.
Given a binary matrix, find the largest square containing only 1's and return its area.
Use dynamic programming to solve the problem
Create a 2D array to store the maximum size of square at each point
For each point, check the top, left, and diagonal top-left values to calculate the maximum size of square
Return the maximum size of square found
Software Development Engineering Intern Jobs
0Interview Questions of Similar Designations
Calculate your in-hand salary
Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary
Reviews
Interviews
Salaries
Users/Month