Python / Data Structures

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
Given a list of integers, this function returns a dictionary with the integer as the key and the number of times the integer appears in the list as the value.
About this solution: The candidate's solution correctly solves the problem and is reasonably complete. The candidate uses a simple loop to iterate through the list and keep track of the number of times each integer appears. This is a good approach.
Nov 15
Python / Data Structures DifficultyMedium Python
To calculate the percent change in stock prices, we can simply subtract the stock price on the previous day from the stock price on the current day, and divide by the previous day's stock price .
About this solution: The candidate's solution is optimal because it uses the built-in pct_change() function in pandas.
Nov 14
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 each integer appears in the list as values.
About this solution: The candidate's solution correctly solves the problem and demonstrates a level of completeness. The candidate's approach is clear and easy to follow.
Nov 14
Python / Data Structures DifficultyMedium Python
This technical problem deals with how to keep only certain columns in a dataframe using Python. A function is provided that takes in a dataframe and a list of column names, and returns a new dataframe with only the columns in the list. An example is given of input and output.
About this solution: This solution is complete and solves the problem. The approach is straightforward and easy to follow.
Nov 12
Python / Data Structures DifficultyMedium Python
Given a list of words, this Python program finds the longest word that can be made by concatenating other words from the list. For example, given the input ["cat", "cats ", "dog", "dogs", "pig", "pigs"], the output would be "catsdogspigs".
About this solution: This is a great solution! The candidate has thought about the problem and come up with a solution that is both complete and efficient.
Nov 10
Python / Data Structures DifficultyMedium Python
This problem asks the programmer to sum the elements of an array of integers. The input is an array of integers and the output is an integer representing the sum of the elements in the array.
About this solution: This solution is complete and solves the problem. The approach is straightforward and easy to understand.
Nov 10
Python / Data Structures DifficultyMedium Python
This technical problem involves creating a function that takes in a list of words and returns a dictionary with the words as the keys and the number of times the word appears in the list as the values .
About this solution: This solution is complete and solves the problem. The approach is straightforward and easy to follow.
Nov 10
Python / Data Structures DifficultyMedium Python
Given a list of integers, the largest difference between any two adjacent elements can be found by using a function. An example input would be [2, 4, 1, 16, 7, 5] and the corresponding output would be 15.
About this solution: This solution is correct and demonstrates a level of completeness. The approach is also optimal, as it only loops through the list once.
Nov 09