Add office photos
Engaged Employer

Nomura Research Institute Financial Technologies India

4.0
based on 72 Reviews
Filter interviews by

10+ MG Motor Interview Questions and Answers

Updated 31 Jul 2024

Q1. Design a class that can give maximum 3 instance of that class, from 4th call it will repeat those instances.

Ans.

Design a class that limits maximum 3 instances and repeats them from 4th call.

  • Create a private static array to hold instances.

  • Create a private static counter to keep track of instance count.

  • Create a public static method to get instance of the class.

  • In the method, check if counter is less than 3, create new instance and add to array, else return instance from array based on counter modulo 3.

  • Increment counter after each call.

Add your answer

Q2. Design simple model class for Shopping cart. Custom exception handling. Create a custom Immutable list.

Ans.

Design a model class for shopping cart with custom exception handling and custom immutable list.

  • Model class should have properties like cart items, total price, etc.

  • Custom exception handling should be implemented for scenarios like adding invalid items to cart.

  • Custom immutable list can be created using C# ReadOnlyCollection or ImmutableList.

  • Immutable list should be used to store cart items to prevent accidental modification.

Add your answer

Q3. How many people go to coffee shops in India?

Ans.

The number of people going to coffee shops in India varies depending on the location and time of day.

  • The number of people going to coffee shops in India can vary greatly depending on the city, neighborhood, and time of day.

  • Major cities like Mumbai, Delhi, Bangalore, and Chennai have a higher number of people visiting coffee shops compared to smaller towns.

  • Coffee shops near colleges and offices tend to have more footfall during weekdays.

  • Weekends and evenings are usually busier...read more

Add your answer

Q4. What are the new features of Java 8

Ans.

Java 8 introduced several new features including lambda expressions, streams, and default methods.

  • Lambda expressions enable functional programming and simplify code.

  • Streams provide a new way to process collections and perform operations in parallel.

  • Default methods allow interfaces to have method implementations.

  • Other features include the Optional class, Date and Time API, and Nashorn JavaScript engine.

Add your answer
Discover MG Motor interview dos and don'ts from real experiences

Q5. What is a singleton design pattern

Ans.

A singleton design pattern restricts the instantiation of a class to a single object.

  • Singleton pattern ensures that only one instance of a class is created.

  • It provides a global point of access to the instance.

  • Commonly used in scenarios where a single instance is required to control actions or resources.

  • Example: Database connection manager, logger, configuration manager.

Add your answer

Q6. What is an observer design pattern

Ans.

Observer design pattern is a behavioral design pattern that allows objects to subscribe and receive updates from a subject.

  • It is used to establish a one-to-many dependency between objects.

  • The subject maintains a list of observers and notifies them of any state changes.

  • Observers can be added or removed dynamically.

  • It promotes loose coupling between objects.

  • Example: A weather station broadcasts weather updates to multiple display devices.

Add your answer
Are these interview questions helpful?

Q7. Minimum difference element in sorted array.

Ans.

Find the element with minimum difference between adjacent elements in a sorted array.

  • Iterate through the array and calculate the difference between each pair of adjacent elements.

  • Keep track of the minimum difference found so far.

  • Return the element corresponding to the minimum difference.

Add your answer

Q8. Difference between linked list and array?

Ans.

Arrays store elements in contiguous memory locations, while linked lists store elements in nodes with pointers to the next node.

  • Arrays have fixed size, while linked lists can dynamically grow or shrink.

  • Accessing elements in arrays is faster (O(1)), while in linked lists it is slower (O(n)).

  • Inserting or deleting elements in arrays can be inefficient, while in linked lists it is efficient.

  • Example: Array - [1, 2, 3, 4], Linked List - 1 -> 2 -> 3 -> 4

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. Find the palindrome in the string?

Ans.

To find palindromes in a string, compare characters from both ends towards the middle.

  • Iterate through each string in the array

  • Check if the string is equal to its reverse to determine if it's a palindrome

  • Examples: 'level', 'radar', 'madam'

Add your answer

Q10. Normalization and sql query in dbms.

Ans.

Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity. SQL queries are used to retrieve and manipulate data in a database management system.

  • Normalization involves breaking down data into smaller, more manageable tables to reduce redundancy.

  • SQL queries are used to retrieve specific data from a database using SELECT, INSERT, UPDATE, and DELETE statements.

  • Normalization helps maintain data integrity by reducing the risk of i...read more

Add your answer

Q11. How many people watch football in India

Ans.

It is estimated that millions of people watch football in India, making it one of the most popular sports in the country.

  • Football is one of the most popular sports in India, with a huge fan following.

  • The Indian Super League (ISL) and the I-League are the two main football leagues in India.

  • The FIFA World Cup and UEFA Champions League are also widely watched in India.

  • Football matches featuring popular international teams like Barcelona, Real Madrid, and Manchester United attrac...read more

Add your answer

Q12. What is lambda and optional

Ans.

Lambda is an anonymous function in programming, while Optional is a container object that may or may not contain a non-null value.

  • Lambda is used to write concise and functional code by allowing the creation of small, reusable functions.

  • Optional is used to handle null values in a more explicit and safe way, reducing the chances of NullPointerExceptions.

  • Lambda expressions can be used with functional interfaces, allowing the implementation of methods directly in the expression.

  • O...read more

Add your answer

Q13. Palindrome check in string.

Ans.

Check if a string is a palindrome or not.

  • Iterate through the string from both ends and compare characters.

  • Ignore spaces and punctuation while checking for palindrome.

  • Examples: 'racecar' is a palindrome, 'hello' is not a palindrome.

Add your answer

Q14. what are 4 pillars of oops?

Ans.

The 4 pillars of OOP are Inheritance, Encapsulation, Abstraction, and Polymorphism.

  • Inheritance allows a class to inherit properties and behavior from another class.

  • Encapsulation restricts access to certain components of an object, protecting its integrity.

  • Abstraction hides complex implementation details and only shows the necessary features.

  • Polymorphism allows objects to be treated as instances of their parent class or their own class.

Add your answer

Q15. Test use cases how to do that for this

Ans.

Test use cases can be created by identifying different scenarios and inputs to validate the functionality of a system.

  • Identify different scenarios and inputs that the system should be able to handle

  • Create test cases based on these scenarios and inputs

  • Execute the test cases and verify the expected outcomes

  • Include positive and negative test cases to cover all possible scenarios

Add your answer

Q16. what programming languages familiar with

Ans.

I am familiar with Java, Python, and C++ programming languages.

  • Java

  • Python

  • C++

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at MG Motor

based on 5 interviews in the last 1 year
Interview experience
3.8
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

3.7
 • 4.3k Interview Questions
3.1
 • 680 Interview Questions
4.1
 • 393 Interview Questions
4.2
 • 386 Interview Questions
4.0
 • 200 Interview Questions
3.9
 • 153 Interview Questions
View all
Top Nomura Research Institute Financial Technologies India Interview Questions And Answers
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter