Yeah, I peaked in my 30s. I was happy about that - I was making good money. Unless someone at Google has an aneurysm and accidentally hires me, I expect my salary to stay about the same from here on out.
Why not go get a job at Google? If you’re good the received wisdom seems to be to inhale Cracking the Coding Interview and the Algorithm Design Manual. If they don’t have any open positions where you’d like to work that’s one thing but why not take the extra money if it’s there?
Google and others in the big five also evaluate "career trajectory".
That means you need to show continuous progression in your career as a non-entry-level hire. Someone who has reached a plateau in salary usually doesn't have that, a "grizzled" tech veteran won't be able to show continuous career progression after surviving ups and downs in the industry (layoffs, failed companies, career changes).
There are exceptions, of course, but those of us who are "olds" have to be more than just "good" to compete with younger talent in many (but not all) workplaces.
There's an expectation that if you're hired below the level of Senior SWE you will get enough promotions over time to reach that level, more or less, although as long as you show the right trajectory there isn't any deadline attached.
If you're hired right in at director level or something, it's not like you're expected to end up CEO or you get fired :)
I have no idea. Probably just spending some time on Wikipedia is enough. Interviewers ask algorithms questions mostly because it's hard to find programming tasks small enough to fit in an interview which cover all the basics and which aren't implementing basic algorithms.