All Questions
12 questions
5
votes
1
answer
352
views
Straightforward tax calculator OO design
Similar questions have been asked here before and my solution is pretty much in line with some of the answers.
I wanted to work on this a bit.
Scenario
Basic sales tax is applicable at a rate ...
2
votes
1
answer
1k
views
Polymorphic DBConnector class exercise
GitHub
GitHub if it's easier
I'm in the process of doing a training course in C#. I've just gone over covering Polymorphic OOP / composition over inheritance etc...
The latest exercise I completed ...
2
votes
1
answer
659
views
Stopwatch exercise from training course
Github
Github for easy testing
I'm currently undertaking a training course to try & further develop my skills in
C#. The latest exercise was to create a basic stopwatch class that meets the ...
6
votes
1
answer
4k
views
Design an object oriented parking lot
I solved this system design interview question.
The problem description
Design a parking lot
Constraints and assumptions
What types of vehicles should we support?
Motorcycle, ...
5
votes
1
answer
5k
views
Hackerrank: KnightL on a Chessboard
Problem statement
KnightL is a chess piece that moves in an L shape. We define the possible moves of KnightL(a,b) as any movement from some position (x1, y1) to ...
2
votes
0
answers
2k
views
Leetcode 317: Shortest distance from all buildings
Problem statement:
You want to build a house on an empty land which reaches all buildings in the shortest amount of distance. You can only move up, down, left and right. You are given a ...
1
vote
2
answers
1k
views
Sortable Shapes
Description:
Although shapes can be very different by nature, they can be sorted by the size of their area.
Create different shapes that can be part of a sortable list. The sort order is based on ...
8
votes
2
answers
5k
views
Hackerrank - value of friendship (II)
Problem statement
You're researching friendships between groups \$n\$ of new college students where each student is distinctly numbered from \$1\$ to \$n\$. At the beginning of the semester, no ...
10
votes
5
answers
1k
views
Largest Prime Factor (PE3) using OOP
I want to learn some C# syntax/paradigms (I'm more used to Java), and have been wanting to get a bit better at math as well, so I solved ProjectEuler3: Largest prime factor with the following small ...
5
votes
2
answers
673
views
Project Euler #23 Non-abundant sums
I'm having trouble optimizing the Project Euler problem number 23 :
A perfect number is a number for which the sum of its proper divisors is exactly equal to the number. For example, the sum of the ...
5
votes
2
answers
1k
views
Project Euler #11 Largest product in a grid
Question
Link to the exercise : https://projecteuler.net/problem=11
I'm currently working on the Project Euler exercise's and I just finished the eleven exercise. It's working fast enough it takes ...
1
vote
1
answer
632
views
Project Euler 11 - Largest Product in a grid
I have to say without sounding arrogant, because I am only a novice coder, yet after looking at other's solutions, my solution is definitely not the shortest and most lightweight one and probably not ...