Skip to content

CSCI157/Activity-7---LinkedLists

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

LinkedLists

For the following use the code for linked lists provided in linkedlist.py.

  1. Implement a getter and a setter for the data in the node class. Make sure to use the property decorator from the why video (the code is in whypart2.py in that video).
  2. Create a stack class, which inherits the linked list class and adds a pop method.
    Use the SS class in social.py to create 7 valid social security numbers and push them to the stack. Print the stack. Pop each SS# from the stack, print the entire stack with each pop.
  3. Create a queue class which inherits the linked list class and adds a pop method.
    Use my social security class code from the regexes activity to create 7 valid social security numbers and push them to the queue. Print the queue. Pop each SS# from the queue, print the entire queue with each pop.
  4. Create a method delete for the linked list class that removes an element with a certain value.
    def delete(self, x): Use my social security class code from the regexes activity to create 7 valid social security numbers and push them to the list. Make the middle number "324-12-3333". Print the list and then use your delete function to remove it, print the list again.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages