One of the biggest problems that I am having in applying for a job these days is passing the code challenges.
Especially when they do things that I've not run into in the real world. I can do them fine except that it usually takes longer than the time allotted. Would this help me solve those faster?
for example math problems needing to know various math tricks like all the primes - I didn't know the math trick of looping only up to the square root.
or processing lists. Usually I'm just streaming them and not comparing elements against each other. like finding the max difference between 2 numbers in an array without sorting it or things like that. Or
Another was listing the 3rd grandchildren of a person. I've not needed to utilize a lot of regression and thinking through the logic of it took a long time.
Ohhhh yeah, job interview code challenges... those can be rough.
There are books out there designed specifically for the programming interview, so at the risk of losing you, I will say that those are probably worth checking out.
... but if you're still here: I've got a lot of interview topics covered in the book, for sure. And they're presented in a puzzly way, similar to how problems are presented in interviews. Little problems that require some sort of data structure or algorithmic ingenuity/trick. I think if you have some extra time to put toward the book, you'll get a lot faster at these puzzly kinds of algorithms problems.
BTW I like that prime trick. Two numbers larger than the square root can never multiply to the number that seems to be a mainstay in interviews.
Hash tables are a famous interview topic, too. Check out the snowflake problem that I use to start the book (in the sample Chapter 1 that's available).
Thanks, CodeRanch, for talking with me about my algorithms book! www.danielzingaro.com/alg