Singly-linked list/Reversal: Difference between revisions

Content added Content deleted
(J)
Line 48: Line 48:


=={{header|J}}==
=={{header|J}}==
Linked lists in J tend to be tremendously inefficient, and of limited utility. (And, generally speaking, their cache footprint tends to conflict with any theoretical algorithmic gains on other machines in other languages also, but J is worse here.)
Linked lists in J tend to be tremendously inefficient, and of limited utility. (And, generally speaking, their cache footprint tends to conflict with any theoretical algorithmic gains on modern machines in other languages also, but J is worse here.)


But let's ignore those problems and implement a routine to build us a linked list and then a routine to reverse it:
But let's ignore those problems and implement a routine to build us a linked list and then a routine to reverse it: