The first comment is correct. Smartphone battery last longer when it is kept within around 20 or 30% - 80%.
Smartphone batteries these days, are lithium batteries which should be recharged frequently to prevent deep discharges, which can significantly decrease the overall cycle life of the battery.
Some conservative ones even have frequent charging between 40% and 60%, battery capacity may be kept around 90% after 1 or 2 years.
Anyone who argues that frequent charging of smartphones are bad these days, they are probably misinformed.
Deep discharges (below 20% or flat) and full charge are the common factors to wear down the battery lifespan at faster rate.
Other possible factors are heat and fast charging, leading to premature degradation.
Contrary to the older practices when phones are using nickel based batteries, where they fully discharge it and charge it fully, smartphone batteries last longer when battery charge is kept above 20/30% and below 80%.
The only good time to do a full discharge/charge occasionally is to calibrate the battery readings, probably once a month.