question 4 bruteforce

Done brute force matching method in q4