Skip to content

Commit 9ba5c28

Browse files
authored
circular_linked_list: Add more len() tests
1 parent 3357768 commit 9ba5c28

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

data_structures/linked_list/circular_linked_list.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ def __len__(self) -> int:
3737
>>> cll.append(1)
3838
>>> len(cll)
3939
1
40+
>>> cll.preappend(0)
41+
>>> len(cll)
42+
2
43+
>>> cll.delete_front()
44+
>>> len(cll)
45+
1
46+
>>> cll.delete_rear()
47+
>>> len(cll)
48+
0
4049
"""
4150
return self.length
4251

0 commit comments

Comments
 (0)