Not sure why people consider it an art.. some software problems only have 1 correct solution that runs in a time constraint, proven by mathematical induction..Art is subjective no?
And some math formulas are considered beautiful, and art is in the eye of the beholder, so even the optimal solutions might be art to some.