1. A method of decoding comprising: converting a data flow graph relating to a predetermined polar code to a tree graph comprising rate-zero nodes, rate-1 nodes, and rate-R nodes, each of the nodes linked to a root of the tree graph, the tree graph stored in a dual-port random-access memory (RAM); replacing at least one rate-R node, associated with a sub-tree of the tree graph, with a single maximum likelihood node when predetermined conditions are met, by storing the single maximum likelihood node in the dual-port RAM; and decoding the tree graph by sequentially visiting each of the nodes at the root.