Talk:Longest string challenge: Difference between revisions
m
→Use only integers and strings
Line 97:
::::::: But, ok, you probably do not know enough J to read that sentence, so here's a description: Using the end of line marker, form the characters into a two dimensional array (padding short lines with spaces). This is the left argument to the inner expression. The right argument is formed using the same technique, except that we reverse each line in the process of forming them into an array and then reverse each row again after it has been padded. The inner set of parenthesis contains an expression which will keep the rows which are identical in both copies.
::::::: That said, it's probably also worth noting that most J programming involves "thinking outside the box" if "the box" means "traditional approaches used in traditional languages".
::::::: Also, for reference, here is a "use length directly" approach: <code>(#~ (=>./)@:(#@>))@(<;._2)@(1!:1)</code>
::::::: --[[User:Rdm|Rdm]] 01:08, 15 August 2011 (UTC)
|