Almost every bank posts in order from largest transaction to smallest, so if you have 42.39 coming out, a 50 dollar cash deposit should, in theory, post first.
Banks post deposits and transfers in first so the money would be added before the deductions come out.