I sometimes wonder if the comments that say nothing more than "C++ is too complicated" are from people who use it regularly, much less people who are even commenting on TFA
123 karma · joined August 14, 2018
I sometimes wonder if the comments that say nothing more than "C++ is too complicated" are from people who use it regularly, much less people who are even commenting on TFA
I cannot make one of those.
Refrigerator.
Ideally both approaches would be used, with the general case being used to detect and inform more targeted tests.
The rising tide should raise ALL boats, otherwise inequitability will lead to social instability as seen througout human history so far.
Does every sequence contain the empty sequence? If so, does it not contain the empty sequence at every position in itself? Harder to reason about.
If you use either Optional or Result you don't need to choose a special value like -1 to be your "invalid string position" case which could be used incorrectly.
I'd argue it's largely stylistic for this example, especially so outside of functional programming niches.
node->data
node->next
Zero "WTF"s