Rediet8abere / CS-1.3-Core-Data-Structures

MIT License
0 stars 0 forks source link

Submission 2: Palindrome and String Algorithms #2

Open Sukhrobjon opened 4 years ago

Sukhrobjon commented 4 years ago
  1. Palindrome: It looks good, you could improve the code by making a helper function called clean_text() or something and clean the text: remove special chars, space, and lowercase the letters. Right now you are using too much unnecessary if clauses in your code. yes, it works but you make your code a lot simpler and easy to follow.
  2. String Algorithm: Great work, you reused your code and wrote DRY code. You annotated the runtime, but it not quite accurate. It is not just O(n) runtime as you are dealing with two different length strings.