Objects

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
Given an object with nested objects, this function flattens the object by creating key paths for nested values.
About this solution: This solution is correct and demonstrates a level of completeness. It solves the problem and takes a general approach of flattening the object.
Nov 27
Python / Classes and Objects DifficultyMedium Python
This Python class implements a stack using a list. The stack supports the following operations: push, pop, size, and isEmpty.
About this solution: This solution is complete and solves the problem. The approach is straightforward and easy to understand.
Nov 26
Programming Languages / JavaScript DifficultyMedium JavaScript
Given an object with nested objects, write a function to flatten the object (i.e. convert nested objects into a single level object).
About this solution: The candidate's solution correctly flattens the object. The candidate uses a recursive approach to flatten the object, which is a good approach.
Nov 25
Programming Languages / JavaScript DifficultyMedium JavaScript
This technical problem involves writing a function that takes an array of integers as input and returns the sum of all the elements in the array.
About this solution: This solution is correct and demonstrates a good understanding of how to solve the problem. The approach is straightforward and the code is clean and easy to read.
Nov 24
Python / Classes and Objects DifficultyMedium Python
This technical problem asks the reader to write a Python class that implements a stack using a linked list. The stack should have methods for pushing an integer onto the stack, popping and returning the top element of the stack, and checking if the stack is empty.
About this solution: The candidate's solution correctly implements a stack using a linked list. The push and pop methods work as expected. The is_empty method also works as expected.
Nov 23
Python / Classes and Objects DifficultyMedium Python
This technical problem deals with creating a Python class named "Foo" with an instance variable named "value". The class also has two methods, "double" and "triple", which multiply the value by 2 and 3, respectively.
About this solution: The candidate's solution correctly implements the required functionality. However, the code could be more concise. For example, the double and triple methods could be combined into a single method that takes a multiplier parameter. Additionally, the methods could return the new value instead of modifying the instance variable directly.
Nov 23
Programming Languages / JavaScript DifficultyMedium JavaScript
This problem asks the user to write a function that returns the sum of all integers in an array. An example input and output is provided.
About this solution: The candidate's solution is complete and solves the problem. The candidate's approach is clear and concise.
Nov 22
Programming Languages / JavaScript DifficultyMedium JavaScript
This problem asks you to write a function that takes an array of integers and returns the sum of the array's elements. For example, given the input [1, 2, 3, 4 , 5], the function should return 15.
About this solution: This is a great solution! The candidate has clearly thought through the problem and has provided a very efficient solution.
Nov 20