Skip to content

Commit

Permalink
Merge pull request #17 from kartiksharmakk/patch-1
Browse files Browse the repository at this point in the history
Smaller Approach
  • Loading branch information
omkar98 authored Sep 16, 2023
2 parents 5c2c44e + c26fdda commit aecf363
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions DSA in Python/Day-2/Assignment 6.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,8 @@ class Performance:
self.__children_list.delete(child)
self.__children_list.insert(child,temp1.get_data())
def add_new_child(self,child):
temp = self.__children_list.get_head()
while(temp.get_next()):
temp=temp.get_next()
self.__children_list.insert(child,temp.get_data())
self.__children_list.add(child)

#Implement Performance class here
child1=Child("Rahul","solo song")
child2=Child("Sheema","Dance")
Expand All @@ -160,4 +158,4 @@ print()
child6=Child("Swetha","Vote of Thanks")
print("After Swetha has joined, the schedule is:")
performance.add_new_child(child6)
performance.get_children_list().display()
performance.get_children_list().display()

0 comments on commit aecf363

Please sign in to comment.