Preguntas de entrevista de Software development engineer iii

209

Preguntas de entrevista para Software Development Engineer Iii compartidas por los candidatos

Principales preguntas de entrevista

Ordenar: Relevancia|Popular|Fecha
Amazon
A un Software Development Engineer III le preguntaron...17 de julio de 2012

Telephone interview: Find largest integer from an array of integers. The integers in the array are arranged in strictly increasing (no 2 integers are same) or strictly increasing then decreasing; so like a curve and you have to find the peak. Discuss time complexity. Write code.

4 respuestas

The question is a variation of the commonly asked problem of finding the start/end index of a sorted array that has been rotated. Takes O(log n) time. Menos

You can solve this question using ternary search

First, binary search will not work since just looking at a single point will not tell you if it's on the decreasing or increasing side of the curve. What you need is modified binary search. Looking at position i check position i+1 if it's increasing then search right otherwise search left; Code: int peak(vector V, int i, int iStart, int iEnd){ assert( i >= 0 && i = 0 && iStart = 0 && iEnd < V.size()); assert( iStart <= i && i <= iEnd ); if (i == iEnd) return i; int iCurr = V[i]; int iNext = V[i+1]; int iStartNew = iStart; int iEndNew = iEndl if( iCurr < iNext ) iStartNew = i; else iEndNew = i; int iNew = (iEndNew-iStartNew)/2; if( iNew == i ) iNew++; return peak(V, iNew, iStartNew, iEndNew); } Menos

Mostrar más respuestas
Amazon

Write a function to calculate build order given a project with a list of dependencies that also need to be built

3 respuestas

Topological sort

Topological sort on the dependencies depicted as graph

This can be solved by first creating a dependency graph and then performing a DFS search on it. Menos

Microsoft

Display the first 3 character of a word(string)

2 respuestas

I used substring from 0 to 3rd character.

That would cause a runtime error of the string was 0, 1, or 2 characters long...

Amazon

- How to determine if a given string is a combination of words in the dictionary. The given string does not have space at all. - Very complex questions about big O and improve algorithms

2 respuestas

1st question) It's quite unclear what defines "combination of words", ie headset is a complete combination, however pulliehanger (just made up) is not a complete combination. Solution 1) Assuming dictionary is a hashset, we can simply iterate through the length of the string and check if that string exists in hash set. If it does we can recursively check the remaining string. It's expensive to store hashset and the algorithm takes 2^n. Solution 2) We can use trie data structure so that storage complexity would be lowered. The rest would be the similar as above (we iterate through and check every possibility with trie) How do we eliminate 2^n algorithm? Well, it's fairly simple. We can do a n^2 algorithm by simply trying every possibility of words, regardless of them being overlapped. Then we store these words' indices in a order kept list (such as linked array list in java), so that we would have a list where it is sorted by the first index. Then we check whether 2 of these elements in this list do not overlap by simply looking at the first and the last element in a constant (1) time, assuming that the question is asking not complete combinations. If the question is asking about whether it's a complete combination, then we would keep the elements that start with index 0 separately and use a dynamic programming with the rest where we fill indexes fit into next index table and try to match with the index 0 elements, which would take m^2 time. Menos

its not n^2 to try all words

Microsoft

Suppose you have a C++ base class and several classes that inherit from it. What might happen if you do not write a virtual destructor for the base class?

2 respuestas

If you reference the derived classes by a pointer of the base class type - the destructor of the derived classes will not be called upon destruction performed using that pointer. Menos

Only the base class destructor would be called and so any pointers/ memory allocated in the derived classes will remain with out being removed. Menos

Amazon

Q. Implement division without using the operator.

2 respuestas

Subtract values in a for loop

You can also use bit opperation

Rupeek

Questions from geeks for geeks. Api basic questions.

1 respuestas

Interviewer expecting the same approach what is there in geeks for geeks. please don't judge the candidate on the basis of the answer , judge on the approach he/she is using to solve. Menos

Verifone

Aptitude questions were not too difficult but you get 30 seconds for each question!

1 respuestas

Keep cool and try to answer all of them

Varian Medical Systems

C# Core, OOPs concepts, Design Patters, Entity Framework, Selenium, Coded UI, API Testing, Performance Testing

1 respuestas

Prepared well so gave most of the answers

Viendo 1 - 10 de 209 preguntas de entrevista

Consultar preguntas de entrevista para empleos similares

software developersoftware engineermember of technical staffprincipal engineer