remove comma from string in O(N)