Live data from Hacker News

The software development final exam: Algorithms and Data Structures

daemonology.net

71–80 of 208 posts

Re: The software development final exam: Algorithms and Data Structures

#71

Earlier quoted context omitted.

The first two questions I knew the answer immediately because I've read about asymptotics and runtime analysis. Questions 3 and 4 I simply don't have the background (I've never heard of a B-tree, and I've heard of heap sort but I don't know the algorithm). Question 5 I'd not seen before, but an algorithm was quite obvious because I've taken a course on graph theory (of course, my answer could easily be wrong). My ten…

So, my tentative positions is that these questions are easy if you've covered the relevant material before, and very hard to impossible if not. There's a lot of people who are very confidently giving wrong answers to questions, which weighs against that position.

I guess I'll wait for my grading before saying any more :)

Re: The software development final exam: Algorithms and Data Structures

#72

"If you can't answer the majority of the questions on these four papers, and you're working or intend to work as a software developer, you should ask yourself why — most likely you're either you're missing something you really should know, or you're lucky enough to be working within a narrow area where your deficit doesn't matter." [1] I'm a self-taught front end web developer who didn't have a traditional computer s…

I haven't looked to see if every question is covered by these, but here's some standard textbooks I like: Algorithms and Data Structures: http://www.amazon.ca/Introduction-Algorithms-Thomas-H-Cormen... http://www.amazon.ca/Algorithms-4th-Robert-Sedgewick/dp/0321... Computer Architecture and Operating Systems: http://www.amazon.ca/Computer-Architecture-Quantitative-John... http://www.amazon.ca/Design-Implementation-Fr…

> I haven't looked to see if every question is covered by these, but here's some standard textbooks I like:

The good thing is @cpervica has suggested standard textbooks, as opposed to suggesting obtuse texts unreachable to a beginner.

Algorithms:

I think a beginner might be confused by Sedgewick's terse coding style.

Computer Architecture and Operating Systems:

I haven't read either of the books. I would add http://bcs.wiley.com/he-bcs/Books?action=index&itemId=04... to the list. Like most of the OS books, you won't get a full picture of the OS from this book, but you will know the topics which will help you understand a real OS. Also most of the non-recent book won't cover flat memory model http://en.wikipedia.org/wiki/Flat_memory_model That is not to say knowing about segmentation is going to hurt you.

Mathematics:

I haven't read any of the books. From TOC, the cryptography and the statistics book looks good. I would recommend skipping cryptography maths for starters. If you are a beginner, an application level understanding of cryptography is what you need.

Networking and Systems:

Tanenbaums books loves history and theory. It's a nice book nevertheless. Once you are done with it, you should read Stevens' book on TCP/IP http://www.kohala.com/start/tcpipiv1.html

If you find time, you should read the second volume as well: http://www.kohala.com/start/tcpipiv2.html

For databases, I read this book:

http://www.amazon.ca/Database-System-Concepts-Abraham-Silber...

This is not a very interesting book, but it does cover the fundamentals very well. You will need a bit of will power to read it.

Re: The software development final exam: Algorithms and Data Structures

#73

I have no educational training in computer science, but I work as a software developer. I could not answer any of those questions, literally 0 out of 5. 1. Is O(2^n) equal to O(3^n)? Why? I have absolutely no idea what that means. But I did have to answer this question: why does the application crash? "Oh...that's because the developer that was pontificating yesterday about how heap operations behave asymptotically f…

> But I did have to answer this question: why does the application crash? "Oh...that's because the developer that was pontificating yesterday about how heap operations behave asymptotically forgot to check if the database connection was open before he called the Save method. Apparently, such arcane trivia is beneath him. I can fix it."

False dichotomy. You posit the developer who understands asymptotic notation can't figure out why does the application crash, or how to write to databases. I don't see how understanding asymptotic notation negatively affects someone's programming ability..

Re: The software development final exam: Algorithms and Data Structures

#74

I wanted to ask this question regarding big O notation. When we say f(n) = O(g(n)) all we mean to say is that f(n) <= c(g(n)) with other constraints. My question is, why do we have an equal to sign, why is f(n) equal to O(g(n)).. they could have made up a new symbol to establish such a relationship... The reason why I think so is because I see equal to as a transitive relationship.. So, if a = b and c = b, then a = c…

why is f(n) equal to O(g(n)).. they could have made up a new symbol to establish such a relationship...

It is an equality relationship why would they need a new symbol?

f(n) = O(g(n)) .. n^2 = O(n^2) and n = O(n^2), so n = n^2 which is not making any sense

You are right it doesn't make any sense. Try n^2 = O(Selection_sort(n)),O(Bubble_sort(n)) = O(Selection_sort(n)), n^2 = O(Bubble_sort(n)). Nice and transitive the way it should be.

Re: The software development final exam: Algorithms and Data Structures

#75

I wonder about the utility of an exam that one can ace with five minutes of googling.

> I wonder about the utility of an exam that one can ace with five minutes of googling.

I won't debate the utility of the exam, but the majority of the tests I have taken can be aced with five minutes of googling.

Re: The software development final exam: Algorithms and Data Structures

#76

"If you can't answer the majority of the questions on these four papers, and you're working or intend to work as a software developer, you should ask yourself why — most likely you're either you're missing something you really should know, or you're lucky enough to be working within a narrow area where your deficit doesn't matter." [1] I'm a self-taught front end web developer who didn't have a traditional computer s…

I haven't looked to see if every question is covered by these, but here's some standard textbooks I like: Algorithms and Data Structures: http://www.amazon.ca/Introduction-Algorithms-Thomas-H-Cormen... http://www.amazon.ca/Algorithms-4th-Robert-Sedgewick/dp/0321... Computer Architecture and Operating Systems: http://www.amazon.ca/Computer-Architecture-Quantitative-John... http://www.amazon.ca/Design-Implementation-Fr…

I believe that

  Computer Systems: A Programmer's Perspective
http://www.amazon.com/dp/0136108040

is superior to the widely mandated

  Computer Architecture: A Quantitative Approach
for software engineers and programmers. The former has less hardcoded numbers than the latter and more timeless principles.

Re: The software development final exam: Algorithms and Data Structures

#77

I wanted to ask this question regarding big O notation. When we say f(n) = O(g(n)) all we mean to say is that f(n) <= c(g(n)) with other constraints. My question is, why do we have an equal to sign, why is f(n) equal to O(g(n)).. they could have made up a new symbol to establish such a relationship... The reason why I think so is because I see equal to as a transitive relationship.. So, if a = b and c = b, then a = c…

why is f(n) equal to O(g(n)).. they could have made up a new symbol to establish such a relationship... It is an equality relationship why would they need a new symbol? f(n) = O(g(n)) .. n^2 = O(n^2) and n = O(n^2), so n = n^2 which is not making any sense You are right it doesn't make any sense. Try n^2 = O(Selection_sort(n)),O(Bubble_sort(n)) = O(Selection_sort(n)), n^2 = O(Bubble_sort(n)). Nice and transitive the…

It's not an equality relationship. If it was an equality relationship it would be transitive. But as your parent points out, you have n=O(n^2), n^2=O(n^2) but not n=n^2, so transitivity doesn't hold.

Another way to see that the relationship can't be equality: the left hand side is a function, the right hand side is a set of functions. Two things from different classes can't be equal.

The relationship is simply set membership.

Re: The software development final exam: Algorithms and Data Structures

#78
The idea is good, but the questions not so much. First off, the number of questions is too small for a subject so large as algorithms and data structures; I'd rather have something in the 25-40 range. But that of course, for objective questions which answer is a one-line sentence max (not requiring writing code or calculation).

And this approach is the second problem. A few questions of this kind are good; for one, I like Q.1 (trivial if you know the subject, puzzling if you don't as the proposition is just nonsensical as a mathematical problem). But some other questions are tests of memorization, sometimes for not too relevant information. For one thing, you ask to "name" heapsort operations. I have long forgot those names, BUT I know the fundamental ideas of heaps and heapsort, and writing the full heapsort (even in paper) is a simple exercise of coding... but I wouldn't still remember those names.

Also, I would spend significant time writing this code (and also deducing the complexity if I don't know it by heart), compared to somebody who just crammed through textbooks. (And yes, it is possible to memorize this kind of information in a few days of cramming; if those final exams have schedules known well in advance and they are spread at least 3-4 days from each other, this pretty much cancels the advantages you mention.)

You seem to be dismissive of "practical programming ability"; I agree that code as answer to written questions has issues -- coding problems are better in a whiteboard test, interacting with the examiner. Or with careful restrictions of language etc. But it seems wrong to have questions that penalize (due to time restrictions) people who can deduce the answer with some coding or calculation, and reward people who just memorized the subject... for one thing, this memory won't last forever, unless you become a professor to keep "practicing the theory" on a daily basis. But more important, the ability to deduce the answer is very revealing of somebody's knowledge of the really fundamental concepts. Show me a CS graduate who knows by memory the bipartite graph algorithm, and this may be just some guy that has study discipline and good memory but is clueless about the core ideas of graphs and will have forgotten everything after a couple years of graduation. Now take somebody who can sketch the code for bipartite testing, even when given a problem that does not use the word "bipartite" or even the word "graph" -- so the student needs to identify the proposed problem as a specific graph problem, and then deduce the algorithm in order to solve the graph problem -- and that's somebody I would hire, either for a software engineer position or for a professor position.

Re: The software development final exam: Algorithms and Data Structures

#79
post #62

Earlier quoted context omitted.

Just to get the facts straight, the linked article had this to say: If you can't answer the majority of the questions on these four papers, and you're working or intend to work as a software developer, you should ask yourself why — most likely you're either you're missing something you really should know, or you're lucky enough to be working within a narrow area where your deficit doesn't matter. The reader can judge…

> or you're lucky enough to be working within a narrow area where your deficit doesn't matter This implies that non-algorithmic work is a narrow area. In my experience, it's the vast majority.

[deleted]

Re: The software development final exam: Algorithms and Data Structures

#80
post #70

Earlier quoted context omitted.

I think that question 1 is not well formulated (unless that is the answer he expects). Equality makes only very limited sense for asymptotic notation.

It's a perfectly sensible question. Knowing that both O(2^n) and O(3^n) are sets, and using the definition of set equality, it asks whether "f in O(2^n)" implies "f in O(3^n)", and vice versa. Only one of the implications holds...

[deleted]
Post reply on HN