Skip to main content
The 2025 Developer Survey results are in. Explore insights into technology and tools, careers, community and more. View results.

All Questions

Filter by
Sorted by
Tagged with
5 votes
3 answers
1k views

Coding exercise to represent an integer as words using python

Context: Convert a non-negative integer num to its English words representation. Example 1: Input: num = 123 Output: "One Hundred Twenty Three" Example 2: Input: num = 12345 Output: "...
Silah's user avatar
  • 103
2 votes
1 answer
671 views

Find all permutations of string using recursion

Background: I am somewhat new to programming and only two weeks into learning Python. Currently trying to improve my understanding of recursion, which has been a tough concept for me to implement. ...
b-mitch's user avatar
  • 21
0 votes
1 answer
188 views

Getting three numbers input interactively and process them

I'm new to Python and programming in general. Let's imagine I have a simple task: Given 3 numbers from user input, I need to count negative ones and print the result. Considering what I know about ...
QLEDHDTV's user avatar
1 vote
2 answers
116 views

Object-Oriented Blackjack V2

[Edited] formatting and Flake8 linter corrections Four days ago I posted my first object oriented programming project. Everything I have learned to date is self-taught and posting project to receive ...
Infinite Grasp's user avatar
5 votes
2 answers
675 views

DNA Challenge from CS50

Added the problem link below and my implementation of it. Took me a few hours to program. I have added comments to explain my thought process. Problem Link Goal - To implement a program that ...
singhsokhal's user avatar
5 votes
2 answers
351 views

Chess Dictionary Validator from Automatic Boring Stuff with Python

This project is in chapter 5 introduced me to a whole new world of dictionary data structure. To put it briefly, I want to know whether the choice I took between lists, tuples, and dictionaries could'...
yfr's user avatar
  • 179
5 votes
2 answers
605 views

LeetCode 8: String to Integer (atoi)

I'm posting a solution for LeetCode's "String to Integer (atoi)". If you'd like to review, please do. Thank you! Problem Implement atoi which converts a string to an integer. The function ...
Emma Marcier's user avatar
  • 3,702
3 votes
1 answer
2k views

LeetCode 1615: Maximal Network Rank

I'm posting a solution for LeetCode's "Maximal Network Rank". If you'd like to review, please do so. Thank you! Problem There is an infrastructure of n cities with some number of roads ...
Emma Marcier's user avatar
  • 3,702
3 votes
1 answer
47 views

Update UNIX-like system user profile picture with its GitHub account's one

Seeking to learning and have fun, I wrote out this script (what I expected to be) self explanatory and would appreciate some comments on that. I published it as a gist and tried to do my best on what ...
artu-hnrq's user avatar
  • 285
5 votes
2 answers
240 views

Optimizing performance of randomly generated pygame maze game

I made a random maze generator that is also playable. The performance is crap and I'd like to improve it. I'll be working on this for a few more days to make it run better myself, but just thought I'd ...
Aakoo7's user avatar
  • 93
2 votes
1 answer
190 views

LeetCode 839: Similar String Groups III

I'm posting my code for a LeetCode problem. If you'd like to review, please do so. Thank you! Problem Two strings X and Y are similar if we can swap two letters (in different positions) of X, so that ...
Emma Marcier's user avatar
  • 3,702
1 vote
1 answer
113 views

LeetCode 124: Binary Tree Maximum Path Sum 2

I'm posting my code for a LeetCode problem. If you'd like to review, please do so. Thank you for your time! Problem Given a non-empty binary tree, find the maximum path sum. For this problem, a path ...
Emma Marcier's user avatar
  • 3,702
5 votes
3 answers
1k views

Find all numbers that are factors of one array and factor into the second array, then print their count

I'm working on a solution to the Following problem on Hackerrank, and I seem to have found a function that works for the purpose. However, I feel as though this is a very overdesigned solution to a ...
fosstar's user avatar
  • 53
1 vote
1 answer
473 views

LeetCode 1320: Minimum Distance to Type a Word Using Two Fingers II

I'm posting my Python code for LeetCode's 1320. If you have time and would like to review, please do so. Problem You have a keyboard layout as shown above in the XY plane, where each English uppercase ...
Emma Marcier's user avatar
  • 3,702
3 votes
1 answer
418 views

LeetCode 146: LRU Cache II

I'm posting my code for a LeetCode problem. If you'd like to review, please do so. Problem Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following ...
Emma Marcier's user avatar
  • 3,702

15 30 50 per page
1
2 3 4 5
7