All Questions
26 questions
4
votes
1
answer
135
views
Advanced Python Calculator using OOP
I've been into computer science fundamentals (proper data structures/algorithms/etc) including Object Oriented Programming. Therefore, I decided to reformat my old traditional Python Calculator into ...
1
vote
2
answers
108
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 ...
6
votes
4
answers
283
views
Object-Oriented Blackjack
[Edited: added V2 link]
BlackJack V2 - Github
This is my first post, and I was actually going to post this on Stackoverflow when I was rather suggested posting the code here, as it may be better ...
3
votes
1
answer
118
views
Segmentation of list to minimize the largest sum
I have written the following code for diving a list 'seq' into 'k' segments such that the maximum sum of each segment is minimized. I have used dynamic programming to solve this problem. But my class &...
7
votes
2
answers
334
views
ASCII-based OOP blackjack game in Python
I'm new to programming and have been teaching myself to code for about 6 months. Since I have no one to ask about any of coding-related questions, I may have developed bad habits in the meantime, but ...
3
votes
2
answers
165
views
Finding Number of Objects in Image
I wrote a program that, given a 2D array representing pixels in a birds eye view image, it returns the number of Objects in the image.
Pixels that are connected in the up, down, left, and right ...
1
vote
1
answer
208
views
Rock paper scissors coding assignment
I had a coding assignment to write a Rock Paper Scissors game. The main task is not to show a solution but rather to test the coding style. The rules are such:
Problem:
rock is "O", paper is ...
3
votes
1
answer
362
views
Implement hash table using linear congruential probing in python
I have just read the Chapter 5 of Data Structures and Algorithms with Python. The authors implemented hash sets using linear probing. However, linear probing may result in lots of clustering. So I ...
2
votes
0
answers
222
views
Implement priority queue as min-heap in python
The standard library heapq in python doesn't support updating keys as a public method, which makes it hard to be used as a priority queue. Although the official ...
4
votes
1
answer
115
views
Staff Scheduler: Design/Algorithm questions (Python)
Background
I worked at a community center where everyday one of my coworkers would spend 20ish minutes trying to organize the day's schedule. The facility had three rooms: The Great Hall, The Club ...
3
votes
1
answer
2k
views
Python sudoku solver with classes
I just coded an object-oriented Sudoku solver, but I don't have any possibility to check whether I have written good code, so I thought I would just post it here for review. I have looked for other ...
5
votes
3
answers
5k
views
Binary Tree Sort Algorithm (Python)
A Binary Tree Sort is an algorithm that builds a binary search tree from the elements to be sorted, and then traverses the tree (in-order) so that the elements come out in sorted order.
Average Case ...
2
votes
1
answer
2k
views
Shell Sort, Insertion Sort, Bubble Sort, Selection Sort Algorithms
There are seven sorting algorithms in the code copied below.
The first five algorithms have been previously reviewed in this
link.
Selection Sort
The Selection Sort algorithm sorts a list by ...
14
votes
4
answers
3k
views
Shell Sort, Insertion Sort, Bubble Sort, Selection Sort Algorithms (Python)
There is a follow-up question available:
shell-sort-insertion-sort-bubble-sort-selection-sort-algorithms-python.
Selection Sort
The selection sort algorithm sorts a list (array) by finding the ...
2
votes
1
answer
301
views
Sorting Algorithms (Python)
Selection Sort
The selection sort algorithm sorts a list (array) by finding the minimum element from the right (unsorted part) of the list and putting it at the left (sorted part) of the list. The ...