Is there any alternative and efficient way to compare beetween two 2d strings wihout using 2 loops?

Viewed 18

In a problem, I need to know which string elements are same among two 2d strings and I have implemented it by using two loops. As the string length is high, I eventually got a time limit exit as a verdict. Now how can I compare these 2 2d strings in less time?

0 Answers
Related