2
votes
Many if conditions
You have many conditions, and you have results that are created by combining data for true conditions.
Creat a class that can combine these values. Then your code might look like
StringResult calcs;...
- 39.7k
2
votes
Accepted
Some questions about shortest-path algorithms
Dijkstra's algorithm solves the "Single-Source-Shortest-Path" problem and can fail with negative edge weights.
Floyd-Warshall solves the "All-Pairs-Shortest-Path-Problem" and ...
- 192k
2
votes
Accepted
How to implement converters without needing to implement every permutation
I'm not particularly familiar with the specific context here (of celestial mechanics), but wherever there are multiple mutually-convertible representations of the same information, then (in line with ...
- 5,600
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
algorithms × 2173data-structures × 174
java × 107
sorting × 106
design × 103
graph × 89
algorithm-analysis × 83
c# × 78
math × 78
performance × 71
c++ × 69
complexity × 68
big-o × 67
python × 62
optimization × 62
trees × 52
design-patterns × 51
database × 47
search × 46
dynamic-programming × 45
strings × 44
random × 41
javascript × 39
scheduling × 38
geometry × 38