This is a verified interview question from Media-net. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Problem 1: Magic Number Array Media Net - LNM Institute of Information Technology, Jaipur" covers key patterns like Other.
"**Mode:** On-Campus **Exam Pattern:** 3 coding **OA Date:** 2026-10-19 ## Problem 1: Magic Number Array Problem Description Given a permutation of size N in integer array A. For each number, find if the value of its magic number is ≥ 0 or negative. The value of a magic number is defined as: (count of smaller numbers to the left × count of smaller numbers to the right) − (count of larger numbers to the left × count of larger numbers to the right). Return an integer array where ans[i] is 1 if the magic number is ≥ 0 or −1 if it is negative. Problem Constraints 1 ≤ N ≤ 105"
Join thousands of developers practicing for Media-net.