]N=:26 #.S=: _65+ a.i.'MAYBE'
5499966
$S
5
(65+(5#26)#: 5499966){a.
MAYBE
Linda
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Linda Alvord
Sent: Monday, October 21, 2013 4:32 AM
To: [email protected]
Subject: Re: [Jprogramming] converting excel column name to/from number
My "words" are without spaces and letters of the alphabet.
Linda
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Linda Alvord
Sent: Monday, October 21, 2013 4:12 AM
To: [email protected]
Subject: Re: [Jprogramming] converting excel column name to/from number
]N=:26 #.S=: _65+ a.i.'CRXO'
47256
$S
4
(65+(($S)#26)#: N){a.
CRXO
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Raul Miller
Sent: Monday, October 21, 2013 3:57 AM
To: Programming forum
Subject: Re: [Jprogramming] converting excel column name to/from number
Are you willing to limit yourself to a specific number of "excel digits"?
Thanks,
--
Raul
On Mon, Oct 21, 2013 at 3:35 AM, June Kim (김창준) <[email protected]> wrote:
> A different, but more procedural approach is:
>
> efn2=.'ABCDEFGHIJKLMNOPQRSTUVWXYZ'{~[:}.((<.@%&26 , 26&|) @ <:@{. ,
> }.)^:(0~: {.)^:_
>
> , and I don't like it much. :(
>
>
>
> On Mon, Oct 21, 2013 at 10:52 AM, June Kim (김창준) <[email protected]> wrote:
>
>> Hi
>>
>> A SW dev company posted its hiring post on its site and there is a coding
>> program for the applicants. You can choose any language you want.
>>
>> The problem is:
>>
>> Write a code that converts an order number to the excel column name. The
>> number starts from 1.
>>
>> e.g. 1->A, 2->B, 26->Z, 27->AA, ...
>>
>> Having no intention for applying, I thought this was a simple but
>> interesting and authentic problem. Here is my solution (I included the
>> inverse function as well for the fun):
>>
>> f=.26&#.
>> efn=.'ABCDEFGHIJKLMNOPQRSTUVWXYZ' {~ }.@(1&, -&.f 1 #~ #)@(f inv)
>> nfe=.[:f ' ABCDEFGHIJKLMNOPQRSTUVWXYZ'&i.
>>
>> efn 65535
>> CRXO
>> nfe 'CRXO'
>> 65535
>>
>> Could you come up with simpler and more elegant solution? I'd like to see
>> your solutions.
>>
>> June
>>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm