You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Ariane! I've graded your linked list submission and have some feedback for you:
good job passing all of the unit tests
a few issues with your time complexity analysis: your append() method actually runs in O(1) since you have a reference to the tail and are not looping through anything, and your delete() method has a best case of O(n) since you don't have any nested loops and if statements take constant time
it would be good practice to use elif statements in your delete() method when you have exclusive conditions. Your return statements avoid any errors, but keep in mind that an if statement written right after another if statement will always run, which can cause problems if the condition you're testing changes
The text was updated successfully, but these errors were encountered:
Hi Ariane! I've graded your linked list submission and have some feedback for you:
append()
method actually runs inO(1)
since you have a reference to the tail and are not looping through anything, and yourdelete()
method has a best case ofO(n)
since you don't have any nested loops andif
statements take constant timeelif
statements in yourdelete()
method when you have exclusive conditions. Yourreturn
statements avoid any errors, but keep in mind that anif
statement written right after anotherif
statement will always run, which can cause problems if the condition you're testing changesThe text was updated successfully, but these errors were encountered: