When I read /r/cscareerquestions, it gives me the impression that all companies in Silicon Valley only ask algorithmic questions at job interviews.
My experience as someone living in Europe is that you are generally given a project to complete at home or on-site. Then they take a look at your code and decide whether to give you an offer or not.
Here are the questions and tasks I've been given at job interviews in my career.
If there's a Skype interview before the on-site interview, it means I interviewed for a company in another country.
Webdev shop (2012)
This was my first ever proper job interview where I sent in my CV, dutifully did the take-home project and got an offer. It was after I returned from studying abroad and was looking for a part time job while finishing my Bachelor's.
I was offered 275 LVL for 80 hours/month. It is €833/month before tax for full time work. I declined the offer because I went to work for another company.
Here is a snippet:
I pointed out that, you should have
<meta charset="utf-8"> before
<font> tag, etc.
Registration + login in PHP
The other task was to create a basic CRUD app in PHP that lets users sign up and log in. You should check whether a username is taken with AJAX. After registration, a confirmation email should be sent. When you're logged in, you should see the latest news taken from a remote RSS feed and parsed using PHP DOM libraries. The HTML should also be generated with PHP DOM.
I didn't use any frameworks or libraries, but followed basic MVC principles. I think I named the router
FrontController. I also included CSRF and rate limiting.
Language technology company (2012)
This is a language technology company that builds natural language processing and machine translation tools for the Baltic languages.
In the interview, I asked for at least 6 LVL/h which was a little below my rate at my previous job that I had as a web developer before I want to study abroad. 6 LVL/h is €1450 per month before tax. I was making half of that as I worked there part-time.
I had two hours to solve the three tasks below on-site.
Latvian is a highly inflected language, meaning that words have many different word endings. I had to create a Latvian noun and adjective inflector in C# using OOP princples.
Luckily, I know Latvian grammar by heart and as a native speaker I recreate the following noun declension table easily:
It's actually a little more complicated than that but I basically had to turn this table into OOP code.
Orientation of a polygon
This was an algorithmic question.
I had a list of points and I had to print whether the orientation of the polygon that was made up of these points was clockwise or counter-clockwise.
I think I couldn't figure out the solution.
Two people had pens, pencils and erasers and I had to figure out how many erasers the second person had, I think. It was a simple middle school math problem that can be solved with a simple equation or just brute forced.
Apparently, there was no catch but still many people can't solve it.
Local directory service (2014)
When an ex-boss sends you a message on Skype (that you never use), what's the first thing that comes to your mind? In my case, I immediately started worryng that my code that I wrote three years ago no longer works.
But it turns out he was now at a different company and was looking for developers.
In the interview, when I asked that I'd like to make at least 900 LVL after tax (€2000 before tax), I was asked whether I mind getting paid under the table.
The take home task was supposed to be a simple MVC CRUD app in PHP.
I declined to do the task.
Charts library startup (2015)
I didn't apply for this job but I wanted to see if I can solve this interview problem.
You need to create an HTML page with a 20x20 grid of rotating doughnut charts.
- Doughnuts have different colors
- Rotation speed is 1 full rotation every 2 seconds
- When you click on it, the color and rotation direction is changed
- There's a static image in the background
I had to read up on
requestAnimationFrame otherwise my CPU fan got way too loud.
Language technology company (2015)
I didn't apply for this job but I tried my hand at this interview problem.
It's a machine learning classification task. You have 16 numeric features (named
F16) and a binary label.
Your task is to
- analyze & find redundant features
- train a classifier
- write the code that does predictions on the test set yourself
The dataset was generated in Excel (random numbers, some were linear combinations) and you could easily get a 100% accuracy with most algorithms.
Large tech company (2015)
First Skype interview consisted of various questions
- What happens when you type
domain.comin the browser (in as much detail as you can)
listin Python is implemented? What happens when a new item is added?
- Your eshop can no longer contact the payment gateway but your users can. How can you make make payments work?
- ...some more. I don't remember them anymore.
This was insanely fun. First, you'd need to look up
domain.com using DNS. I had prepared for this so I talked about the whole path down to the network layer. Not mentioning ARP and routing tables would be a red flag. Then you'd need to establish a connection over TCP but which port? It's usually
80 but it could also be
443. I talked about the HSTS header, HSTS preload list and certificate pinning, etc.
Second Skype interview was a coding interview
- Count words or something, not too trivial but not complex either
- Implement a hash table
- Implement an algorithm to find Fibonacci numbers, also without recursion
I was told I passed both interviews and the next step was supposted to be an on-site interview.
But my emails about the next steps went unanwered even when I tried a year later.
I applied for what I guess was mostly a front-end developer position.
I had two quick coding questions in the Skype interview.
- How would you find most frequent words in a text file? Can you do it with Linux tools?
- Create two SQL tables (products and orders). What indexes would you add? How to make a query with
I was then invited to an on-site interview.
The task on the interview day was to create a small application that has coordinates x, y in a table on the left and a graph with these points on the right. When you click on the graph, a new point is added. Or you can add it to the table.
Bonus features (pick two)
- create documentation
- write unit tests
- make it look nice with CSS
- realtime with WebSockets
I chose realtime and unit tests.
Fintech startup (2016)
This is a fintech startup that tries to classify transactions on your credit card statement.
They had a challenge on their website where they give you a small sample of their data and you need to create a machine leraning solution to classify the transactions in five categories (food, restaurants, transportation, utilities and other).
Except the training data was not labeled. They wanted you to label all 6000 transactions yourself. What if a transaction is ambiguous: is it food or restaurant? You can clarify that with them by email.
They would compare your results with their hand crafted algorithm that's got >95% accuracy.
The prize was €200 and possibly a job opportunity.
When communicating with them, I got the impression that they did not know what they were doing. I learned later that I was completely right.
If you want interviewees to badmouth your company every chance they get, do what this company did.
- Have a recruiter that literally can't spell contact you
- Have another recruiter contact you because the previous one was banned from LinkedIn
- Make you wait for a month
- Ask if you mind being yelled at, but the next day there's going to be no hard feelings
- Give you a take-home project
- Ignore you afterwards, not even a rejection email after you complete the project
There was an encrypted message in the job posting and you had to decrypt it (it was Base64) and follow the instructions. I wrote about it on my blog here.
I had a non-technical Skype interview with Swedbank but the interviewers looked bored and I wasn't really gunning for a penetration testing position so I didn't get an offer.
Social network startup (2017)
There were three Skype interviews.
You have an array of numbers from 1 to
n. One number is missing. Find which one.
- Follow up: can you do it without sorting?
- Follow up: what problems could you face if the numbers were large?
I solved it because I'd practiced this problem and seen others' solutions on Leetcode.
We want you to create a simple calculator that can add, subtract, multiply numbers. Keep in mind that we may want to add abitrary new operators/functions in the future. You can have the input in any format that you want.
I started to talk about the postfix notation and the shunting-yard algorithm (whose name or implementation I did not know) but they started to stress the importance of adding new functions.
Then it occurred to me that I can write a simple Lisp interpreter.
I could solve this because I'd tinkered with writing insignificant toy parsers before and I'd read Peter Norvig's article.
This was another Skype interview, this time with the CTO.
- Our clients want to add arbitrary fields to user profiles. How'd you implement that?
- Have you ever created RESTful apps?
- Some questions about authentication, cookies, security, etc.
- ...some other similar questions.
At the on-site interview, I had to add a small feature to their codebase.
In their product, they have a chat very much like Facebook Messenger. It's basically a copy of it.
They wanted me to add statuses to each chat message (sending, error, received, read). Just like on Messenger.
I implemented a hackish (which I was encouraged to do) solution that did not work. My problem was that the feedback loop was very slow (it'd take a minute for me to make a change in code and see it reflected in the browser) and I started on the wrong path and did not have time to finish with a clean solution.
I probably did not get the job.
- Jobs interviewed for: 7
- Offers: 3
- Rejections or no answer: 4
- Strike rate: 43%