If we have n symble then we need to store each Symble in Array so
Space complexity = O(n)
I have given the link of University of Texas where it is mentioned that :-
We often speak of "extra" memory needed, not counting the memory needed to store the input itself.
So, we should not have to consider the input size to find the space complexity of an algorithm.
@Akash ,it should be O(n) which you have already mentioned because we have to store frequencies of characters from the input file seperately in the array.