1) Are willing and able to work in SF/Seattle/NYC.
2) Have a degree from a decent university (preferably in CS) and about 3-6 plus years of experience.
3) You spend a lot of time prepping for coding interviews (i.e reading https://careercup.com, etc)
See:
Those numbers and levels are pretty accurate albeit a little low based on my experience living in the Bay Area.
The problem is that 300k actually doesn't go that far when you factor in rent/mortgage and the concept of starting a family in those cities.