-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interface Implementation for Doubly Linked List #48
Comments
Hey @ashikka could you please assign this to me? |
Does this work @ashikka ? package main
class DoublyLinkedList<E> {
//Return element at the head of the Doubly Linked List
fun head(): E{
TODO()
}
//Return element at the tail of the Doubly Linked List
fun tail(): E{
TODO()
}
//Insert element at the beginning of the Doubly Linked List
fun insertAtBeginning(element:E){
TODO()
}
//Insert element at the end of the Doubly Linked List
fun insertAtEnd(element:E){
TODO()
}
//Insert element at specified index of the Doubly Linked List
fun insertAtIndex(index:Integer){
TODO()
}
//Return element at specified index of the Doubly Linked List
fun get(index:Integer): E{
TODO()
}
//Delete the node at specified index of the Doubly Linked List
fun deleteNode(index:Integer){
TODO()
}
//Delete the node at the head of the Doubly Linked List
fun deleteFirst(){
TODO()
}
//Delete the node at the tail of the Doubly Linked List
fun deleteLast(){
TODO()
}
} |
Looks good to me @bhaveesarna! Could you request a review from @dgraciac also? |
@dgraciac could you please review the interface proposal? |
@bhaveesarna I would remove
because it is a bit more complex than other operations. We can include this operation in future issues. Other operations are fine IMO. Go ahead. |
Good work @bhaveesarna 🚀! I"ll be closing this issue now. |
First step
Search, read, and understand information about doubly linked lists and how they are implemented.
Second step
You have to share a code snippet in markdown with an interface proposal for this data structure. Below you can find an interface example of a hypothetical data structure:
Third step
After @code-sherpas/kollections-maintainers approve your interface proposal, open a pull request with the data structure implementation, and wait for comments.
Minimum acceptance criteria
The text was updated successfully, but these errors were encountered: