Interview Experience at **MEDIA.NET** for **SDE INTERNSHIP **– Technical Questions and DSA Problem
I recently had the opportunity to interview for the **SDE INTERN** position at ****MEDIA.NET****. The interview process consisted of various rounds, including technical questions on topics such as polymorphism, acid properties in DBMS, SQL queries, and an interesting DSA problem.
**PERSONAL INTERVIEW **
**Polymorphism:**
The interview started with a question about polymorphism. I explained that polymorphism is a concept in object-oriented programming where a single function or method can have different implementations based on the context. I provided examples of method overriding and method overloading to illustrate the concept.
**Acid Properties in DBMS:**
The interviewer asked about ACID properties in the context of a database management system.
**SQL Queries:**
The next set of questions revolved around SQL queries. I was asked to write queries .
a) second largest element by subqueries
b) nth largest element by any method
**Binary Search vs. Binary Search Tree:**
I was asked to compare the time complexity of binary search in a sorted array (O(log n)) with that of binary search in a binary search tree (BST).so why we use BST
**DSA Problem:**
Given an array of size n and m queries, I was presented with the following problem: For each query, find a subarray with the minimum absolute difference between the sum of its elements and the given query value.
eg : arr : { 2,-1,2,3,5,-2}
m=1 queries :{ 4 }
output : starting index is 1 and ending index is 3
ans : { -1 , 2 , 3 }
sum=4
minimum difference=0