Hacker News new | past | comments | ask | show | jobs | submit login

This sounds like a graph problem similar to the google unit conversion problem (https://alexgolec.dev/ratio-finder/). You could probably do a data driven solution, but the gist is convert to and from one normalized form. Then it's n*2 functions.

This is probably what you're implicitly doing with the class solution you're talking about.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: