Skip to content

Commit

Permalink
Revert "added linkedlist abstract method (codezonediitj#223)"
Browse files Browse the repository at this point in the history
This reverts commit 6a9f06e.
  • Loading branch information
Vanshika266 committed Apr 7, 2020
1 parent 71beaec commit a06052f
Showing 1 changed file with 0 additions and 60 deletions.
60 changes: 0 additions & 60 deletions pydatastructs/linear_data_structures/linked_lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,66 +43,6 @@ def __str__(self):
break
return str(elements)

def insert_after(self, prev_node, key, data=None):
"""
Inserts a new node after the prev_node.
Parameters
==========
prev_node: LinkedListNode
The node after which the
new node is to be inserted.
data
Any valid data to be stored in the node.
"""
raise NotImplementedError('This is an abstract method')

def insert_at(self, index, key, data=None):
"""
Inserts a new node at the input index.
Parameters
==========
index: int
An integer satisfying python indexing properties.
data
Any valid data to be stored in the node.
"""
raise NotImplementedError('This is an abstract method')

def extract(self, index):
"""
Extracts the node at the index of the list.
Parameters
==========
index: int
An integer satisfying python indexing properties.
Returns
=======
current_node: LinkedListNode
The node at index i.
"""
raise NotImplementedError('This is an abstract method')

def __getitem__(self, index):
"""
Returns
=======
current_node: LinkedListNode
The node at given index.
"""
raise NotImplementedError('This is an abstract method')


class DoublyLinkedList(LinkedList):
"""
Represents Doubly Linked List
Expand Down

0 comments on commit a06052f

Please sign in to comment.