Software Engineer Interview Questions in Canada |

Software Engineer Interview Questions in Canada


Software engineer interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

A few questions on basic command-line syntax in Unix shells: 1. How would you log output and error messages from a command to a file? 2. How would you run the same command on every file in a directory? 3. How would you find the PID of a named process (say if you wanted to kill it)?

5 Answers

1. command >file 2>&1 2. cd dir; for i in *; do command; done 3. ps | grep processname or ps -C processname

#3 I disagree, more like ps aux |awk '$0 ~ /ProcessName/ && $0 !~ /awk/ {print $2}' If you want the PID

#3 To find the PID: pgrep -x

Recently I attended the interview at Google and I was asked "You are given a sorted list of disjoint intervals and an interval, e.g. [(1, 5), (10, 15), (20, 25)] and (12, 27). Your task is to merge them into a sorted list of disjoint intervals: [(1, 5), (10, 27)]."

9 Answers

Given an array of 1001 elements, consists all numbers from 1-1000. Only one number is repeated. Write a function that returns the repeated number.

4 Answers

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

7 Answers

Explain a situation where a deadlock would occur.

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

Given 100 white marbles and 100 black marbles and two jaws. Put these marbles in the two jars in a way that would maximize the chance of retrieving a white marble from any given jaw.

4 Answers

In a collection of strings, output the string that occurs most often.

4 Answers

How can we store the name of street in a map service? Because street names have characters in common.

3 Answers

Given 2 arrays of names, how would you merge them?

3 Answers
110 of 2,249 Interview Questions