Sherlock and The Beast

  • + 1 comment

    Using String instead of StringBuffer results in timeout for most test cases.I found out why- "Simply stated, objects of type String are read only and immutable. The StringBuffer class is used to represent characters that can be modified. The significant performance difference between these two classes is that StringBuffer is faster than String when performing simple concatenations."