This tutorial will go over how to display linked lists from AlgoExpert in VS Code
During my job search, I’ve been studying data structures and algorithms, as they are not covered in bootcamps. There are many resources to learn DS&A, from courses to books, to videos. I decided to purchased AlgoExpert because of my learning style and their video explanations. Although their platform has everything you need to solve the problems, I like practicing on VS Code, as that’s the IDE I use. I was able to practice this way until I got to linked lists.The Problem
I was given a problem in which I had to manipulate the linked list above, provided as the input. Like other problems, I copied the layout into VS Code. However, the way the linked list data was structure as so:
- Each node has a value and points to the next node in a nested object versus an array of objects as above.
Once I had the correct format I figured everything would work properly. That was not the case. Apparently, VS Code has a limit on how much information it shows in the terminal. If you were to console.log the input you’d get the following: