1. A method to retrieve data from memory, the method comprising: iteratively applying a series of partial program pulses to each memory cell of a plurality of memory cells; after the application of the series of partial program pulses, reading each memory cell of the plurality of memory cells; determining, based on the reading, a sequence in which each memory cell of the plurality of memory cells switches from a first value to a second value, wherein the first value and the second value correspond to two of discrete charge levels of the memory cells; determining, based on the sequence, a rank vector; and retrieving data written in the plurality of memory cells by processing the rank vector.