4 ms·
I was just writing this out! I believe practice in unit testing is what let me get this question right. I almost submitted n^1, n^2, n^3 before I realized I did
by benihana 11y ago
I was just writing this out! I believe practice in unit testing is what let me get this question right. I almost submitted n^1, n^2, n^3 before I realized I didn't get any wrong answers and something didn't feel right. I credit this 'instinct' to having written thousands of tests, and trying to make them fail to make sure my tests weren't lying to me.
- LoSboccacc 11y agogot tricked even if I tested 1, 1, 1
- deleted 11y ago[deleted]
- deleted 11y ago[deleted]
- tjohns 11y ago1, 1, 1 was actually the test case that clued me in that n^1, n^2, n^3 couldn't be the right solution.
- Natsu 11y agoIt's funny. Even though I got the right answer, looking back, I still see many holes in my tests. I only tested positive and negative integers. I didn't even think to try fractions, decimals, hex values, text, etc. and I was already expecting a confirmation bias test.