Skip to content
This repository was archived by the owner on May 13, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Q2/Question 2 solution.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#first we need to find the size for that we are introducing a function
def len_link(list):
temp=list.head
count=0
while(temp):
count+=1
temp=temp.next
return count
# then from that size value we will use for calculating head
size = len .link(optional)
temp= size-n
# using for loop
for i in range (0,size):
if i == temp:
optional .remove(i)
return optional.head

8 changes: 0 additions & 8 deletions Q2/solution.py

This file was deleted.