[Jprogramming] Determining an 'alternating' binary array

Brian Schott schott.brian at gmail.com
Fri Jul 27 14:39:33 UTC 2012


Another approach?

alternates =: [: -. 1 e. [: +/ 0 1 |."0 1 ] #"_ 1~ +./
noAnds =: *./@(-.@(*./))
check =: noAnds *. alternates




-- 
(B=)


More information about the Programming mailing list