Repository navigation
London| 26 March SDC | Jamal Laqdiem| Sprint 2 | Improve code with precomputing - #217
jamallaqdiem wants to merge 1 commit into
Conversation
cjyuan
left a comment
There was a problem hiding this comment.
Code is correct.
Can you use complexity to explain how the new implementation is better than the original implementation?
|
@cjyuan thanks for reviewing my PR. Original: Used nested loops to compare every string combination. Time complexity was O(N^2 * M) (where N is the number of strings and M is string length).. count_letters: |
|
Your PR didn't include a Task ID in its description. Make sure you have put the correct Task ID in its description. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
|
All good. Note:
"extra work" is ambiguous. Would be more precise to show complexity in big O notation. Please note that starting September, the validation bot will remove the "Needs review" label from a PR if the PR description does not include a proper Task Code. You could find the task code of an exercise in the corresponding backlog/issue of the task. |
|
Your PR didn't include a Task ID in its description. Make sure you have put the correct Task ID in its description. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
1 similar comment
|
Your PR didn't include a Task ID in its description. Make sure you have put the correct Task ID in its description. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
Self checklist
Changelist
In these two exercises I optimised performance for the common_prefix and count_letters tasks by applying pre-computing strategies.