The invention provides compositions and methods for ligating single stranded nucleic acids wherein the ligation is based on fast, efficient, and low-sequence bias hybridization of an acceptor molecule with a donor molecule. In one embodiment, the structure of the donor molecule comprises a stem-loop intramolecular nucleotide base pairing (i.e., hairpin) and a 3 '-overhang region such that the overhang is able to hybridize to nucleotides present in the 3' end of the acceptor molecule.