Skip to main content

All Questions

Filter by
Sorted by
Tagged with
3 votes
1 answer
102 views

Merge discrete integer intervals

What it does The code starts with a set of integer intervals, and can add new intervals (possibly by updating existing intervals). Essentially, it is a bit array whose index starts at ...
FromTheStackAndBack's user avatar
4 votes
1 answer
137 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 ...
Raphael Irvin'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
6 votes
4 answers
288 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 ...
Infinite Grasp's user avatar
3 votes
1 answer
126 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 &...
Jahid Chowdhury Choton's user avatar
0 votes
2 answers
866 views

Generates all pairs (combinations of 2) up to a limit (exclusive)

Any improvements on this combination generator. Seen a lot of combination generators online, but none like this. Found pseudocode at: https://www.baeldung.com/cs/generate-k-combinations Fastest I ...
Javier Munoz's user avatar
2 votes
0 answers
43 views

JavaScript Linter in Java

I wrote a simple Linter that checks for matching opening and closing braces for one line of JavaScript. It utilizes a stack to store opening braces found in the line, then compares the first closing ...
dbrokamp's user avatar
5 votes
4 answers
3k views

C++ basic bank money class

I am trying to create a basic money class that fits into a small console banking application I am making. Money.h ...
mathewsjoyy's user avatar
2 votes
1 answer
647 views

red black tree implementation in cpp

I am learning algorithms and trying to implement them in c++, I have chosen to try to implement a red-black tree due to its self-balancing properties and its ability to stop the worst case of O(n) ...
paigelarry342's user avatar
0 votes
2 answers
499 views

c++ Most clean way to implement duplicate Binary Search Tree for complex type

I have tried to make my own implementation for a BST task I was given for a complex type (Transaction), that should be able to store duplicate values as well. However, I am not sure if I have gone ...
paigelarry342's user avatar
7 votes
2 answers
342 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 ...
e1630m's user avatar
  • 138
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 ...
MPC's user avatar
  • 61
1 vote
1 answer
210 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 ...
Harton's user avatar
  • 33
1 vote
2 answers
132 views

checking is ellipse is filled or not

following code below works fine but feels kind of a mess. Any one has a better way to do this? I am creating a basic "Enter Pin" to unclick screen on an app. So if the user enters the 1st ...
dave's user avatar
  • 11
2 votes
2 answers
197 views

Parking places design

I got a question: Design a parking system. There are 3 types of parking spaces: big, medium and small. Implement ParkingSystem class(int big, int medium, int small)....
Michu93's user avatar
  • 145

15 30 50 per page
1
2 3 4 5
7