UKG
10+ Magic Infomedia Interview Questions and Answers
Q1. Given three jugs with different capacities and no measuring tools, how can you measure out a specific amount of water using the jugs you have?
Use the jugs to measure out a specific amount of water by filling and pouring between the jugs.
Fill the largest jug and pour into the other jugs to measure out specific amounts.
Use the jugs to transfer water back and forth until you have the desired amount in one of the jugs.
Repeat the process of filling and pouring until you have the correct amount of water in one of the jugs.
Q2. What is the angle between the minute and hour hand of a clock at 3:45?
The angle between the minute and hour hand of a clock at 3:45 is 157.5 degrees.
Calculate the angle formed by the hour hand from 12 o'clock position to 3:45 position (135 degrees)
Calculate the angle formed by the minute hand from 12 o'clock position to 3:45 position (22.5 degrees)
Subtract the smaller angle from the larger angle to get the angle between the two hands (157.5 degrees)
Q3. What is indexing in Database Management Systems (DBMS)?
Indexing in DBMS is a technique used to improve the performance of queries by allowing faster retrieval of data.
Indexes are data structures that store a small portion of the data set in an easily searchable format.
They help in speeding up the data retrieval process by reducing the number of disk accesses needed.
Indexes can be created on one or more columns of a table to improve the performance of SELECT queries.
Examples of indexes include primary keys, unique keys, and compos...read more
Q4. Given an array, print k number of most repeating integers
Print k most repeating integers from an array
Create a hashmap to store the frequency of each integer in the array
Sort the hashmap based on frequency in descending order
Print the first k keys from the sorted hashmap
Q5. What is the lifecycle of a React component?
The lifecycle of a React component includes mounting, updating, and unmounting phases.
Mounting phase: constructor, render, componentDidMount
Updating phase: shouldComponentUpdate, render, componentDidUpdate
Unmounting phase: componentWillUnmount
Q6. What are pillars of Oops?
The pillars of Oops are Inheritance, Encapsulation, Polymorphism, and Abstraction.
Inheritance allows a class to inherit properties and behavior from another class.
Encapsulation restricts access to certain components within a class, protecting the data from outside interference.
Polymorphism allows objects to be treated as instances of their parent class, enabling flexibility in code.
Abstraction hides the complex implementation details of a class, allowing users to interact wit...read more
Q7. How you delete entry in mongodb database
To delete an entry in MongoDB database, you can use the deleteOne() or deleteMany() methods.
Use deleteOne() method to delete a single document based on a specific condition
Use deleteMany() method to delete multiple documents based on a specific condition
Make sure to specify the filter criteria to accurately delete the desired entry
Q8. reverse the individual strings from big string with spaces
Reverse individual strings in a big string with spaces
Split the big string into an array of strings using spaces as delimiter
Reverse each individual string in the array
Join the reversed strings back together with spaces in between
Q9. find duplicate from array
Find duplicates in an array of strings
Iterate through the array and store each element in a hash set
If an element is already in the hash set, it is a duplicate
Return a list of all duplicates found
Q10. Core concept of cs
Core concept of computer science is the study of algorithms and data structures.
Algorithms are step-by-step procedures for solving problems.
Data structures are ways to organize and store data efficiently.
Examples include sorting algorithms like bubble sort and data structures like arrays and linked lists.
Interview Process at Magic Infomedia
Top Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month