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
Given a dataframe, find the row with the maximum value in column 'C' and return the values in columns 'A' and 'B' for that row.
About this solution: The candidate's solution is optimal and solves the problem.
Nov 15
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 / Web Development DifficultyMedium Python
This technical problem involves writing a Python script to scrape the title and body text from a given URL.
About this solution: The candidate's solution correctly scrapes the title and body text from the given URL. The solution is clear and concise.
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 / Algorithmic Puzzles DifficultyMedium Python
The Tower of Hanoi is a classic puzzle in which disks are moved from one peg to another, without ever placing a larger disk on top of a smaller one.
About this solution: The candidate's solution is correct and solves the problem. The candidate has taken a recursive approach to solving the problem, which is a good approach. The candidate could improve their solution by adding comments to explain the code.
Nov 14
Python / Algorithmic Puzzles DifficultyMedium Python
The Tower of Hanoi is a puzzle in which the objective is to move a stack of disks from one rod to another, obeying certain rules. This problem asks for the sequence of moves required to solve the puzzle for a given number of disks.
About this solution: The candidate's solution correctly solves the problem. The candidate uses a recursive approach, which is the most efficient way to solve the Tower of Hanoi problem.
Nov 13
Python / Algorithmic Puzzles DifficultyMedium Python
The goal of the Tower of Hanoi problem is to move all disks from the first tower to the third tower, such that each disk is on top of a larger disk. You can only move one disk at a time, and you can only move a disk to the top of another tower if that tower has no disks on it, or if the top disk on that tower is larger than the disk you are trying to move.
About this solution: The candidate's solution is incomplete and does not solve the problem. The candidate's approach is to describe an optimal solution, but does not provide any code or pseudocode to implement the solution.
Nov 13