Linking to Google search because they are behind a registration wall, but I haven't gotten an email from them yet. All the code examples are in C#, but they were both really good reads.
I also found this a really good read for diving deep into how indexes work -- http://sql-performance-explained.com/
I learned a lot about how indexes work from it.
Super fun blog way of looking at it!
It's even better - logarithmic as the internal nodes have thier keys sorted and you can binary search within one.
The beauty of it is that SQLite uses the free-est possible license ever conceived, in every possible sense of the word. In a million years, the SQLite source will be entirely unencumbered from any restrictions, philosophies, moral leanings or uses.
You can literally do anything you want with the SQLite source, quaint ideas like the GPL are merely a minor subset of the possibilities, most of which haven't even been conceived of yet. It's so free that if you don't like the license it's published under, you can fork it, place it under the license you feel comfortable with and nobody cares.
It's likely that the license the SQLite source has been published under will withstand entire shifts of civilizations, economic theories, governments and more yet to be imagined. Future evolved species, with entirely different modes of cognition will still be able to work with it without worrying about tangling with any legal issues.
When the invasion of alien lawyers happens, the only software they'll bring back to their home planet will be software similarly unencumbered.
For the GPLv3, they'll annihilate our world.
Unless you live in a country where you can't put things in the public domain, which is most of them (even in the US reading such a possibility is debatable and debated), then you literally can't do anything with the SQLite source, at least not with any legal recourse.