Doubly linked list
Task
Your task is to implement doubly linked list data structure.
Methods
append(data)
Should add node to the end of the list
head()
Should return data from the head of the list
tail()
Should return data from the end of the list
at(index)
Should return data of node by specified index
insertAt(index)
Should insert data to specified index
isEmpty()
Should return true if list is empty, false otherwise
clear()
Should clear the list
deleteAt(index)
Should delete element by specified index
reverse()
Should reverse the list
indexOf(value)
Should return index of specified value or -1 if list doesn't contain such
Prerequisites
- Install Node.js
- Fork this repository: https://github.com/rolling-scopes-school/doubly-linked-list/
- Clone your newly created repo: https://github.com/<%your_github_username%>/doubly-linked-list/
- Go to folder
doubly-linked-list
- To install all dependencies use
npm install
- Run
npm test
in command line or you can run tests in browser withnpm start
and open http://localhost:8080 - You will see the number of passing and failing tests. 100% of passing tests is equal to 100p in score
rs app
Submit to- Open rs app and login
- Go to submit task page
- Select your task (doubly-linked-list)
- Press the submit button and enjoy
Notes
- We recommend you to use nodejs of version 10 or lower. If you using any of features that does not supported by node v10, score won't be submitted.
- Please be sure that each of your test in limit of 30sec.
© Shastel