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