Fidelity Investments
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
Clear (1)
Transactions in microservices are managed using distributed transactions or compensating transactions.
Distributed transactions involve multiple microservices coordinating with a transaction manager to ensure data consistency across services.
Compensating transactions involve each microservice having a compensating action to rollback changes if a transaction fails.
Saga pattern is commonly used in microservices to manage ...
Top trending discussions
Code for rand7 using rand5 function
Use rand5 twice to generate a number in [1,25] with equal probability
If the number is greater than 21, discard and try again
Otherwise, return (number mod 7) + 1
LRU cache is implemented using a doubly linked list and a hash map.
Create a doubly linked list to keep track of the order of elements in the cache.
Create a hash map to store the key-value pairs of the cache.
When a new element is added, check if the cache is full. If it is, remove the least recently used element from the linked list and the hash map.
When an element is accessed, move it to the front of the linked list to...
Function to randomly select pivot element in Quick Sort
Generate a random index within the range of the array
Return the element at the randomly generated index as the pivot
posted on 20 May 2017
I was interviewed in May 2017.
Yes, the string class can be extended in most programming languages.
Inheritance can be used to extend the functionality of the string class.
By creating a new class that inherits from the string class, additional methods and properties can be added.
Extending the string class allows for customization and adding specific functionality to strings.
Example: In Python, the string class can be extended by creating a new class
Implicit objects in JSP are predefined objects that are available for use without any declaration or initialization.
Implicit objects in JSP include request, response, session, application, out, config, pageContext, page, exception, and others.
These objects provide access to various aspects of the JSP environment and can be used to perform common tasks.
For example, the request object allows access to HTTP request parame...
A hash map is a data structure that uses a hash function to map keys to values.
Hash map stores key-value pairs
It uses a hash function to compute an index for each key
Collisions can occur when two keys hash to the same index
Hash maps provide fast access to values based on their keys
StringBuffer and StringBuilder are both used to manipulate strings, but StringBuffer is thread-safe while StringBuilder is not.
StringBuffer is synchronized, making it safe for use in multi-threaded environments.
StringBuilder is not synchronized, making it faster but not thread-safe.
StringBuffer is preferred when multiple threads are involved, while StringBuilder is preferred for single-threaded scenarios.
Both classes p...
MVC is a software architectural pattern that separates an application into three main components: Model, View, and Controller.
Model represents the data and business logic of the application.
View is responsible for displaying the user interface.
Controller handles user input, updates the model, and interacts with the view.
MVC promotes separation of concerns and modularity in software development.
Example: In a web applica...
Annotations used in RESTful web services
1. @Path - Specifies the URI path for the resource
2. @GET - Specifies that the method handles HTTP GET requests
3. @POST - Specifies that the method handles HTTP POST requests
4. @PUT - Specifies that the method handles HTTP PUT requests
5. @DELETE - Specifies that the method handles HTTP DELETE requests
6. @PathParam - Binds the value of a URI template parameter to a method paramete...
I was interviewed before Mar 2021.
Round duration - 90 minutes
Round difficulty - Medium
There were 33 questions in total. The objective questions were simple.
Mary is an enthusiastic party-goer who struggles with remembering event dates. Help Mary by sorting a given list of event dates in an ascending order.
Sort a list of event dates in ascending order based on year, month, and day.
Sort the list of dates based on year, then month, and finally day.
Use a sorting algorithm to rearrange the dates in ascending order.
Ensure the constraints are met for each date in the list.
You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to find and return a list of all pairs of elements where each sum of a pair equals 'S'.
Given an array and a target sum, find all pairs of elements that add up to the target sum.
Iterate through the array and for each element, check if the complement (target sum - current element) exists in a hash set.
If the complement exists, add the pair to the result list.
Sort the pairs based on the first element and then the second element.
Handle edge cases like duplicate elements and pairs with the same values.
Example...
Given an integer N
, your task is to recursively break it into three integer parts: N / 2
, N / 3
, and N / 4
. You need to compute the maximum sum possible by dividing the numbe...
Given an integer N, recursively break it into three parts and find the maximum sum possible.
Recursively divide N into N/2, N/3, and N/4 to find the maximum sum
Compare the sum obtained by dividing N with the sum of N itself
Return the maximum sum for each test case
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more
I was interviewed before Mar 2021.
Round duration - 60 minutes
Round difficulty - Medium
Technical Interview round with questions based on DSA.
Given an array ARR
of size N
, containing each number between 1 and N-1
at least once, identify the single integer that appears twice.
The first line contains an integer...
Identify the duplicate integer in an array containing numbers between 1 and N-1.
Iterate through the array and keep track of the frequency of each element using a hashmap.
Return the element with a frequency greater than 1 as the duplicate integer.
Ensure the constraints are met and a duplicate number is guaranteed to be present.
You are given an arbitrary binary tree consisting of N nodes, each associated with an integer value from 1 to 9. Each root-to-leaf path can be considered a number formed by concat...
Calculate the total sum of all root to leaf paths in a binary tree formed by concatenating node values.
Traverse the binary tree from root to leaf nodes, keeping track of the current path sum
Add the current node value to the path sum and multiply by 10 for each level
When reaching a leaf node, add the final path sum to the total sum
Return the total sum modulo (10^9 + 7)
You are given a directed acyclic graph (DAG). Your task is to perform topological sorting of the graph and return any valid ordering.
A directed acyclic g...
Implement a function to perform topological sorting on a directed acyclic graph (DAG) and return any valid ordering.
Create a graph data structure to represent the DAG
Use depth-first search (DFS) to perform topological sorting
Maintain a visited array to keep track of visited nodes
Return the ordering of nodes after DFS traversal
Round duration - 60 minutes
Round difficulty - Easy
Technical interview round with questions based on DSA.
You are given a binary tree consisting of distinct integers and two nodes, X
and Y
. Your task is to find and return the Lowest Common Ancestor (LCA) of these two nodes...
Find the Lowest Common Ancestor (LCA) of two nodes in a binary tree.
Traverse the binary tree to find the paths from the root to nodes X and Y.
Compare the paths to find the last common node, which is the LCA.
Handle cases where one node is an ancestor of the other.
Consider edge cases like when X or Y is the root node.
Implement a recursive or iterative solution to find the LCA efficiently.
You are provided with a sorted array that has undergone 'K' rotations (the exact value of 'K' is unknown). A rotation involves shifting each element of the array to the right,...
Implement a function to find the minimum number in a rotated sorted array efficiently.
Use binary search to find the minimum element in the rotated array.
Compare the mid element with the start and end elements to determine which half of the array to search next.
Continue the binary search until the minimum element is found.
Given an array TREE
of 'N' unique integers, construct a maximum binary tree using the following rules:
TREE
.Construct a maximum binary tree from an array of unique integers following specific rules.
Find the maximum number in the array to set as the root of the tree.
Recursively construct the left subtree with elements before the maximum number.
Recursively construct the right subtree with elements after the maximum number.
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
posted on 2 Dec 2015
posted on 13 Mar 2015
I was interviewed in Dec 2016.
posted on 10 May 2015
Multi tasking, multi processing, and multi programming are different approaches to managing tasks in an operating system.
Multi tasking allows multiple tasks to run concurrently on a single processor.
Multi processing involves multiple processors running tasks simultaneously.
Multi programming allows multiple programs to be loaded into memory and executed concurrently.
Examples of multi tasking operating systems include Wi...
Memory allocation refers to the process of assigning memory to programs during runtime.
Stack allocation is done automatically and is limited in size.
Heap allocation is done manually and is larger in size.
Stack memory is used for local variables and function calls.
Heap memory is used for dynamic memory allocation.
Memory leaks can occur if heap memory is not properly managed.
Use a shared variable and synchronization mechanisms to ensure natural order printing of numbers.
Create two threads, one for printing even numbers and the other for printing odd numbers.
Use a shared variable to keep track of the current number to be printed.
Implement synchronization mechanisms like locks or semaphores to ensure only one thread can access the shared variable at a time.
Each thread should check if it is i...
Printing a matrix in spiral order
Start from the first element and print it
Move in a spiral order towards the center of the matrix
Repeat until all elements are printed
Thread class and Runnable Interface are used for multithreading in Java.
Thread class is a predefined class in Java that provides methods to create and control threads.
Runnable interface is used to define a task that can be executed by a thread.
Thread class implements Runnable interface.
Thread class provides more control over threads than Runnable interface.
Example: Thread t = new Thread(new MyRunnable()); t.start();
Exa...
Linked List is a dynamic data structure while ArrayList is a static data structure.
Linked List is best for frequent insertion and deletion operations.
ArrayList is best for frequent access operations.
Linked List uses more memory than ArrayList.
ArrayList is faster than Linked List for accessing elements.
Use Linked List when you need to frequently add or remove elements from the list.
Use ArrayList when you need to frequen
I am not interested in a career in investment banking.
I am more interested in a career in software development
I enjoy problem-solving and creating innovative solutions through coding
Investment banking does not align with my passion and skill set
I have chosen to apply to J.P. Morgan because of their reputation, global presence, and opportunities for growth.
J.P. Morgan has a strong reputation in the financial industry.
They have a global presence with offices in multiple countries.
The company offers various opportunities for career growth and development.
J.P. Morgan is known for its innovative technology solutions in the financial sector.
I am impressed by their ...
Yes, I have made a mistake in my previous project.
I underestimated the complexity of a task and ended up missing the deadline.
I failed to properly test a feature, resulting in a bug that affected user experience.
I accidentally deleted an important file without having a backup.
I misunderstood a requirement and implemented a feature incorrectly.
based on 1 interview
Interview experience
Lead Software Engineer
963
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Engineer
906
salaries
| ₹0 L/yr - ₹0 L/yr |
Process Specialist
296
salaries
| ₹0 L/yr - ₹0 L/yr |
Principal Software Engineer
229
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Process Specialist
196
salaries
| ₹0 L/yr - ₹0 L/yr |
Vanguard
Blackrock
Charles Schwab
JPMorgan Chase & Co.