This uses an inherent assumption that the way our brain stores memory is Serial, similar to a directed graph or tree structure. To create a computer program that performs Sternberg's retrieval task in a way similar to the brain, we would first have to have a good understanding of how the brain stores information. It could be more similar to a heap, or a linked-list depending on the information we are storing and depending on the person.
How I think about the way I am storing numbers then comparing a number to my stored digits, it is most similar to a set that I am looking for membership in. I do not compare each digit in my memory with the digit I am given to retrieve, I simply ask myself in no particular order, "Is this item in my set?"