A Number Stack
2015.10.23So I wrote a Stack Class in the process of working on a new coding challenge yesterday. The Stack was explained as an abstract data structure that is Last-In-First-Out. I needed to have a functional stack to complete my assignment and at some point I went off on a tangent to code a Number Stack.
This is somewhat my ode to the IP Stack, in that it encodes data and bit lengths to represent items on the Stack.
There is a functional limit to the integers that can be pushed to the stack of 1152921504606846975.
That is “fffffffffffffff” in Hexadecimal.
I could increase the functional limit by changing the base I convert to to push the data onto the stack, but I didn’t need a gianormous limit and I’m used to working with Hex so I kept it simple.
~AMP