We don't bite newbies here... much | |
PerlMonks |
Re^11: [OT:] Is this Curriculum right?by Marshall (Canon) |
on Dec 13, 2021 at 02:04 UTC ( [id://11139581]=note: print w/replies, xml ) | Need Help?? |
Well the code does run.
Of course the first thing missing is short description of what the code does. The code does demo some basic understanding of linked lists. However there is some bizarre stuff... reverseList() is not at all necessary (unless that was part of the problem assignment). If that was part of the assignment, then I would expect that there would have been a requirement to print the reversed list.
The algorithm to delete all items less than the last one, traverses the list 3 times. Once to reverse the list to find the "last"; process list to delete items less than the "last"; reverse the list again. Update: If anybody out there wants to take on a significant C freeware project, I am interested in re-coding agrep, a approximate matching version of grep. The speed of this thing is stunning. The algorithms are excellent and generated 2 Phd's. Unfortunately, the authors weren't very good C coders and the software has issues. This thing will occasionally miss matches that it should have found. The last I heard from the maintainer, a complete re-write is in order.
In Section
Seekers of Perl Wisdom
|
|