3 ms·
A great source of both clever and insightful code can be found at https://codegolf.stackexchange.com/ https://codegolf.stackexchange.com/. Code golf is the spor
by gsliepen 5y ago
A great source of both clever and insightful code can be found at https://codegolf.stackexchange.com/ https://codegolf.stackexchange.com/. Code golf is the sport of writing the smallest amount of code that solves a problem. It requires both clever use of syntax to write short code, but also insight in how to reduce the problem to something much simpler than it at first appears. For example, take this problem that checks if the given color name is one of the colors of the rainbow, where the insight is that you can create a perfect hash function to solve it: https://codegolf.stackexchange.com/questions/214678/is-it-a-rainbow-color https://codegolf.stackexchange.com/questions/214678/is-it-a-...