Paper rejected due to short reference list
the editors reject it on the basis of size of the reference list rather than focussing on the quality of the manuscript.


I think that's a false distinction. From the view of the journal (and most publication outlets I know), one aspect of a manuscript's quality is that it needs to defend its novelty by appropriately considering related work.

The feedback does not mention the size of your reference list, but a lack of diversity, which indicates that your article is limited in the perspective of considered related work. For example, if your algorithm uses a new idea from X to solve a new problem Y and presents applications in Z, you should discuss papers about X, Y (or similar problems), and Z.