String Compression | HackerRank





String Compression is technique where repeated characters will be shortened.  for ex:  aaaab represented as a a4b  repeated characters will be replaced with count. Used 2 loops to scan all characters inner loop  finds repeated characters count, and also replaces repeated values with null characters, finally character array will have {ch}{n}. This String Compression Program Written in Java and tested will all input.

Comments

Popular posts from this blog