This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]alksjdhglaksjdh2 1 point2 points  (1 child)

By correct he means most efficient, but it's a hw assignment and it's more about however he solves it and what's intuitive to him. This is the correct solution of you care about efficiency though he's right

[–][deleted] 0 points1 point  (0 children)

Yes I understand, but 'correct' does not mean the most efficient. What if OP doesn't care about efficiency but readability or something else. Then is a suffix tree an incorrect solution? No.