As Navies it can be done in O(n^2) Make numbers by using every elements in the row in array row[]. Similarly convert column elements into numbers and put them in array col[]. Now compare both the arrays where the number matches print the index of both row[] and col[] array...
eg:- 2, 3, 4 3, 4, 5 6, 5, 1 col[] contains 236, 345, and 451 and row[] contains 234, 345, and 651. On Comparison both has 345 as common total with index (1,1) and is the desired answer. use 2d matrix..makes it easy Time Complexity is at Most O(n^2) Thanks & Regards Shashank Mani " Best Way to Escape From the Problem is to Solve It" -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.