26 points · by burritofanatic · 11y ago · 29 comments
What does that mean, "do" algorithms, I wonder. Design algorithms based on requirements which describe the inputs and outputs? Implement existing algorithms from a description? Check the correctness of algorithms? Some of all of the above?
If it's the same algorithm as last year, why would it be amazing that it takes 15 minutes to do it (whatever that entails)? If you had to basically reinvent insertion sort the first time and now you can just regurgitate it from memory, of course it's faster.
Is it like, "write down the entire A-star search algorithm in pseudo-code from memory"?
In software engineer, when applying for jobs at tech companies, you are universally asked to program solutions to algorithms problems on a whiteboard that follow a very specific formula. If you ever interview for a software position, you will get these exact kinds of questions.
Such questions are usually things like:
"Given a N sorted lists of numbers, join the lists into a single sorted list efficiently"
"Implement a Stack which has push, pop, and minimum operations in O(1)"
"Traverse a Tree and print out each item in level by level order" ect
They are all very formulaic and similar. In the last 3 years I've done about 100 algorithms interviews, and 9 out of 10 times it is a question I've been asked before.
You can find other examples at Glassdoor, hacker rank, or project Euler.
http://www.glassdoor.com/Interview/Google-Interview-Question...
Let Q[(Node, Cost)] be a priority queue.
Let G be a graph. (This makes up the search space.)
Let V be the set of Nodes visited by the algorithm.
Let S be the starting Node of G.
Let F be the objective Node of G. (Node we are searching for)
Let D(N1, N2) -> n be a function (computes the number of edges between N1 and N2.
Let H(N) -> T be a function that computes an admissible heuristic cost for traversing N. (eg, taxicab distance)
Let Search(G, Q, V, S, F) be a function that finds the lowest-cost path to F:
Add (S, 0) to Q
While there are items in Q:
Pop (N, C) from Q
If N is equal to F:
Return the path from N to S. (Trivial parent traversal)
Add N to V
For each Nc in N's neighbours:
Set Nc.Parent = N
If Nc is not in V:
Add (Nc, H(N) + D(N, Nc)) to Q
Return an error, a path does not exist.
I have to admit this ended up taking longer than I thought it would. ~20 minutes. And I'm not sure if it's correct.It sounds like xiaoma went to a good one (Hack Reactor from her comments) but the author of the article did not. There are no regulatory bodies, so caveat emptor.
I've been programming for a while and I'm pretty sure I've never heard someone gender a function
Not 100% sure. But otherwise, I also have never heard of a gendered program component.
Maybe they picked it up from someone while learning English and it stuck with them.