Senior software engineer Interview Questions in Canada |

Senior software engineer Interview Questions in Canada


senior software engineer interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

Write a function that divides one number by another, without using the division operator, and make it better than O(n).

7 Answers

This can be done in a recursive function, the following code is in Python. # get result of a/b without using a "divide" operator def div(a,b): if a < b: return 0 else: return div(a-b, b)+1 This is how human being do the division naturally, however, the running time of this is O(n/m), where n is the size of a, and m is the size of b, which means, O(n/m) is guaranteed to be less than O(n), when m is larger than 1. -Maxim

The answer above is still O(n). We can use binary search and find the answer in the interval [1,a] and use multiplication operator.

Totally agree with Vasil. Other option: Long Division Algorithm. O(log n) anyway.

Given an array of int[] like 1,2,3 Find the next largest integer than can be made with these digits (e.g.: 2,1,3)

5 Answers

find LCA for two nodes of a binary tree.

4 Answers

write a c# method to bring pairs of integers that sum up to 10 from an array of integers.

3 Answers

After asking the details of my current role, he only gave me a simple coding question. Write a function using C++ or Java that is passed an integer and it returns the number of bits set to 1. Is there a way to improve your solution and make it faster and more efficient?

3 Answers

A HackerRank challenge with 90 mins to solve

3 Answers

What would the count for the list of it. public class Test { string Data; int Id; public Test(int id, string data) { Data = data; Id = id; } } static void Main(string[] args) { List list = new List(); list.Add(new Test(10, "test")); var d = new Test(10, "test"); if (!list.Contains(d)) list.Add(d); Console.WriteLine("Count of the list is : " + list.Count); Console.ReadLine(); } } What to do to make count 1?

2 Answers

I was given a code to review. I have fixed bugs in their code, made it work, and put detailed comments to all modified lines of code plus detailed comments outside of the code describing what was done and why. The answer was that their student could not understand the comments. Hm, I guess the student should be taught better and I didn't apply for a teacher position. They refused to give me detailed answer, but after all I wasn't sure I wanted it. What a company where students decide whether to hire seniors. After some thinking I've concluded that I was simply used as a free independent code reviewer. If you are experienced developer, avoid these guys, they will pretend they are hiring you, but in fact will just use you. If you are freshly graduated, lazy and not knowledgeable, you can go there, they will teach you how to illegally make others do your job for you.

2 Answers

how to merge two sorted linklist?

2 Answers

What you do if you cannot get something from upper management you need?

2 Answers
110 of 1,220 Interview Questions