It's quite uncommon to refer to a 3 year old car as "car of this age." It's nearly new. Sorry to hear that the battery is exhibiting memory effects. I used many laptops, and not even one battery in them survived for more than 2-3 years. This made me deeply suspicious of Li-Ion batteries; they are great as a power source, but they don't last.
The longevity of the battery is mostly dependent upon how it is used. If you constantly run it down below 30% to 40% it will break down sooner. It should also be charged as slowly as possible. A difficult thing to accomplish with a car battery that is used daily for a commute of more than 10 or 20 miles each way.
The Li-Ion battery should last 6-8 years (current models).
Minor note for anyone buying a 2013 or earlier Leaf:
The Leaf runs the power train off the main battery, but all accessories off a regular car battery. The 2013 and earlier models did NOT connect them; there is an ongoing power drain (think “sleep mode” like computers) that can deplete the 12v battery if the car is unused/uncharged for 2 weeks; when that’s dead, just getting into the car becomes a problem, as does opening the charge port cover.
The 2014 model is smart enough to monitor the drain, and recharges the 12v battery from the main power train battery if need be.