Commit 0fa4349
authored
Rollup merge of rust-lang#89210 - Takashiidobe:master, r=kennytm
Add missing time complexities to linked_list.rs
Most functions in LinkedList have time complexities in their description:
Like push front:
```
Adds an element first in the list.
This operation should compute in O(1) time.
```
Time complexities were missing for the following, so I've added them in this PR:
contains: O(n)
front: O(1)
front_mut: O(1)
back: O(1)
back_mut: O(1)1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
631 | 631 | | |
632 | 632 | | |
633 | 633 | | |
| 634 | + | |
| 635 | + | |
634 | 636 | | |
635 | 637 | | |
636 | 638 | | |
| |||
656 | 658 | | |
657 | 659 | | |
658 | 660 | | |
| 661 | + | |
| 662 | + | |
659 | 663 | | |
660 | 664 | | |
661 | 665 | | |
| |||
676 | 680 | | |
677 | 681 | | |
678 | 682 | | |
| 683 | + | |
| 684 | + | |
679 | 685 | | |
680 | 686 | | |
681 | 687 | | |
| |||
702 | 708 | | |
703 | 709 | | |
704 | 710 | | |
| 711 | + | |
| 712 | + | |
705 | 713 | | |
706 | 714 | | |
707 | 715 | | |
| |||
722 | 730 | | |
723 | 731 | | |
724 | 732 | | |
| 733 | + | |
| 734 | + | |
725 | 735 | | |
726 | 736 | | |
727 | 737 | | |
| |||
0 commit comments