Software Engineer Intern Interview Questions
- -6of 6 votes
AnswersFind largest element in an array
- naveenm.025 March 17, 2014 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer Intern Algorithm - -1of 1 vote
AnswersHow would you find a random non-null element from an array of 10 million, where most elements are null, in a reasonable amount of time?
- anant March 15, 2014 in United States| Report Duplicate | Flag | PURGE
Knewton Software Engineer Intern - -1of 1 vote
AnswersConsider a scenario where you open a file with your favorite editor (emacs on Linux or Microsoft Word on Windows).
- KevinK March 05, 2014 in United States
You notice that the application has a performance hit due to a recent fix made to the Editor application.
What will your testing Matrix look like that will convey the information that the performance of the application has degraded (or improved after bug fixes and re-design)?
In other words, the interviewer was saying that, if we had a graph showing values obtained from tests run over time for:
File I/O, hardware configuration, software configuration, graphics system, GPU, CPU etc.
then at the End Of the Day, looking at the reports, which parameters will instantly tell you that the performance has definitely increased?
(Also in other words he was asking the Matrix that will portray those parameters).| Report Duplicate | Flag | PURGE
Google Software Engineer Intern Testing - 1of 1 vote
AnswersMove the first n numbers in a 10 element array to the end.
- FrickenHamster March 03, 2014 in United States for Lync
I think the way to do it was to reverse the array and then reverse the first 10-n and then the last n.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer Intern Arrays - -5of 5 votes
AnswersInorder traversal of binary tree
- naveenm.025 February 27, 2014 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer Intern Algorithm - 0of 0 votes
AnswersYou are given points of 2D plane and an integer n, return n number of points close to origin (0,0)
- naveenm.025 February 27, 2014 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer Intern Algorithm - 3of 5 votes
AnswersThere are many sorted arrays. Find a minimum range, so that in each array there's at least one integer within this range.
- edcent February 25, 2014 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer Intern Algorithm - 3of 5 votes
AnswersA professor wants to see if two students have cheated when writing a paper. Design a function : hasCheated(String s1,String s2, int N) that evaluates to true if two strings have a common substring of length N. Additional question after implementation. Assume you don't have the possibility of using String.contains() and String.substring(). How would you implement this?
- dke.ade February 25, 2014 in United States| Report Duplicate | Flag | PURGE
Facebook Software Engineer Intern Java - 4of 4 votes
AnswersGiven a list of 4 billion integers, find an integer not in the list using 4MB of memory. (interview was in Java)
- dke.ade February 25, 2014 in United States| Report Duplicate | Flag | PURGE
Facebook Software Engineer Intern Java - 4of 4 votes
AnswersWrite atof in Java, which converts a string representation of a float (like "342.18E-10") to an actual float without using any built-in parsing functions.
- dke.ade February 25, 2014 in United States| Report Duplicate | Flag | PURGE
Facebook Software Engineer Intern Algorithm - 1of 3 votes
AnswersWrite a function in C to create a new BST which is the mirror image of a given tree.
- gjp February 24, 2014 in United States| Report Duplicate | Flag | PURGE
NVIDIA Software Engineer Intern Algorithm C Data Structures - 3of 7 votes
AnswersConsider the statement
- gjp February 24, 2014 in United States
result = a ? b : c;
Implement the above statement without using any conditional statements.| Report Duplicate | Flag | PURGE
NVIDIA Software Engineer Intern Bit Manipulation C - 0of 0 votes
AnswersWrite a multi threaded C code with one thread printing all even numbers and the other all odd numbers. The output should always be in sequence
- gjp February 24, 2014 in United States
ie. 0,1,2,3,4....etc| Report Duplicate | Flag | PURGE
NVIDIA Software Engineer Intern C Threads - 0of 0 votes
AnswersWrite a piece of code to find out if the system is x86 architecure of Sparc
- gjp February 24, 2014 in United States| Report Duplicate | Flag | PURGE
NVIDIA Software Engineer Intern C Computer Architecture & Low Level - 3of 5 votes
AnswersGiven a Binary Tree (balanced or not) write a method that transforms the tree in a degenerate tree (basically a data structure like a sorted linked list where each node has the left child null) and returns the new root. This must be made in place, no external memory usage is allowed.
- Ray February 23, 2014 in United States| Report Duplicate | Flag | PURGE
Facebook Software Engineer Intern Trees and Graphs - 0of 2 votes
AnswersGiven an array, print all the pairs that sum to a particular value. You are not given the value, find all possible values and print pairs for them
- amazing February 22, 2014 in United States| Report Duplicate | Flag | PURGE
Yahoo Software Engineer Intern Algorithm - 2of 4 votes
AnswersIn Java: Write a function in language of your choice that takes in two strings, and returns true if they match. Constraints are as follows: String 1, the text to match to, will be alphabets and digits. String 2, the pattern, will be alphabets, digits, '.' and '*'. '.' means either alphabet or digit will be considered as a "match". "*" means the previous character is repeat 0 or more # of times. For example: Text: Facebook Pattern: F.cebo*k returns true.
- dke.ade February 13, 2014 in United States| Report Duplicate | Flag | PURGE
Facebook Software Engineer Intern Algorithm - 0of 0 votes
AnswersWrite a function in C to create a new BST which is the mirror image of a given tree.
- gjp February 12, 2014 in United States for Driver Development| Report Duplicate | Flag | PURGE
NVIDIA Software Engineer Intern Data Structures - 0of 0 votes
AnswersWrite a piece of code to find out if the system is x86 architecture of Sparc
- gjp February 12, 2014 in United States for Driver Development| Report Duplicate | Flag | PURGE
NVIDIA Software Engineer Intern Bit Manipulation - 0of 0 votes
AnswersWrite multi threaded code in C so that one thread prints all even numbers and other all odd numbers with the output always in sequence ie. 0,1,2,3...etc
- gjp February 12, 2014 in United States for Driver Development| Report Duplicate | Flag | PURGE
NVIDIA Software Engineer Intern Threads - 0of 0 votes
AnswersWrite a piece of code to find out if a system is x86 architecture or Sparc?
- gjp February 12, 2014 in United States for Driver Development| Report Duplicate | Flag | PURGE
NVIDIA Software Engineer Intern Bit Manipulation - 4of 4 votes
AnswersPrints all unique subsets of the string.
- mabodx February 11, 2014 in United States
Given a string write a function which prints all the subsets of the string. Now make the function to return only unique solutions.| Report Duplicate | Flag | PURGE
Facebook Software Engineer Intern Algorithm - 0of 2 votes
AnswerGiven a N*M grid I want to find biggest submatrix not necessarily a square one that has all the value in it same.
- justhack4fun688 February 10, 2014 in United States
Like
If N=4 and M=5 and matrix is
1 2 3 4 5
1 2 2 2 3
4 2 2 2 6
3 4 5 6 7
Then here answer will be matrix will be
2 2 2
2 2 2
So I need to find upper leftmost coordinate of this submatrix that is [2,2] and bottommost right coordinate that is [3,4].
I was to write a code for it in c++ in my interview| Report Duplicate | Flag | PURGE
Accenture Software Engineer Intern Algorithm - -3of 3 votes
AnswerGiven N Vertices and M Edges. Each Edge connects two vertices.
- justhack4fun688 February 08, 2014 in United States
There is at most one way to move between each pair of vertices.
Each vertex is either locked or unlocked .There is a perfect path between two different vertices if both vertices are unlocked, and are connected with each other by some way.
The question is What is the number of pairs of vertices, which have a perfect path between them and also What is the number of the vertices, which have at least one perfect path passing through that vertex.
NOTE : There is at most one way to move between each pair of vertices, that is, the given graph is a forest
EXAMPLE : Say we have 6 Vertices and 5 Edges.
A=[1,1,1,1,1,0] It shows that A[i]=1 if ith vertex is unlocked otherwise 0.
Let the connected pair of vertices are : (1,2),(1,6),(1,5),(2,4),(4,3)
Here ,Answer for first question is 10 and second one is 5.
So,interviewer asked me to device an efficient algorithm for it and also code it in c++| Report Duplicate | Flag | PURGE
Amdocs Software Engineer Intern Algorithm - 1of 3 votes
AnswersGiven a matrix, you need to create another matrix such that the value (i,j) is either -1, 0 or 1.
- celeritas February 08, 2014 in United States
1 - if multiplication of all values in ith row and jth column is greater than 0.
-1 - if multiplication of all values in ith row and jth column is less than 0.
0 - if multiplication of all the values in ith row and jth column is 0.
e.g.
1 2 3 1
1 0 -1 2
-1 1 1 1
o/p
-1 0 -1 1
0 0 0 0
1 0 1 -1| Report Duplicate | Flag | PURGE
Amazon Software Engineer Intern Algorithm - 1of 1 vote
AnswersYou have two sorted list. Write code for returning the first k elements. K may be a large number like 10 million.
- hirajhil February 05, 2014 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer Intern - 3of 3 votes
AnswersYou have a lists with integers. Find all the pairs of numbers that sum less than or equal to to a particular number k. The list contains minimum 5 Million number.
- hirajhil February 05, 2014 in United States
(I provided a n^2logn solution but they may be looking forward to having a better answer).| Report Duplicate | Flag | PURGE
Google Software Engineer Intern Algorithm - 0of 0 votes
AnswersHow you can find whether a link list contains a cycle or not?
- mpss.umbc January 29, 2014 in United States for Android| Report Duplicate | Flag | PURGE
Samsung Software Engineer Intern Data Structures - 0of 0 votes
AnswersShow whether two integer ranges are overlapping or not. If so, return the overlap range
- mpss.umbc January 29, 2014 in United States for Android| Report Duplicate | Flag | PURGE
Samsung Software Engineer Intern Coding - 1of 1 vote
AnswersYou are given two version numbers of a software, like Version 10.3.4 and Version 10.3.41. Write a program in Java to find out which of the version numbers are the latest. If version 1 is latest output -1, if version number 2 is latest output +1 else output 0 if same version. Both the version numbers are taken as string.
- dke.ade January 15, 2014 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer Intern Android