Are there any O(n) algorithms to check if a 2d array is symmetric?
fashxfreak
3
Newbie Poster
Recommended Answers
Jump to PostNo. The best algorithm is to check that all off-diagonal terms are equal (within a tolerance). And, there are (N^2 - N) / 2 checks to be done, which is of order O(n^2).
All 3 Replies
mike_2000_17
2,669
21st Century Viking
Team Colleague
Featured Poster
NathanOliver
429
Veteran Poster
Featured Poster
m4ster_r0shi
142
Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.