Add office photos
Engaged Employer

Quantiphi Analytics Solutions Private Limited

3.1
based on 784 Reviews
Video summary
Filter interviews by

Mageba Bridge Products Interview Questions and Answers

Updated 12 Dec 2024
Popular Designations

Q1. Fruits and Baskets Problem Statement

You are given 'n' fruit trees planted along a road, numbered from 0 to n-1. Each tree bears a fruit type represented by an uppercase English alphabet. A Ninja walking along ...read more

Ans.

The problem is to find the maximum number of fruits the Ninja can put in both baskets after satisfying given conditions.

  • The Ninja can start at any tree and end at any tree, but cannot skip a tree.

  • He can pick one fruit from each tree until he cannot, i.e., when he has to pick a fruit of the third type.

  • The restriction is that each basket can have only one type of fruit.

  • We need to find the maximum number of fruits that can be put in both baskets.

Add your answer

Q2. Sort 0 1 2 Problem Statement

Given an integer array arr of size 'N' containing only 0s, 1s, and 2s, write an algorithm to sort the array.

Input:

The first line contains an integer 'T' representing the number of...read more
Ans.

The problem requires sorting an array of 0s, 1s, and 2s in a single scan.

  • Use three pointers to keep track of the positions of 0s, 1s, and 2s.

  • Initialize the low pointer at the beginning of the array and the high pointer at the end.

  • Iterate through the array using a current pointer and swap elements based on their values.

  • Move the pointers accordingly until the array is sorted.

  • The time complexity of this solution is O(N) as we only iterate through the array once.

Add your answer

Q3. What is treeset and weakhashmap?

Ans.

TreeSet is a sorted set implementation in Java. WeakHashMap is a hash table-based Map implementation with weak keys.

  • TreeSet is implemented using a tree structure and maintains elements in sorted order.

  • WeakHashMap is a Map implementation that allows keys to be garbage collected when they are no longer referenced.

  • WeakHashMap is useful for caching or memoization where the keys are not always needed and can be garbage collected to free up memory.

Add your answer

Q4. What is comparable and comparator?

Ans.

Comparable and Comparator are interfaces used for sorting objects in Java.

  • Comparable interface is used to define the natural ordering of objects based on their own class.

  • Comparator interface is used to define the ordering of objects based on a separate class.

  • Comparable interface has compareTo() method while Comparator interface has compare() method.

  • Comparable interface is implemented by the class whose objects need to be sorted while Comparator interface is implemented by a s...read more

Add your answer
Discover Mageba Bridge Products interview dos and don'ts from real experiences

Q5. oops concept, explain each of them

Ans.

Object-oriented programming concepts that help in organizing and structuring code.

  • Encapsulation: Bundling data and methods that operate on the data into a single unit (class).

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

  • Polymorphism: Ability to present the same interface for different data types.

  • Abstraction: Hiding the complex implementation details and showing only the necessary features of an object.

Add your answer

Q6. REST API for User CRUD

Ans.

Design a RESTful API for CRUD operations on user resources.

  • Use HTTP methods like GET, POST, PUT, DELETE for CRUD operations

  • Create endpoints like /users for listing all users, /users/{id} for specific user

  • Use status codes like 200 for success, 404 for not found, 400 for bad request

  • Implement authentication and authorization mechanisms for security

  • Include request and response body formats like JSON or XML

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

Interview Process at Mageba Bridge Products

based on 8 interviews
3 Interview rounds
Aptitude Test Round
Coding Test Round
HR Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Developer Interview Questions from Similar Companies

4.0
 • 81 Interview Questions
3.7
 • 45 Interview Questions
3.3
 • 36 Interview Questions
3.3
 • 14 Interview Questions
3.9
 • 14 Interview Questions
3.6
 • 12 Interview Questions
View all
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

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