N stack implementation with one backing array added