Join our community to practice, learn, solve your problems with AI. Recruiters: create tests and evaluate candidates instantly.
Categories: Code Problem Databases Python Programming Languages Mathematics Machine Learning NodeJS Puzzles Math Algorithms Strings Theorems Data structures Games JavaScript  More...

Recent solutions:

Check these solutions from our community:
Machine Learning / Data Science DifficultyMedium
The k-nearest neighbors algorithm is a supervised learning algorithm that can be used for both classification and regression. The algorithm works by finding the k nearest neighbors to a given data point, and then using those neighbors to predict the class or value of the data point.
About this solution: The candidate's solution is complete and solves the problem. The approach is generally sound, although there may be more efficient ways to implement the algorithm.
Nov 04
Code Problem / Data Structures and Algorithms DifficultyMedium Python
This problem deals with finding a target value in a sorted array of integers. The function should return the index of the target value if it is found in the array, or -1 if it is not found.
About this solution: This solution is optimal because it is O(n) time complexity. However, it only works if the array is sorted. If the array is not sorted, this solution will not work.
Nov 04
Databases / SQL DifficultyMedium SQL
This technical problem involves writing a SQL query that returns the total revenue for each customer. The table schema is provided, and an example input and output are also given.
About this solution: The solution is optimal because it uses the GROUP BY clause to group the rows by customer_id and then uses the SUM function to sum the revenue for each customer.
Nov 04
Databases / SQL DifficultyMedium SQL
Write a SQL query that returns the total quantity of each product ordered by each customer.
About this solution: This solution is complete and solves the problem. The approach is straightforward and easy to follow.
Nov 04
Databases / SQL DifficultyMedium SQL
This question asks for the 5th highest salary from the "Employees" table. The example input is a table with id, name, and salary columns, and the example output is a table with a salary column.
About this solution: The candidate's solution correctly finds the 5th highest salary from the "Employees" table. The solution uses the correct SQL syntax and demonstrates a good understanding of the problem.
Nov 04
Databases / SQL DifficultyMedium SQL
This question asks for the 5th highest salary from the "Employees" table. The example input is a table with id, name, and salary columns, and the example output is a table with a salary column.
About this solution: The candidate's solution correctly finds the 5th highest salary from the "Employees" table. The solution uses the correct SQL syntax and demonstrates a good understanding of the problem.
Nov 04
Databases / SQL DifficultyMedium SQL
The table has two columns, id and data. The query should return the data in ascending order of id.
About this solution: The candidate's solution correctly returns the data in the table in ascending order of id. The solution is complete and solves the problem. The approach is straightforward and easy to understand.
Nov 04
Databases / SQL DifficultyMedium SQL
This problem asks for a SQL query to find all users in a table who have a valid email address.
About this solution: This solution is incomplete because it does not account for email addresses that may have more than one '@' character. A more complete solution would use a regular expression to match email addresses.
Nov 03