If I need to make nodes for a linked list do i have to instantiate the variables at run time or can I write something that will make however many nodes I need based on some input. How would I even do the latter?
Basically, can I declare new nodes without imputing them manually after runtime but based on a set of elements n?
You can always statically allocate data structures. But if you knew the maximum number of nodes that you need, why wouldn't you use an array?
Colton Davis
I don't know the number of elements, I need to take an input of n elements and create enough nodes to store those numbers, but as far as I know, I have to create the nodes in the source code and can't use a loop to make new ones, is that even possible.
since you don't know the number of elements a priori, you can't allocate the nodes statically.
what is the problem you are trying to solve? provide a formal description
Jordan Thompson
>or can I write something that will make however many nodes I need based on some input. how is that not at run time?
Levi Hall
adding polynomials (x^2 + 2x +1), each term is in a separate node, each polynomial is a separate linked list. I have to add them and create a new linked list with the resulting terms stored in new nodes.
Caleb Roberts
I have to create new objects for the nodes, I don't know how to do that iteratively. The input can also be arbitrarily long so I can't just hard code 20 nodes and call it a day.
So you need to parse the string (x^2 + 2x +1) and create a linked list of the tokens? You can pass them from stdin or from a file, but you'll need to loop through the characters in order to parse them, so don't be a nigger and use a loop. If you have to "create" them in source code then they are static or they are a string embedded in your code you need to parse, so you still need a loop. Use the loop, Luke.
i wanna impregnate that meat fall asleep and never wake up agane
Jeremiah Collins
das feral af
Camden Hernandez
you can create objects on the fly while the programming is running, yes. how you do that is dependent on the programming language you're using and the details about the specific object you want to create.
i feel like you're mixing up your vocabulary though
I just want to suffocate myself between her thighs.
Is that really too much to ask from life?
Gabriel Ortiz
still waiting for sauce
Ian Thomas
>imagine being so retarded you cannot use google reverse image search
Isaiah Bailey
>google
Liam Scott
>expecting people who can't even google to know anything else
Parker Gray
Plastic surgery. This is an artificial person.
Angel Williams
Although she's plastic, her arms are appropriate girth. You're too used to slim white girls with fat arms. We whites are disproportionate in that regard.
Her arms are okay-ish. Her legs though, too thin, and I like skinny girls. She's the one who's disproportionate, big boobs but skinny arms and legs.
Sebastian Lee
feet
Robert Gonzalez
>Basically, can I declare new nodes without imputing them manually after runtime but based on a set of elements n? dynamic memory allocation in a loop with 'n' as the loop counter