Algorithms, Data Structures and Coding

Technical coding problems for technical interviews. These problems are typical for most companies engineering interviews and may include algorithms, data structures and coding questions.

Dec 13
Machine Learning Engineer

Problems and solutions for Machine Learning engineering interviews. Machine learning engineering interviews may include questions about designing machine learning systems, models and pipelines.

Nov 06
SQL Problems

SQL problems from technical interviews at top technology companies. These problems apply to interviews for SQL developers, database administrators.

Feb 01

Recent solutions

Below is the list of recent solutions.
The solution above is optimal because it uses the LIMIT clause to limit the number of rows returned by the query.
Feb 02

The candidate's solution is correct and demonstrates a good understanding of SQL.
Jan 27

The candidate's solution correctly explains the three types of machine learning. However, the candidate could provide more specific examples to illustrate each type of learning. For example, for supervised learning, the candidate could explain that a common type of supervised learning is classification, where the algorithm is given a set of labeled data (e.g. images of animals that are labeled as "cat" or "dog") and is then tasked with correctly labeling new data. For unsupervised learning, the candidate could explain that a common type of unsupervised learning is clustering, where the algorithm is given a set of data points and must group them into clusters based on similarity. For reinforcement learning, the candidate could explain that a common type of reinforcement learning is learning to play a video game, where the algorithm is given a reward for each step closer it gets to winning the game.
Dec 09

The candidate's solution is incomplete - it does not return the expected output. The candidate has correctly identified that a join is needed to combine the data from the three tables, but has not included all the necessary conditions in the WHERE clause. A better approach would be to use a LEFT JOIN and check for NULL values in the products table, as this would return all customers who have placed an order for a product that is out of stock.
Dec 01

This solution is correct and demonstrates a level of completeness. The approach is straightforward and uses only the mathematical tools of comparison and addition of decimal numbers.
Nov 11

The candidate's solution correctly states the Euler's formula and provides a valid proof by the Noah's Ark method. However, the solution could be more complete by providing more explanation and examples. For instance, the candidate could explain how the Noah's Ark method works and provide additional examples to illustrate the proof.
Nov 11

This solution correctly states the Euler formula and provides a brief explanation of why it is true. However, it could be more complete by providing a more detailed explanation of the proof. For example, the solution could explain how the fact that every edge is shared by two faces implies that the number of edges is equal to twice the number of faces. Additionally, the solution could provide a specific example to illustrate the formula.
Nov 11