I must misunderstand the instructions since I get same wrong answer in
every language I try.
Strategy: create a list of rooted path to all files. Make a set of the
directories-part, producing a unique list of all directories. For each
of these, add the file sizes for all files with matching leading path.
Sum the directory totals for those with less than or equal to one
hundred thousand. This strategy solves the example.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm