Kitchen Floor Installation Before Cabinets?

I’m a first time home buyer. I am going to purchase a home that needs some TLC, especially in the kitchen. Should I replace the flooring before or after installing the new top and bottom cabinets?