Company: Flipkart
Difficulty: medium
Make Equal Ahmed and Ali have two arrays, A and B each consisting of a permutation of numbers from 1 to N. They wish to play a game where the goal is to make their arrays similar. The arrays will be considered similar if they have the same length and all the elements at corresponding indices are equal. During each turn, a player can remove a single integer from their own array. Assuming both players play optimally, determine the minimum number of turns required to finish the game. Input Format The first line contains one integer N representing the size of the array. The second and third lines each will contain N space-separated integers indicating the numbers in permutations A and B, respectively. Code Template #include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <bits/stdc++.h> using namespace std; int main() { /* Enter your code here */ return 0; }