[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Matrix Rotator (#209

Sanjay Sharma

6/14/2009 5:35:00 PM

Daniel X Moore wrote:
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> ## Matrix Rotator (#209)
>
> Ð?дÑ?авсÑ?вÑ?йÑ?е Rubyists,
>
> This week's quiz is write ruby method that will rotate a matrix 90
> degrees counter-clockwise (or Ï?/2 radians).
>
> Ex:
> 0 0 0 0
> 0 X 0 0
> X X X 0
> 0 0 0 0
>
> 0 0 0 0
> 0 0 X 0
> 0 X X 0
> 0 0 X 0
>
>
> --
> -Daniel
> http://rubyquiz...
>
> P. S. This may come in handy on a future quiz.

Here's my solution; not too savvy but I guess kinda OK given that I've
recently started with Ruby. :-)

http://pastie....
--
Posted via http://www.ruby-....

3 Answers

Lee Hinman

6/14/2009 9:47:00 PM

0

>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>> ## Matrix Rotator (#209)
>>
>> ???????????? Rubyists,
>>
>> This week's quiz is write ruby method that will rotate a matrix 90
>> degrees counter-clockwise (or p/2 radians).
>>
>> Ex:
>> 0 0 0 0
>> 0 X 0 0
>> X X X 0
>> 0 0 0 0
>>
>> 0 0 0 0
>> 0 0 X 0
>> 0 X X 0
>> 0 0 X 0
>>
>>
>> --
>> -Daniel
>> http://rubyquiz...
>>
>> P. S. This may come in handy on a future quiz.

Here's my (different) solution, rather manual this way.
http://pastie....

- Lee

james.pablos

11/24/2011 3:10:00 AM

0

On Nov 23, 7:45 pm, "dr.narcolepsy" <jmi...@gmail.com> wrote:

> anyway -
> mac & cheese - still the kid's favorite
> rotisserie chicken - goes into the first thing I make on Thanksgiving eve - Southwestern Chicken & Corn Soup
> Cliff bars - we're going backpacking with friends & kids on Saturday

Don't forget the Manwich . Nothing says "I don't have time to cook for
you kids" like Manwich.



gratefuljoe

11/24/2011 3:36:00 AM

0

For those who click on blind links:

http://tinyurl....