Find a set of common elements from a multi-dimensional array recursively
        Posted  
        
            by shreyas
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by shreyas
        
        
        
        Published on 2010-04-06T12:45:13Z
        Indexed on 
            2010/04/06
            17:53 UTC
        
        
        Read the original article
        Hit count: 250
        
I have a multi-dimensional array:
a=[[2,3,4],[1,3,4],[1,2],[1,2,3,4]]
i've to compare all the 4 sub-arrays and get common elements.Next,take 3 subarrays at a time and get common elements.then take 2 sub arrays at a time and get common elements, in RUBY.
© Stack Overflow or respective owner