Quote:
Originally Posted by RustyBrooks
My experiences have been different than daveT's, but possibly it's because I self-select for jobs that are kind of bitchy about hiring. I tend to get most job leads through people I know, and most of them probably gravitate towards that same kinds of jobs with the same kinds of hiring strategies.
Some companies I interview at have little to no whiteboarding and only ask very trivial questions. But I have gotten some doozies.
Here's some stuff I've been asked to whiteboard in the last few years
* a solver for sudoku
* a thing that given a dollar amount and a set of coin denominations returns the minimum coins to make change
* data structures that are robust in multiple threads
* an "unrolled linked list" (I'd never heard of it, but it wasn't hard)
* an efficient algorithm for finding a continuous subset of a list of numbers with the smallest sum modulo a number
* given that you record time since the unix epoch in a double precision variable, when is the first time that you will not be able to represent microsecond precision
* a thing that takes multiple streams of sorted numbers with a given interface, and finds all the instances where there are at least N of the same number
* an algorithm for efficiently transmitting data over a lossy channel
Stuff I've been asked to write programs for in real time, with someone watching
* a document search routine (i.e. find documents that match a query string, ordered by # of matches)
* solutions for some little toy type games
* djikstra's algorithm (well, they didn't call it that, but they wanted the shortest path in a graph)
* heapsort
and many many more
These are not for entry level jobs - they're senior software engineer jobs. However, I think some of them might be tough without a CS background, even if you have some experience? Because unless you're interested in these kinds of things for fun, you probably haven't thought much about them. Dynamic programming is easy, for example, unless you've literally never heard of it. Heapsort is easy, unless you don't know how to implement a heap. And so forth.
I think at some point you're probably going to have to teach yourself some CS-type stuff just to find the next job. There are pretty easy ways to do it. Hackerrank seems like a good way to brush up for the simpler stuff.
Shouldn't a CS fresh grad know how to at least begin to approach all of these problems? I'll admit that a few of those would stump me at zero, especially the linux time and data transmission ones.
For "mid-level," the general stuff has been things like:
* Write function that takes a list of names returns a list of unique names that start with "S."
* Write a function that returns a list of lists, [[username, cnt]] that counts how many times a each user logged in during the month of December.
* I did get some matrix stuff once, but I don't recall the details of it. I think it was transposing or seeing if the rows, columns and diagonals had equal sums.
* Do you use Sublime Text?
Overall, 90% of what I've gotten was string processing stuff.
SQL stuff tends to be super-specific to the system you are writing on:
Write a query with the result colums:
-customer name
-running monthly spending for customer
-running monthly spending for all customers
-running average monthly spending for all customers
-difference of monthly spending for each customer -vs- the global average
-order by customer spending max to min
-limit to customers with yearly spending over 5,000
If you have windowing, this isn't difficult to write. If not... beg for mercy. To be fair, I only got this level of insanity once, but most are kind of in the arena, where having windowing makes a huge difference.
The rest tend to have a somewhat "right" answer, meaning you are going to get syntax disagreements on string concatenation or string splicing. But ultimately, do you know the difference between the joins and stuff like that.