RNA secondary structures are important in many biological processes since there is a close relationship between structure and function in biology. There is a known bijection between the possible shapes of a single-stranded RNA molecule of fixed length and trees with n nodes and m leaves, $$\mathcal {T}(n, m)$$ . In this article, we present a sequential algorithm for generating such trees in A-order. The worst case time complexity of the presented algorithm is O(n). We also develop a parallel version of the algorithm which is both cost-optimal and adaptive. We use Exclusive Read Exclusive Write Shared Memory Single Instruction Multiple Data multi-processor architecture. Moreover, the generated trees are in A-order.