|
leper khan posted:I hate to dredge it up, but there's a closed form expression for the nth Fibonacci number so recursion or iteration are clearly the wrong thing to use. I know of two closed form solutions for Fibonacci series. One of them is inefficient as gently caress and requires operations on arbitrarily sized numbers, the second one starts giving wrong solutions pretty quickly. I can easily write efficient (log n counting multiplication and addition as constant time ) solution by matrix exponentiation thats 100% accurate, so...
|
# ¿ Jun 10, 2016 21:00 |
|
|
# ¿ May 12, 2024 07:53 |
|
Yeah, lawsuits tend to ruin things for everyone. And it is not just US thing, here in Europe my mother's company fired a guy who provably falsified trip expenses and got sued by him in return. Unsurprisingly, he got his rear end handed to him in court, but...
|
# ¿ Jun 11, 2016 14:02 |
|
feedmegin posted:Why modulus? In C its just for(count=1; count<1000;count +=2) { sum += count; } or similar... That only works if you are iterating like a savage... Obviously only the closed form solutions is good enough for a discerning interviewer. code:
|
# ¿ Jun 11, 2016 15:08 |
|
feedmegin posted:Also, and this is a small thing, but I assume C# has the usual logic operators, in which case '(foo & 0x1) == 1' is probably better than foo % 2. I mean, a decent compiler should optimise the latter to the former anyway, but at the hardware level modulus is either a lot slower than an and (on x86 for instance) or not even in the ISA (for ARM). Oh god no. Write intent first, savagely optimize if you can prove that it helps and optimizer won't do it for you.
|
# ¿ Jun 13, 2016 20:06 |
|
leper khan posted:Another got super confused when I provided a solution in big-theta(NlogN). No wonder he was confused, who the hell specifies big theta?
|
# ¿ Jun 21, 2016 12:59 |
|
MrMoo posted:Most in the UK are ~3.5GPA (2.1) but thankfully HR don't always block lower applicants. Oh god, I think I hate this more than when a company publicly advertises they are looking for ninjas and rockstars.
|
# ¿ Jul 18, 2016 14:47 |
|
The_Franz posted:Simple, they just don't use them. My opinion and experience is that some parts of Boost are pretty horrible, but some are really awesome, which is the reason why its getting into standard. Also there is Boost Spirit.
|
# ¿ Jul 19, 2016 11:01 |
|
ultrafilter posted:It might be that the CEO's a snob, but it might also have been the right choice. Not having a degree is a social liability in some circles, and at a lot of companies, tech director is a position where it's important to be able to navigate those circles. That reminds me, at my last job, the CEO was an university professor and prided himself on only employing people with degrees. This became really funny when he was meeting with some people from company we made software for and started introducing people like "this is Mr So-and-So, with Masters Degree from Such-and-Such university" "this is Mr So-and-So, with Bachelors Degree from Such-and-Such university" "this is Mr So-and-So, with Masters Degree from Such-and-Such university" ... "And this is Mr So-and-So, with Masters Degree from ..." "no" "Well, with Bachelors Degree from ..." "no" "?" "no degree". Said person was one of our most productive and SW-smartest guys.
|
# ¿ Jul 21, 2016 08:23 |
|
|
# ¿ May 12, 2024 07:53 |
|
MrMoo posted:"what is the most misfortunate feature of C++11?" idk Let me tell you about std::memory_order_consume and friends. It was underspecified, impractical and possibly unimplementable. IIRC it is being fixed in C++17 (or maybe it was already fixed in C++14, I prefer to keep myself to sequentially consistent atomic variables, unless absolutely necessary). Also, std::bind is actually from TR1, predating C++11 by quite a lot.
|
# ¿ Aug 16, 2016 16:56 |