Nextdoor interview question

Create a linked list class and add a reverse method.