Is it possible to get a mortgage after bankruptcy?

How much does the neighborhood matter when buying a home?