Categories: Code Problem / Data Structures and Algorithms / Recursion (32) Code Problem / Data Structures and Algorithms / Binary Search (30) Code Problem / Data Structures and Algorithms / Linked Lists (26) Code Problem / Data Structures and Algorithms / Backtracking (26) Code Problem / Data Structures and Algorithms / Stacks and Queues (25) Code Problem / Data Structures and Algorithms / Hashing (24) Databases / SQL / Backup and Recovery (19) Code Problem / Data Structures and Algorithms / Arrays and Strings (19) Databases / SQL / Database Normalization (18) Code Problem / Data Structures and Algorithms / Time Complexity (17) Databases / SQL / Locking (16) Databases / SQL / Replication (15) Databases / SQL / SQL Queries (13) Code Problem / Data Structures and Algorithms / Graphs (13) Databases / SQL / Database Security (13)  More...

Recent solutions:

Check these solutions from our community:
Code Problem / Data Structures and Algorithms DifficultyMedium C#
This problem deals with finding a target value in a sorted array using binary search. If the target value is found in the array, the index of that value is returned. If the target value is not found in the array, -1 is returned.
About this solution: The candidate's solution does not demonstrate a level of completeness and does not solve the problem. The general approach is not clear.
Dec 09
Code Problem / Data Structures and Algorithms DifficultyMedium C#
This technical problem involves removing duplicate elements from a singly linked list. An example input is given, as well as the expected output.
About this solution: The candidate's solution does not demonstrate a level of completeness and does not solve the problem. The approach is not clear.
Dec 09
Code Problem / Data Structures and Algorithms DifficultyMedium Python
The function should return the sum of the integers that are hashed to odd values.
About this solution: The candidate's solution is optimal because it uses a generator expression to iterate over the list and sum only the values that hash to odd values. This is optimal because it is a single pass over the list and uses a generator expression to avoid creating a new list.
Dec 09
Machine Learning / Supervised Learning
Supervised learning involves training a model on labeled data, so that it can learn to predict the correct labels for new data. Unsupervised learning involves training a model on unlabeled data , so that it can learn to find patterns in the data. Reinforcement learning involves training a model by providing it with feedback on its performance, so that it can learn to maximize its reward.
About this solution: 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
Code Problem / Data Structures and Algorithms DifficultyMedium Python
Given an array of n integers, this algorithm will find the maximum sum of any contiguous subarray of the array. For example, given the input array [1, -3, 2, 1, -1], the algorithm would output 3.
About this solution: The candidate's solution correctly finds the maximum sum of any contiguous subarray of the given array. The approach is to keep track of the current sum as we iterate through the array, and update the maximum sum if necessary. If the current sum ever becomes negative, we reset it to 0 since we know that a subarray with a negative sum will never be the maximum sum.
Dec 09
Code Problem / Data Structures and Algorithms DifficultyMedium C#
This problem deals with implementing a binary search algorithm to find the index of a given target value in a sorted array. If the target is not found, the function should return -1.
About this solution: The candidate's solution does not demonstrate a level of completeness and does not solve the problem. The general approach is not clear.
Dec 08
Code Problem / Data Structures and Algorithms DifficultyMedium C++
The problem asks for a way to determine whether there is a route between two nodes in a directed graph. One example is given, where the nodes are connected in a linear fashion. The solution should work for more general cases as well.
About this solution: The candidate's solution is complete and solves the problem. The candidate has used a breadth-first search approach, which is a good choice for this problem.
Dec 08
Code Problem / Data Structures and Algorithms DifficultyMedium JavaScript
Given an array of integers and a target sum, return the indices of the two numbers that add up to the target sum.
About this solution: The candidate's solution is correct and demonstrates a level of completeness. The candidate has correctly identified the problem and has provided a solution that solves the problem. The candidate's approach is general and could be applied to similar problems.
Dec 08