2a. Given a binary array (an array consisting of only '1's and '0's) of length n, find the minimum number of operations necessary to collect all the '1's at the ith position. In one operation you can shift only one '1' to an adjacent position. Return the minimum number of operations required for every index from 1 to n.
Software Development Engineer Internship Interview Questions
85 software development engineer internship interview questions shared by candidates
2b. Given a binary tree, flatten the binary tree into one dimension in such a way that the order in which one can access the elements is the same as a preorder traversal and only the left child nodes can contain values, the right child has to point NULL.
explain a time you had a difference in opinion
Lowest Common Ancestor of a Binary Search Tree.
How would you deal with the tight deadline?
Q: explain how you embody the leadership principle of bias for action.
You are given a task to parse phone numbers out of a logfile on a linux system. How would you approach this task?
Implement a stack from the scratch. Add a method to return the min value of the stack, in addition to pop() and push().
Pretty easy questions. Seems like they were straight from Program Interviews Exposed, and basic data structure & OOP questions.
If a tree possess same tree node.
Viewing 71 - 80 interview questions