Give us more info like the year, make, model and engine info. Do you have a check engine light illuminated? If so what are the codes? Have you tested for fuel pressure and fuel flow? Have you replaced the fuel filter?
You have to change the mass flow sensor
insert the answer in the equation, replacing the variable, and see if it still makes sense.
Could be either. Start with replacing the filter then if it still has trouble do a fuel pump pressure and leak down test.
While replacing the alternator a vacuum line might have been disconnected or something like that... inspect for something loose close to the alternator dave
Check the screws and rubber gasket on your fuel pump.It is often caused by air penetration on your fuel line.
Check the condittion of the spark plug first if ok then check the air fillter and blow out. If it's still doing it check the jet in the carb and blow out the holes making sure it is clear. If this doesn't work then you are into timing problems or valve settings but I don't think it is as serrious as that.
There is another cause for the code.
Check the radiator fan operation.
If ignition problems still persist after replacing the neutral safety switch on a 1995 Chevy S10 check the starter. A broken starter will result in a car which will not be able to turn over the engine.
Check the air cleaner element, and replace if dirty. Replace the fuel filter.
have the cam position sensor checked Check fuel pressure.
check fuse or relay in underhood fuse box,