I tried this WORDCNT2 problem earlier but unable to get Accepted.
Again I am trying but not getting an efficient algorithm, can some one suggest me any efficient algorithm.Thanks