Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I disagree. It nice to have a non-FizzBuzz problem. I.e. code that you could actually ship.


I disagree. If you are writing shippable code in an article, it's because the article is about how to write shippable code. This article is not about that, so writing shippable code risks detracting from the main purpose of the article.


Exponentiation is almost never shippable code, most languages have an operator or standard library for that.


For certain ranges of numbers.

But you could imagine this being part of, say, a "big integer" library. (Which C, C++, PHP, JS all lack.)



If you like esoteric, I learned this algorithm for obtaining the exponent of a 2x2 matrix, which amusingly enough is part of an interesting fibonaccialgorithm.




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

Search: