My 1996 nissan altima keeps stalling out. on 1996 Nissan Altima

We replaced the knock sensor and fuel pump but problem persist. I can be driving, slowing down and it stalls or sitting still and it stalls. Will restart withing a few minutes. Help?

Asked by for the 1996 Nissan Altima
have you scanned the engine for codes? sure sounds like
you may have a crank sensor beginning to fail. BUT....
diagnose first; then replace.
1 more answer
Replace the whole distributor because the seal is leaked and the oil getting inside the distributor causing the module disrupting spark timing.