Initial portion of pseudocode for RNAborMEAalgorithm, which continues in Figure 11. Given RNA sequence s = s1, .. .,sn of length n, initial secondary structure S0 of s, RNAborMEA computes for all values of 0 ≤ k ≤ n that structure S with base pair distance k from S0, which maximizes the value . The pseudocode actually computes only values M(i, j, k) for all i, j, k; the MEA structures are obtained by backtracing. This algorithm clearly runs in O(n5) time with O(n3) space.
Clote et al. BMC Bioinformatics 2012 13(Suppl 5):S6 doi:10.1186/1471-2105-13-S5-S6