January 10, 2025 |2.2K Views

    Print unique rows in a given boolean matrix

      Share   Like
    Description
    Discussion

    Given a binary matrix, print all unique rows of the given matrix.

    Example:

    Input:
           {0, 1, 0, 0, 1}
           {1, 0, 1, 1, 0}
           {0, 1, 0, 0, 1}
           {1, 1, 1, 0, 0}
    Output:
       0 1 0 0 1 
       1 0 1 1 0 
       1 1 1 0 0

    Print unique rows in a given boolean matrix: https://www.geeksforgeeks.org/print-unique-rows/