In this video we will see how to find if two given arrays of equal length are equal or not. Two arrays are said to be equal if both of them contain the same set of elements, arrangements (or permutation) of elements may be different though.
Example:
Input :
arr1[] = {1, 2, 5, 4, 0};
arr2[] = {2, 4, 5, 0, 1};
Output :
Yes
Input :
arr1[] = {1, 7, 1};
arr2[] = {7, 7, 1};
Output : No
Check out the video to see how we implement this!!
Next video: https://www.geeksforgeeks.org/videos/kadanes-algorithm-9uocaa/
Practice Problem: https://practice.geeksforgeeks.org/problems/check-if-two-arrays-are-equal-or-not3847/1
Article: https://www.geeksforgeeks.org/check-if-two-arrays-are-equal-or-not/
SDE Sheet: https://www.geeksforgeeks.org/sde-sheet-a-complete-guide-for-sde-preparation/