Deutsche Bank
Interview Questions and Answers
Q1. Find the two index in an array whose sum is closest to 0.
Find two indices in an array whose sum is closest to 0.
Sort the array to simplify the process.
Use two pointers approach starting from both ends towards the middle.
Keep track of the closest sum found so far.
Q2. What design patterns you have implemented
I have implemented various design patterns such as Singleton, Factory, Observer, and Strategy.
Implemented Singleton pattern to ensure only one instance of a class exists
Utilized Factory pattern to create objects without specifying the exact class
Implemented Observer pattern for event handling and notification
Utilized Strategy pattern to define a family of algorithms and make them interchangeable
Q3. Find 1st non repeatable sequence from a string using Java 8
Find the first non-repeating character in a string using Java 8.
Use Java 8 streams to convert the string to a character array.
Use Collectors.groupingBy to group the characters by count.
Filter out characters with count > 1 and find the first character with count 1.
Q4. What is the difference between pod and deployment
Pod is the smallest deployable unit in Kubernetes, while deployment manages a set of identical pods.
Pod is a single instance of a running container in Kubernetes
Deployment manages a set of identical pods, ensuring they are always running and available
Pods can be created directly, but deployments are typically used for managing pods in production environments
Q5. How Nodejs works and handle asynchronous
Node.js is a runtime environment that uses event-driven, non-blocking I/O model to handle asynchronous operations.
Node.js uses event loop to handle asynchronous operations efficiently.
It allows multiple I/O operations to be processed concurrently without blocking the execution.
Node.js uses callbacks, promises, and async/await to manage asynchronous code.
Example: Reading a file asynchronously using fs module in Node.js.
Q6. What is an Event loop, how it works
An event loop is a programming construct that waits for and dispatches events or messages in a program.
Event loop is commonly used in asynchronous programming to handle multiple tasks concurrently.
It continuously checks for events in a queue and executes them one by one.
Event loop helps in preventing blocking of the main thread by allowing non-blocking operations to run in the background.
Example: Node.js uses an event loop to handle asynchronous operations efficiently.
Q7. What is resilience in microservices
Resilience in microservices refers to the ability of a system to recover from failures and continue functioning.
Resilience in microservices involves designing systems that can handle failures gracefully without impacting the overall functionality.
This can be achieved through techniques such as circuit breakers, retries, timeouts, and fallback mechanisms.
Resilience also includes monitoring and alerting to quickly identify and respond to failures in the system.
Examples of resil...read more
Q8. Do programs of Data structures
Yes, programs of Data structures are essential for efficient data management and algorithm development.
Data structures are used to organize and store data in a way that enables efficient access and modification.
Programs of Data structures help in developing algorithms that can manipulate data effectively.
Examples of data structures include arrays, linked lists, stacks, queues, trees, and graphs.
Q9. Write code for lift operation
Code for lift operation
Define the lift class with attributes such as current floor, destination floor, direction, etc.
Implement methods for moving the lift up or down, stopping at floors, and opening/closing doors.
Use appropriate data structures such as queues to manage lift requests and floor stops.
More about working at Deutsche Bank
Interview Process at null
Reviews
Interviews
Salaries
Users/Month