Python

Categories: Code Problem / Data Structures and Algorithms / Recursion (32) Code Problem / Data Structures and Algorithms / Binary Search (30) Code Problem / Data Structures and Algorithms / Backtracking (26) Code Problem / Data Structures and Algorithms / Linked Lists (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) Databases / SQL / Database Security (13) Code Problem / Data Structures and Algorithms / Graphs (13)  More...

Recent solutions:

Check these solutions from our community:
Python / Data Structures DifficultyMedium Python
Given a list of integers, this function will return a dictionary with the integers as keys and the number of times the integer appears in the list as values.
About this solution: This solution is complete and solves the problem. The approach is straightforward and easy to follow.
Jan 31
Python / Asynchronous DifficultyMedium Python
Given a list of numbers, this Python program finds the first unique element in the list. For example, given the input [1, 2, 3, 4, 5, 1, 2 , 3, 4], the output would be 5.
About this solution: The candidate's solution is correct and demonstrates a level of completeness. The candidate's approach is also correct, as it uses a dictionary to store the number of times each element appears in the list. This approach is optimal because it only iterates through the list once and then iterates through the dictionary once. Therefore, the time complexity is O(n) where n is the size of the list.
Jan 31
Python / Asynchronous DifficultyMedium Python
This Python program finds the sum of the even-numbered elements in a list. For example, given the input list [1, 2, 3, 4, 5], the program would output 6.
About this solution: The candidate's solution is complete and solves the problem. The candidate's approach is efficient, using the modulo operator to check if a number is even.
Jan 31
Python / Asynchronous DifficultyMedium Python
This problem is about returning a list of odd numbers from a given list of integers. For example, given the input list [1, 2, 3, 4, 5], the output would be [1, 3, 5].
About this solution: This solution is correct and demonstrates a good understanding of list comprehensions.
Jan 30
Python / Modules and Packages DifficultyMedium Python
This technical problem asks the reader to write a Python function that will sum all of the integers in a given list. An example input and output are provided.
About this solution: This solution correctly sums a list of integers. However, it is not very robust - for example, it would not work if the input was not a list of integers. Additionally, the function does not have any documentation to explain what it does or how to use it.
Jan 30
Python / Asynchronous DifficultyMedium Python
This technical problem involves implementing a function that takes in a list of numbers and an asynchronous function, and returns a list of the results of the function applied to each number in the list.
About this solution: The candidate's solution correctly implements the function and returns the expected output. The candidate uses the asyncio library to create asynchronous tasks and wait for them to complete. This is a good approach to solving the problem.
Jan 30
Python / Web Development DifficultyMedium Python
This problem involves finding the sum of all odd integers in a given list. An example input and output is provided.
About this solution: This solution is complete and solves the problem. The approach is straightforward and easy to understand.
Jan 29
Python / Data Manipulation DifficultyMedium Python
This technical problem deals with finding the sum of odd numbers in a list. The input is a list of integers, and the output is the sum of the odd numbers in the list.
About this solution: The candidate's solution correctly returns the sum of the odd numbers in the list. The approach is straightforward and easy to follow.
Jan 29