the parts are not expensive, its the labor.
that code is a serious code. that code corresponds to fuel system, injectors, ECM, TCM, Crank and camshaft sensors, MAF, O2 sensor in the manifold. the fact they narrowed it down to those two things is a good sign though, as it could be much worse.
the code mainly means there is a voltage issue/short, causing the injectors to not spray fuel into the chamber properly under a given load. when you press on the accelerator, or go up a hill, naturally the engine has to work hards to perform in those instances, and a more stronger fuel pulse is needed to put more fuel into the chamber. if there is a continuity issue with a wire harness for example, that fuel may not get into the engine when the engine needs it, causing sputtering and bogging down of the engine.
as an aside, have you had the battery/alternator checked? if the battery is weak or the alternator, this can also cause an issue.
when you say "recently just purchased", how recent? did you purchase CPO or from a 3rd party/private party?
do you have the service records for the car? was the car qualified for the recall on the timing chain?
im sure the code has happened to some people before--its not just to nissan but to many others cars that have an electronic fuel delivery system.
if you are handy, you may be able to replace the parts yourself. The wiring harness, depending on which harness specifically, could be a nightmare because it may involve removing the dash and/or interior panels to access the full harness.
again its the labor--the parts are probably less than 1000 dollars USD.