Print a binary tree by vertical level order like 1 2 4 3 5 print : 3 2 1 5 4
Software Engineer Intern Interview Questions
664,754 software engineer intern interview questions shared by candidates
given an array of numbers to remove the duplicates
If you had a list of appointments (each appointment has a begin time, an end time, and a boolean hasConflict), how would you efficiently go through them and set the hasConflict boolean for each. You cannot assume they are sorted in any way. Keep in mind that one appointment may be very long, etc.
Phone interview question: Given a string pattern of 0s, 1s, and ?s (wildcards), generate all 0-1 strings that match this pattern. e.g. 1?00?101 -> [10000101, 10001101, 11000101, 11001101]. You can generate the strings in any order that suits you.
- Given an array, remove the duplicates and return a unique array keeping the first occurrence of the duplicates and the order. [@2, @1, @3, @1, @2] --> [@2, @1, @3] - how would you implement call for canceling queued blocks with dispatch_after?
I face only one question. If you are given 2 array A={3,1,2,4} B={1,4}. Write a program to compare two arrays and create another array which holds the common values between two array!
Given n sets of choices: (1,2,3), (2,3,4), (4,5) You pick one element from each set of choices. Generate all possible picking.
Consider an X x Y array of 1's and 0s. The X axis represents "influences" meaning that X influences Y. So, for example, if $array[3,7] is 1 that means that 3 influences 7. An "influencer" is someone who influences every other person, but is not influenced by any other member. Given such an array, write a function to determine whether or not an "influencer" exists in the array.
assume you are writing number in ascending order to an array of constant size. once you reach the end of the array, you start writing from the beginning, thus writing over the oldest entries. write an algorithm for finding a specific number in this array.
Write a function that divides two numbers without using the divide '/' operator.
Viewing 91 - 100 interview questions