From: "zubair a." Date: 2012-12-09T00:26:01+09:00 Subject: Re: if n belongs to set a and m belongs to set b repeat some steps, How? zubair a. wrote in post #1088326: > pls find the attachment, this is a merge sort algo implementation where > you can see i have to check values of i and j in while loop assuming > they are dividing the array into two halves. > > actually i was trying to code something like: > > list=[1,2,3,4,5,6] > (0..2,3..5).each do |i,j| > do some task using i and j > end > but ruby is not accepting this code as legal, plz find the latest attachment, Attachments: http://www.ruby-forum.com/attachment/7942/MergeSort.rb -- Posted via http://www.ruby-forum.com/.