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 / 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:
Python / Data Structures DifficultyMedium Python
The function should take a list of integers as input and return the sum of the integers in the list that are divisible by 3.
About this solution: The candidate's solution correctly returns the sum of the integers in the list that are divisible by 3. The candidate has used a for loop to iterate through the list and check if each integer is divisible by 3. If it is, the integer is added to the sum. This is a valid approach to solving the problem.
Nov 25
Python / Web Development DifficultyMedium Python
This technical problem deals with retrieving the page title from a URL using Python. The given URL is http://www.google.com and the expected output is simply "Google".
About this solution: This solution correctly imports the necessary libraries and prompts the user for input. It then uses the urllib2 library to read the contents of the website and BeautifulSoup to parse the HTML. Finally, it prints out the title of the page. This is a complete solution that correctly solves the problem.
Nov 25
Python / ORM and SqlAlchemy DifficultyMedium Python
Given a list of integers, this function will return the sum of the odd integers in the list.
About this solution: This solution correctly returns the sum of the odd integers in the list. The approach is straightforward and easy to understand.
Nov 25
Python / Asynchronous DifficultyMedium Python
This technical problem deals with finding all possible permutations of a list of integers in Python. An example input would be [1, 2, 3] and the corresponding output would be [[1 , 2, 3], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1] ].
About this solution: The candidate's solution is correct and demonstrates a good understanding of the problem. The candidate has used an optimal solution in the form of a built-in generator function, which is memory efficient.
Nov 25
Python / Data Structures DifficultyMedium Python
This technical problem deals with finding the sum of all the elements in a list of integers. An example input would be [1, 2, 3, 4, 5], and the corresponding output would be 15.
About this solution: This solution is complete and solves the problem. The approach is straightforward and easy to understand.
Nov 25
Python / Modules and Packages DifficultyMedium Python
This technical problem asks the user to write a Python function to check if a given string is a pangram or not. A pangram is a word or sentence containing every letter of the alphabet at least once. For example, "The quick brown fox jumps over the lazy dog" is a pangram.
About this solution: The candidate's solution is correct and demonstrates a level of completeness. The approach is clear and efficient.
Nov 25
Python / Web Development DifficultyMedium Python
Given an array of integers, this function returns the largest sum of consecutive integers in the array.
About this solution: The candidate's solution correctly returns the largest sum of consecutive integers in the array. The approach is straightforward and easy to follow.
Nov 25
Python / Data Structures DifficultyMedium Python
The problem is to find the indices of two numbers in a list of integers that add up to a given target value. An example input would be [2, 7, 11, 15] with a target value of 9, and the expected output would be [0, 1].
About this solution: The candidate's solution is complete and solves the problem. The candidate's approach is to create a dictionary to store the difference between the target and the current number as the key and the index of the current number as the value. If the current number is in the dictionary, the candidate returns the index of the current number and the value of the key. Otherwise, the candidate adds the difference between the target and the current number as the key and the index of the current number as the value.
Nov 24