Software Engineer Interview Questions

467,290 software engineer interview questions shared by candidates

If V is a vector with n items and subroutine Exchange swaps its arguments, then the following code fragment sorts V in descending order. for( j = 0; j < n - 1; j++ ) for( k = 0; k < n - j - 1; k++ ) if( V[k] < V[k+1] ) Exchange( V[k], V[k+1] ); How many calls to Exchange are made if initially, V[i]=i, for i = 0, 1, 2, ..., n - 1 ? a. n-1 b. n c. n(n-1)/2 d. (n-1)(n-2) e. n(n-1)
avatar

Software Engineer

Interviewed at Everpure

3.5
Apr 30, 2011

If V is a vector with n items and subroutine Exchange swaps its arguments, then the following code fragment sorts V in descending order. for( j = 0; j < n - 1; j++ ) for( k = 0; k < n - j - 1; k++ ) if( V[k] < V[k+1] ) Exchange( V[k], V[k+1] ); How many calls to Exchange are made if initially, V[i]=i, for i = 0, 1, 2, ..., n - 1 ? a. n-1 b. n c. n(n-1)/2 d. (n-1)(n-2) e. n(n-1)

- Languages: Different between Java and C++, garbage collector in java (how it work), static vs dynamic memory allocation - Data structures: Linked lists, queues, stacks, heap, trees - OOP: polymorphism, design patterns that I used before - Algorithms: Sorting algorithms I know and there complexity, how to search for a number in an array (sorted and not sorted cases) - Coding question: reverse a single linked list
avatar

Software Engineer

Interviewed at Bloomberg

4
Oct 20, 2015

- Languages: Different between Java and C++, garbage collector in java (how it work), static vs dynamic memory allocation - Data structures: Linked lists, queues, stacks, heap, trees - OOP: polymorphism, design patterns that I used before - Algorithms: Sorting algorithms I know and there complexity, how to search for a number in an array (sorted and not sorted cases) - Coding question: reverse a single linked list

giving numbers 2,3,5,7,11 , 1.multiply each number by 2, 2.if the result is bigger than 25 , then go to next step, otherwise repeat the 1st step. 3. multipy the result by 3. 4. add XX 5. divide with XX. question: which number will produce maximun output
avatar

Financial Software Developer

Interviewed at Bloomberg

4
Nov 14, 2009

giving numbers 2,3,5,7,11 , 1.multiply each number by 2, 2.if the result is bigger than 25 , then go to next step, otherwise repeat the 1st step. 3. multipy the result by 3. 4. add XX 5. divide with XX. question: which number will produce maximun output

Viewing 1881 - 1890 interview questions

Glassdoor has 467,290 interview questions and reports from Software engineer interviews. Prepare for your interview. Get hired. Love your job.