MLE: Google Preliminary

Anonymous User
915
Apr 28, 2025
Apr 28, 2025

Questions was we have n elements with 3 properties each we need to group the elements. If any one of the property is common those two element should be in same group.

e.g.:

elements = {
            "e1": ['red',   'circle',    'small'],
            "e2": ['blue',  'square',    'small'],
            "e3": ['green', 'triangle',  'large'],
            "e4": ['black',   'triangle',  'large'],            
            }
Output: [["e1", "e2"], ["e3", "e4"]]
Comments (8)