-
Notifications
You must be signed in to change notification settings - Fork 5
Selfie master #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: selfie-master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the advantage of recursion in this case? The recursion parameter (next) is, in fact, an iterator. I'm not saying recursion is wrong here... But what is the advantage of recursion instead of iteration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's just a little easier to read and (thus) more "elegant" - but: of course you can iterate through the list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be careful with metrics like "easier to read". They are highly subjective and therefore hard to compare. The actual reason why recursion is more elegant here is the list itself. A linked list is a recursive data type. Nice solution!
selfie.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usually, the number of concurrent processes is not a constant. consider changing that when it comes to forking
|
did you do a pull request for assignment02. cannot find any |
|
not yet, is delayed. i'm sorry. |
this is armin langhofer's impl of a linked list (assignment 0)