With simple stack without memcpy function
Without memcpy function simple stack