I have two matrices. example { 2 3
4 5} and {1 2 3
6 4 5}. These matrices are just a sample and actual can be different from these. So, we need to find if 1st matrix is subset of 2nd matrix.
Please let me know how can we do this with minimum time/space complexity.
Raj Kumar Bindal wrote:These matrices are just a sample and actual can be different from these. So, we need to find if 1st matrix is subset of 2nd matrix.
When you say "matrix", do you mean an array or a genuine matrix? If the first, then it's a simple 'string-style' search (either brute-force or an optimized one). If it's a genuine matrix, then you may have more than one dimension to consider.
Winston
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here