Eww, what an anti-pattern! Try return [conditions].isGoodTag() ? "keep" : "burninate", or even better return [true: "keep", false: "burninate"][[conditions].isGoodTag()] (branches and jumps are slow, you know) — cat3 hours ago
6 hours later. I have finally formated my latex documents bibliography correctly. Only thing I lost in the process was my will to continue writing on the document.
BTW, MartinR already had a good, accepted answer, and went out of his way to make it even better after all that, so I'm pimping it
@skiwi You need to become addicted to internet points again :)
I just found a naughty bug in LINQPad. If you have an instance of it already opened, and you try to open another one, it crashes both instances instantly
If you want an answer about complexity then DONT put this on codereview. That is only for reviewing your code not answering questions about your code. — Loki Astari7 secs ago
@Phrancis Yeah. I've been thinking "Cool, this is nearly done now" since about midday. There's always something more that hasn't been cleaned/packed/transported yet.
@Zak Yeah. I helped a friend of mine move his family of 4 from a 2-floor apartment to a house a few months ago, we had to get everything done in one day, it was hectic
@RichardCritten Please take a look at Code Review's on-topic help centre. Reviewing code is on-topic, explaining code is not. This questions would be shot down if migrated. — Mast28 secs ago
// Verify if a number is evenly divisible by another
public static bool IsDivisibleBy(int num, int divisor)
{
if (num % divisor == 0)
{ return true; }
else
{ return false; }
}
I am always having confusion when it comes to run time complexity of an algorithm. I wrote this code for suffix array, I am not sure of the run time complexity of insertSuffixIntoTree method. I think it is O(n), but the code where I am counting the number of children might be adding some time com...