Walmart
Chassis Brakes International Interview Questions and Answers
Q1. Microservices and their communication patterns. How is it implemented in your project and why?
Microservices are implemented using RESTful APIs and message brokers for asynchronous communication.
RESTful APIs are used for synchronous communication between microservices.
Message brokers like Kafka or RabbitMQ are used for asynchronous communication.
Microservices communicate with each other using HTTP requests and responses.
Each microservice has its own database and communicates with other microservices through APIs.
Microservices are loosely coupled and can be developed an...read more
Q2. Which design pattern you follow and why? Show some example.
I follow the MVC design pattern as it separates concerns and promotes code reusability.
MVC separates the application into Model, View, and Controller components.
Model represents the data and business logic.
View represents the user interface.
Controller handles user input and updates the model and view accordingly.
MVC promotes code reusability and maintainability.
Example: Ruby on Rails framework follows MVC pattern.
Q3. Design a Garbage collector similar to Java Garbage Collector with minimum configurations.
Design a Java-like Garbage Collector with minimal configurations.
Choose a garbage collection algorithm (e.g. mark-and-sweep, copying, generational)
Determine the heap size and divide it into regions (e.g. young, old, permanent)
Implement a root set to keep track of live objects
Set thresholds for garbage collection (e.g. occupancy, time)
Implement the garbage collection algorithm and test for memory leaks
Q4. what is memoization, also write polyfill of memoize
Memoization is a technique used in programming to store the results of expensive function calls and return the cached result when the same inputs occur again.
Memoization helps improve the performance of a function by caching its results.
It is commonly used in dynamic programming to optimize recursive algorithms.
Example: Memoizing a Fibonacci function to avoid redundant calculations.
Q5. what is Promise also write polyfill for Promise
A Promise is an object representing the eventual completion or failure of an asynchronous operation.
A Promise is used to handle asynchronous operations in JavaScript.
It represents a value that may be available now, or in the future.
A polyfill for Promise can be implemented using the setTimeout function to simulate asynchronous behavior.
Q6. Remove Leaf Nodes of Tree
Remove leaf nodes of a tree
Traverse the tree in postorder fashion
For each node, check if it is a leaf node (both children are null)
If it is a leaf node, remove it by setting its parent's reference to null
Q7. Design Parking Lot
Design a parking lot system
Consider the size and layout of the parking lot
Include features like ticketing system, payment options, and security measures
Implement a system to track available parking spaces and manage vehicle entry/exit
Interview Process at Chassis Brakes International
Reviews
Interviews
Salaries
Users/Month