rit-csc / csc_exam_reviews

A collection of practice exams for exams in core curriculum CS courses at RIT.
http://csc.cs.rit.edu/resources
13 stars 1 forks source link

cs141 string compression base case issue #26

Open chrissprague opened 8 years ago

chrissprague commented 8 years ago

our solution to the string compression problem doesn't account for the empty string. It should have some kind of check such as

def compress(string):
    if string == "":
        return string