Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Selected Reading
Articles by Aditya Varma
Page 4 of 4
Check Horizontal and Vertical Symmetry in the Binary Matrix using Python
A binary matrix is a rectangular grid in which each element is either 0 or 1, indicating true or false states. It is widely employed to represent relationships, connectivity, and patterns across various disciplines. Assume we have taken a 2D binary input matrix containing N rows and M columns. We will now check whether the input matrix is horizontal or vertically symmetric or both using the below method. If the first row matches the last row, the second row matches the second last row, and so on, the matrix is said to be horizontally symmetric. If the ...
Read MoreAdvertisements