In Array find largest second number ?
Software Engineer 2 Interview Questions
665,682 software engineer 2 interview questions shared by candidates
I had a difficult question about a cuboid composed of smaller cubes. How many cubes are there where exactly two faces of the cube are exposed?
There are 199 elements in array. It has only one distinct value? How will find this distinct value? Also for solution please tell about O(n)?How can you make it more efficient?
Given a binary tree with only upwards (parent) node references, re-construct the tree adding in child references. You are given a list of leaf nodes (sorted in left to right order). Tricks include making sure to account for extremely unbalanced trees.
How would you count the number of words in a string consisting of uneven number of spaces between words( not dictionary words)? With and without library functions.
print all permutations of a string
You have a 3 and a 5 gallon jug, how do you get exactly 4 gallons?
They asked about programming and analytical questions.
1. What is a virtual? 2. If class has virtual function, what happens in compile time and in run time? 3. What is a polymorphism? 4. Write the function that gets array of chars and returns number of elements with 3 bits ON, performance is important. 5. Write the function that draws a line from x1,y1 to x2,y2 6. You have very long function with many return statements. You have to determine how much time it runs.
-What does the assignment X=(X)&(X-1) do? Use this to count number of 1s in a number.
Viewing 1471 - 1480 interview questions