Skip to main content

All Questions

Filter by
Sorted by
Tagged with
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 ...
thebenman's user avatar
  • 1,158
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 ...
Webbarr's user avatar
  • 323
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 ...
Webbarr's user avatar
  • 323
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, ...
thebenman's user avatar
  • 1,158
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 ...
Jianmin Chen's user avatar
  • 2,396
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 ...
Jianmin Chen's user avatar
  • 2,396
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 ...
Gringo Jaimes's user avatar
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 ...
Jianmin Chen's user avatar
  • 2,396
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 ...
Phrancis's user avatar
  • 20.4k
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 ...
Denis's user avatar
  • 8,508
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 ...
Denis's user avatar
  • 8,508
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 ...
Overly Excessive's user avatar