Software Development Engineer Internship Interview Questions | Glassdoor

Software Development Engineer Internship Interview Questions

14

Software development engineer internship interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

Given an array of positive and negative numbers, give an algorithm that would find the sequence of numbers that give the largest sum. The numbers have to be in sequential order.

2 Answers

The naive algorithm will take O(n^2) time, but it is very easy to code. The divide and conquer algorithm will take O(nlgn) time, but a little challenge to implement.

If by "sequential order" you mean that the indices of the numbers in the subsequence must be consecutive, I think this should work in O(n): int main() { int best[N], B, i, a[N]; //input to a; best[0] = a[0]; B = a[0]; for(i = 1; i best[i-1]) best[i] = B + a[i]; else best[i] = best[i-1]; B = max(a[i], B + a[i]); } return best[N-1]; return 0; }

How to convert a string to integer (expect to write a method for it) ? without using parseInt valueat stringtokenizer split (that what I suggested to use but they were all prohibited)

1 Answer

Basic java questions and write a method to test whether a given binary search tree is valid or not

1 Answer

Most unexpected was the last interview of the day. It seemed as though my interviewer had no plan at all for what to ask and just let questions develop so they took me off guard.

I was given a scenario in which I was a restaurant manager and I had to create a software for managing reservations. I had to tell him the use cases and also which classes would I be using and I was told to code an example entity class.

Write a function that determines the longest palindrome in a given string.

Given a sorted array, find two elements that sum up to a certain value in linear time.