Programming Languages

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:
Programming Languages / JavaScript DifficultyMedium JavaScript
The function should take an array of integers as input and return the sum of the odd numbers in the array.
About this solution: This is a great solution! The candidate has thought through the problem and provided a complete solution that solves the problem. The candidate has also taken care to optimize the solution, which is great to see.
Nov 22
Programming Languages / JavaScript DifficultyMedium JavaScript
The function should take in an array of integers and return the sum of the odd integers in the array.
About this solution: This is a great solution! The candidate has thought through the problem and provided a complete solution that solves the problem. The candidate has also taken care to explain their thinking process, which is always a good sign.
Nov 22
Programming Languages / JavaScript DifficultyMedium JavaScript
The problem is to write a function that calculates the sum of the odd numbers in an array. An example input would be [1, 2, 3, 4, 5] and the corresponding output would be 9.
About this solution: This solution is correct and demonstrates a good understanding of how to approach this problem. The candidate has correctly identified that a for loop is the best way to iterate through the array, and has also correctly identified that only odd numbers need to be added to the sum. This is a well-thought-out solution.
Nov 22
Programming Languages / JavaScript DifficultyMedium JavaScript
To reverse a string without using any built-in string methods, you can loop through the string and build a new string with the characters in reverse order.
About this solution: The candidate's solution is correct and demonstrates a level of completeness. The solution uses a for loop to iterate through the string, starting from the end and adding each character to a new string. This is optimal because it is O(n) time complexity and O(n) space complexity.
Nov 21
Programming Languages / JavaScript DifficultyMedium JavaScript
The forEach method is more efficient than using a for loop to iterate over an array, because it avoids creating a new scope for each iteration.
About this solution: The candidate's solution is correct. The forEach method is more efficient than a for loop because it avoids creating a new scope for each iteration.
Nov 21
Programming Languages / JavaScript DifficultyMedium JavaScript
This technical problem deals with writing a function that returns the sum of the even numbers in an array. An example input and output are provided.
About this solution: This is a great solution! It is very efficient and only iterates through the array once.
Nov 21
Programming Languages / JavaScript DifficultyMedium JavaScript
Given a string, this program will reverse the order of the words.
About this solution: The candidate's solution is correct and demonstrates a level of completeness. The candidate has correctly identified that the optimal solution is to split the string into an array of words, reverse the array, and then join the array back into a string. This is a linear time solution.
Nov 21
Programming Languages / JavaScript DifficultyMedium JavaScript
This technical problem deals with reversing a string in JavaScript. Given a string of length n, the function should return the string reversed. For example, given the input string "abcdef", the output should be "fedcba".
About this solution: The candidate's solution is correct and demonstrates a level of completeness. The candidate has correctly used the built-in reverse() method to reverse the string. The candidate's solution is also optimal because it is a one-liner.
Nov 21