diff options
author | Zhongheng Liu <z.liu@outlook.com.gr> | 2024-11-25 20:38:03 +0200 |
---|---|---|
committer | Zhongheng Liu <z.liu@outlook.com.gr> | 2024-11-25 20:38:03 +0200 |
commit | 4531afb7137e85dbdc45ec9147612a101568a507 (patch) | |
tree | 473fcf5b2e0ab7b1852ca7749b91231d797e2e73 /linked_list/linked_list.py | |
parent | 5df83b0e15a757b4803b66b9af6a7e5afcd1667e (diff) | |
download | cs-y13-4531afb7137e85dbdc45ec9147612a101568a507.tar.gz cs-y13-4531afb7137e85dbdc45ec9147612a101568a507.tar.bz2 cs-y13-4531afb7137e85dbdc45ec9147612a101568a507.zip |
chore: move and rename
Diffstat (limited to 'linked_list/linked_list.py')
-rw-r--r-- | linked_list/linked_list.py | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/linked_list/linked_list.py b/linked_list/linked_list.py index f109777..4c07536 100644 --- a/linked_list/linked_list.py +++ b/linked_list/linked_list.py @@ -33,30 +33,4 @@ names = [ for name in names: new_list.insert(name) new_list.visualise() -"""names = [] -ptrs = [] -l = 10 -for i in range(10): - names.append(None) - ptrs.append(i+1) -ptrs[9] = -1 -sp = -1 -fp = 0 -print(names) -print(ptrs) -def insert_one(name): - global sp - global fp - global ptrs - global names - if fp == -1: - print("Not free") - return - names[fp] = name - ptrs[fp] = sp - sp = fp - fp = ptrs[fp] - print(names) - print(ptrs) -insert_one("Steven") -insert_one("Steven2")""" + |