()
| 237 | |
| 238 | // Method to get the LinkedList |
| 239 | get() { |
| 240 | const list = [] |
| 241 | let { currentNode } = this.initiateNodeAndIndex() |
| 242 | while (currentNode) { |
| 243 | list.push(currentNode.data) |
| 244 | currentNode = currentNode.next |
| 245 | } |
| 246 | return list |
| 247 | } |
| 248 | |
| 249 | // Method for Rotating a List to the right by k places |
| 250 | rotateListRight(k) { |
no test coverage detected