Implementation using array instead chars.