Looking at any shortage by the number of applicants or job-seekers assumes that the bulk of the applicants are qualified to do the work.
This is not even remotely true in practice. A large proportion (over 50%, honestly) of the developers I've interviewed in my life can't tell the difference between a tree and an array, much less apply them intelligently. The majority cannot articulate the performance and storage differences between arrays and hash tables. These are the most basic qualifications for writing code.
Without excluding this massive, massive pool of yahoos, I don't think the statistics here are ultimately that meaningful.
That seems like a very strong assertion. I don't have formal CS/data structures training; I've read about all of these structures in the past but probably wouldn't be able to answer your questions about them to the level you seem to expect. (I could tell the difference between a tree and an array, because they look different, but frankly I have no idea where it would make sense to use a tree; they aren't offered as a native type in any of the languages I use day-to-day and I've never missed them. I know a bit about the difference between arrays and hash tables because it's one of the most common criticisms of PHP, but again; to the extent that I use PHP--and I avoid it like the plague--their implementation of "arrays" using hash tables has never once affected me. It is the least shitty part of that language.)
So anyway, I confess my ignorance. And I'm very open to learning more about the structures you're talking about (seriously). But I (and many of the programmers I know) have been successfully writing programs that work for people who want it (and gladly pay for it) for a relatively long time without meeting your most basic qualifications.
When I say that someone can't tell the difference between an array and a tree, I really mean someone does not know what a tree is. The number of interviews I've conducted where the candidate has heard of trees before, but cannot articulate, even in a basic way, what they are, is depressing.
To be more clear, the basic level I'm expecting is "it's a way to store data, where one object has children objects, which in turn have children objects", or something along that theme. Really, if you articulate in some way that it's stuff pointing to other stuff, you're already further along than half the people I've interviewed.
A lot of people can't even get that far.
These questions aren't designed to defeat you, they're questions that have depth so that you can get some idea about the candidate's level of understanding of data structures. Once you get past "it's an object with children" we can go deeper - what is the complexity of fetching an object out of a tree? What of sorting? Disadvantages and advantages in application? Cycle detection? All of these are nice to haves - but the basic requirement is that you have to know what a tree is.
EDIT: I'm more distressed by the number of applicants I've come across who've never written an SQL query, or have no idea what a database schema should look like (never mind noSQL stuff). I generally prefer working with programmers who understand and appreciate big picture design principles over the ones who sweat the details (because in my experience the former are usually able to pick up details pretty quickly, while the latter are not always able to appreciate the big picture design decisions being made) but in bigger teams there is presumably room/requirement for both types.
I've worked with a lot of academics who write code for math and stats without any real computer science knowledge (including no more than a rudimentary understanding of the most basic data structures). I have a business mentor who makes millions of dollars with a piece of legacy web software he wrote himself--I'm certain he could tell you that certain fields are indexed in the DB because the SQL performs better that way, but I doubt he would use the word hashmap/hashtable at all and that doesn't undermine his credibility in my eyes one bit. I have friends who write embedded code all day but couldn't write an SQL query to save their life; that is obviously fine for what they do, and it doesn't make them any worse of a programmer.
My example in the parent comment was obviously relating to web programmers, where the necessity of being able to write a usable SQL query is of far greater importance than the ability to explain how the database is actually executing that query. All I'm saying is that if we are able to deflate our own self-importance just a little bit (and accept the idea that the role of an employer might also be to act as a mentor), suddenly the pool of qualified applicants becomes bigger.
Would it be fair to say that some percentage of that percentage probably aren't qualified to find work as developers, and that contributes to the elevated number?