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:
Code Problem / Data Structures and Algorithms DifficultyMedium C++
This problem asks you to write a function that takes in an array of integers and returns true if any element appears more than once in the array. Otherwise, the function should return false.
About this solution: This is a great solution! The candidate has used a hash set to keep track of unique elements in the array as they iterate through it. This is an efficient way to solve the problem with a time complexity of O(n).
Nov 27
Databases / SQL DifficultyHard SQL
This technical problem deals with finding employees who have been with a company for more than 5 years. Given a table of data with employee start and end dates, the goal is to write a query that returns all employees who satisfy the 5-year criterion. An example input and output is provided.
About this solution: The solution above is optimal because it is the most efficient way to find the employees who have been with the company for more than 5 years.
Nov 27
Code Problem / Data Structures and Algorithms DifficultyMedium C++
Given a string of digits, this problem seeks to find all possible valid IP addresses that could be generated from it. IP addresses are typically represented in dot-decimal notation (e.g . "192.168.1.1"), so the goal is to find all possible ways to group the digits in the input string into sets of four that could each correspond to one section of an IP address.
About this solution: The candidate's solution is complete and solves the problem. The candidate's approach is to generate all possible IP addresses and check if they are valid.
Nov 27
Programming Languages / JavaScript DifficultyMedium JavaScript
This technical problem deals with finding the sum of all elements in an array. An example input is given as [1, 2, 3, 4] and the expected output is 10.
About this solution: This is a great solution! The candidate has clearly thought through the problem and has provided a very efficient solution.
Nov 27
Databases / SQL DifficultyHard SQL
Given an XML document, write a SQL query to find all the nodes with a given attribute value.
About this solution: The candidate's solution is complete and solves the problem. The candidate's approach is to use the XMLTABLE function to parse the XML document and return a table of values. The XMLTABLE function takes an XML document and a path expression as arguments. The path expression is used to extract the desired nodes from the XML document. The XMLTABLE function returns a table with a column for each node in the path expression. The XMLTABLE function is used in the FROM clause of the SQL query. The WHERE clause is used to filter the results to only include rows where the value of the attribute is equal to the desired value.
Nov 27
Code Problem / Data Structures and Algorithms DifficultyMedium C++
Print the power set of a set of distinct integers. The power set of a set is the set of all its subsets.
About this solution: The candidate's solution is complete and solves the problem. The approach is to use bitwise operators to generate all possible subsets. This is a clever approach that demonstrates a good understanding of bitwise operators.
Nov 27
NodeJS / Authentication DifficultyMedium JavaScript
This technical problem deals with writing a function to authenticate a user based on their email and password. If the user is authenticated, the function should return true. Otherwise, it should return false .
About this solution: This solution is a good start, but it is not complete. In order to authenticate a user, you will need to check if the email and password are valid. If they are, then return true. Otherwise, return false.
Nov 27
Databases / SQL DifficultyHard SQL
This technical problem deals with finding the second highest salary from a table of employees. An example table is given, along with the expected output.
About this solution: The candidate's solution is correct and demonstrates a good understanding of SQL. The solution is also efficient, as it uses the ORDER BY and LIMIT clauses to sort the table by salary in descending order and then return the second highest salary.
Nov 27