#trying leetcode, what is a node?
11 messages · Page 1 of 1 (latest)
A node in a linked list can be thought of as a container that holds a value and a pointer to the next node
struct Node {
int val;
struct Node* next;
}
Something like this
is there any way I can replace nodes with arrays? it seems more complicated to use them but idk if it'd still work
No, cause then it's not a linked list
I do not recommend doing leetcode without some foundational understanding of data structures and algorithms
thanks. some of the projects seemed fun but the two I looked at both need stdlib and use linked lists. I'll have to learn more before I mess around on there
You're much better off learning with projects then moving to leetcode when you get more advanced
Peep my opinion on projects vs leetcode for learning purposes