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
This technical problem deals with adding elements in an array. Given an array of integers, the function should return the sum of the elements in the array.
About this solution: The candidate's solution is correct and demonstrates a level of completeness. The candidate's approach is also optimal.
Nov 20
Python / Classes and Objects DifficultyMedium Python
This technical problem explains how to create a calculator class in Python that can perform addition, subtraction, multiplication, and division operations. The calculator takes two operands (numbers) and an operator as input, and returns the result of the operation.
About this solution: The candidate's solution is complete and solves the problem. The approach is straightforward and easy to understand.
Nov 19
Python / Classes and Objects DifficultyMedium Python
This technical problem deals with implementing a stack data structure in Python using a class. The class should have two methods: push, which adds an item to the top of the stack, and pop , which removes and returns the top item from the stack. If the stack is empty, pop should raise an IndexError.
About this solution: The candidate's solution is optimal because it uses the built-in list data structure to store the items in the stack. The list is a dynamic array, which means that it can grow and shrink in size as needed. The push method is O(1) because it simply appends the item to the end of the list. The pop method is O(1) because it simply removes the last item from the list.
Nov 13