Analyst
2000+ Analyst Interview Questions and Answers

Asked in Bharti Airtel

Q. N-th Fibonacci Number Problem Statement
Given an integer ‘N’, your task is to find and return the N’th Fibonacci number using matrix exponentiation.
Since the answer can be very large, return the answer modulo ...read more
Find N-th Fibonacci number using matrix exponentiation and return modulo 10^9+7.
Implement a function to find N-th Fibonacci number using matrix exponentiation.
Return the answer modulo 10^9+7.
Use the formula F(n) = F(n-1) + F(n-2) with F(1) = F(2) = 1.
The time complexity should be better than O(N).
The constraints are 1 <= T <= 10 and 1 <= N <= 10^5.

Asked in UnitedHealth

Q. Reverse a Number Problem Statement
Given an integer 'N', write a program to generate the reverse of the number and print the resulting reversed number.
The reversed number should not include any leading zeros t...read more
Reverse a given integer and remove leading zeros.
Iterate through the digits of the number from right to left and build the reversed number.
Skip any leading zeros in the reversed number.
Ensure the reversed number does not exceed the constraints of 0 <= N < 10^8.
Analyst Interview Questions and Answers for Freshers

Asked in Deutsche Bank

Q. A 10x10x10 cube is made up of 1x1x1 cubes. Its outer surface is painted red and then the big cube is dismantled into smaller cubes. How many cubes are there with none of their faces painted red?
A 10x10x10 cube is dismantled into smaller cubes. How many have none of their faces painted red?
The outer layer of the big cube has 8x8x8 cubes painted red
The number of cubes with at least one red face is 6x6x6
The number of cubes with no red faces is 10x10x10 - (8x8x8 - 6x6x6)

Asked in Goldman Sachs

Q. Ninja and the Game of Words
In this game, Ninja is provided with a string STR
that might contain spaces, and a list or array WORDS
consisting of N
word strings. Ninja's task is to determine how many times each ...read more
The task is to determine the frequency of each word in a list of words that appears in a given string.
Iterate through each word in the list of words and count its frequency in the given string.
Maintain the order of words as provided in the list.
Return the frequency of each word in an array of strings.

Asked in Capgemini

Q. What will be the output of the following pseudocode? #include Int func(int a) { return a--; } int main() { int a = func(5); printf(“%dâ€,a++); return 0; }
The output of the given pseudocode will be 4.
The function func() takes an integer as input and returns the same integer after decrementing it by 1.
In the main function, the variable a is assigned the value returned by func(5), which is 4.
The printf statement prints the value of a, which is 4, and then increments it by 1.
Therefore, the final value of a is 5, but the output of the printf statement is 4.

Asked in Goldman Sachs

Q. Describe a strategy to win a number game where players alternate adding 1, 2, or 3 to a running total, and the first player to reach 20 wins.
The strategy is to always subtract the number chosen by the friend from 4 to ensure reaching 16 first.
Start with 20 and subtract the number chosen by the friend from 4.
Continue this strategy until reaching 16 before the friend reaches 17-19.
Ensure the friend ends up at any number between 17 to 19 before reaching 16.
Analyst Jobs




Asked in Adobe

Q. Wildcard Pattern Matching Problem Statement
Implement a wildcard pattern matching algorithm to determine if a given wildcard pattern matches a text string completely.
The wildcard pattern may include the charac...read more
Implement a wildcard pattern matching algorithm to determine if a given wildcard pattern matches a text string completely.
Create a recursive function to match the pattern with the text character by character
Handle cases for '?' and '*' characters in the pattern
Keep track of the current position in both pattern and text strings
Return 'True' if the pattern matches the text completely, otherwise return 'False'

Asked in Better.com

Q. What type of customer queries have you handled in your previous role?
Handled various customer queries related to product usage, billing, and technical issues.
Assisted customers with troubleshooting technical issues over the phone and email
Resolved billing discrepancies and processed refunds
Provided guidance on product usage and recommended solutions to meet customer needs
Handled complaints and escalated issues to management when necessary
Share interview questions and help millions of jobseekers 🌟

Asked in eClerx

Q. What would you do if a set of boxes suddenly switched off?
I would check if it's a power outage or a technical issue and troubleshoot accordingly.
Check if other devices are also affected by the power outage
If it's a technical issue, check the power source and connections
Try turning the box back on and see if it works
If the issue persists, seek technical assistance

Asked in Meesho

Q. Idempotent Matrix Verification
Determine if a given N * N matrix is an idempotent matrix. A matrix is considered idempotent if it satisfies the following condition:
M * M = M
Input:
The first line contains a si...read more
Check if a given matrix is idempotent by verifying if M * M equals M.
Calculate the product of the matrix with itself and compare it with the original matrix.
If the product equals the original matrix, then it is idempotent.
If the product does not equal the original matrix, then it is not idempotent.

Asked in Capgemini

Q. 1) What are the types of master data in SAP MM? 2) What is T-code for creation of material master? 3) What are the types of document in SAP MM? 4) What is T- code for creation of vendor master? 5) What is STO?...
read more1) Material, Vendor, Customer, and Service master data are types of master data in SAP MM.
Material master data contains information about materials used in production or procurement.
Vendor master data contains information about the vendors or suppliers.
Customer master data contains information about the customers.
Service master data contains information about the services provided.

Asked in DE Shaw

Q. Chocolate Distribution Problem
You are given an array/list CHOCOLATES
of size 'N', where each element represents the number of chocolates in a packet. Your task is to distribute these chocolates among 'M' stude...read more
The task is to distribute chocolates among students such that the difference between the largest and smallest number of chocolates is minimized.
Sort the array of chocolates packets in ascending order.
Iterate through the array and find the minimum difference between the chocolates packets distributed to students.
Return the minimum difference as the output.

Asked in Goldman Sachs

Q. Given a tank with liquid, with inflow U and outflow Kx (where x is the current height), and all quantities are known, what are the conditions for overflow and steady state?
Conditions for overflow and steady state in a tank with inflow and outflow
Overflow occurs when the inflow rate is greater than the outflow rate
Steady state is achieved when the inflow rate equals the outflow rate
Overflow can be prevented by adjusting the inflow rate or increasing the outflow rate
Steady state can be maintained by balancing the inflow and outflow rates

Asked in Oyo Rooms

Q. Digits Decoding Problem
Ninja has a string of characters from 'A' to 'Z', encoded using their numeric values (A=1, B=2, ..., Z=26). The encoded string is given as a sequence of digits (SEQ). The task is to dete...read more
The task is to determine the number of possible ways to decode a given sequence of digits back into a string of characters from 'A' to 'Z'.
Use dynamic programming to solve the problem efficiently.
Consider different cases like single digit decoding, double digit decoding, and combinations of both.
Implement a recursive function with memoization to avoid redundant calculations.
Handle edge cases such as '0' and '00' in the input sequence.
Return the final count modulo 10^9 + 7 as ...read more

Asked in EXL Service

Q. In your hostel, every girl plays badminton at least once a month. The probability of playing in the 1st week is a, the probability of playing in the 2nd week if not in the 1st is b, the probability of playing i...
read moreCalculating the probability of two friends playing badminton in the same week given certain probabilities.
Calculate the probability of both playing in the first week (a*a)
Calculate the probability of both playing in the second week ((1-a)*b*(1-c))
Calculate the probability of both playing in the third week ((1-a)*(1-b)*c)
Calculate the probability of both playing in the last week ((1-a-b-c)*(1-a-b-c))
Add up all the probabilities to get the final answer

Asked in Capgemini

Q. Do you know about OOP concepts? Explain.
Yes
OOP stands for Object-Oriented Programming
It is a programming paradigm that organizes code into objects
OOP concepts include encapsulation, inheritance, and polymorphism
Encapsulation allows bundling of data and methods into a single unit
Inheritance enables the creation of new classes based on existing ones
Polymorphism allows objects of different classes to be treated as the same type
Example: A car class can have properties like color and speed, and methods like start and st...read more

Asked in Morgan Stanley

Q. Given a web portal that is running slow, how would you debug the solution for that? Answer stepwise.
Debugging steps for a slow web portal
Check server load and resource usage
Analyze network traffic and latency
Review code for inefficiencies and optimize
Use profiling tools to identify bottlenecks
Consider caching and content delivery networks
Test and monitor performance after changes

Asked in Indiamart Intermesh

Q. Prime Numbers within a Range
Given an integer N, determine and print all the prime numbers between 2 and N, inclusive.
Input:
Integer N
Output:
Prime numbers printed on separate lines
Example:
Input:
N = 10
Out...read more
Find and print all prime numbers between 2 and N, inclusive.
Iterate from 2 to N and check if each number is prime
A prime number is only divisible by 1 and itself
Print each prime number on a new line

Asked in Hewlett Packard Enterprise

Q. Subarray With Given Sum Problem Statement
Given an array ARR
of N integers and an integer S, determine if there exists a contiguous subarray within the array with a sum equal to S. If such a subarray exists, re...read more
The problem involves finding a contiguous subarray within an array with a given sum.
Iterate through the array while keeping track of the sum of elements encountered so far.
Use a hashmap to store the cumulative sum and its corresponding index.
If the current sum minus the target sum is found in the hashmap, a subarray with the target sum exists.
Return the start and end indices of the subarray if found, else return [-1, -1].

Asked in Morgan Stanley

Q. A rod of length l has 100 ants randomly placed on it. Each ant moves left or right in a random direction at a speed of l m/s. What is the expected number of collisions after 30 seconds?
Expected number of collisions between randomly moving ants on a rod after 30 seconds.
Calculate the probability of two ants colliding at any given time.
Use the formula for expected value to find the expected number of collisions.
Assume that the ants are point masses and collisions are perfectly elastic.
Consider the possibility of multiple ants colliding at the same time.
Simulation can also be used to estimate the expected number of collisions.

Asked in Goldman Sachs

Q. Given a biased or unbiased die with known probabilities, we toss it repeatedly until the cumulative sum is 100 or more. What is the most probable value of the last toss?
The most probable number on the last toss is 6.
The probability of getting a sum of 100 or more is highest when the sum is 99.
The last toss will be made to reach the sum of 100, so the most probable number is the one that will take the sum closest to 100.
The sum of 94 can be achieved by rolling a 6 on the last toss, which is the most probable number.

Asked in Amazon

Q. Group Anagrams Together
Given an array/list of strings STR_LIST
, group the anagrams together and return each group as a list of strings. Each group must contain strings that are anagrams of each other.
Example:...read more
Group anagrams together in a list of strings.
Iterate through the list of strings and sort each string alphabetically.
Use a hashmap to group anagrams together based on the sorted string as key.
Return the values of the hashmap as the grouped anagrams.

Asked in Accenture

Q. If I provide you with data, can you use Excel formulas to generate the required output?
Yes, I can use Excel formulas to process the given data and provide the desired output.
Excel formulas can be used to perform various calculations and manipulations on data
They can be used to perform mathematical operations, create formulas based on logical conditions, and manipulate text
Examples of Excel formulas include SUM, IF, VLOOKUP, CONCATENATE, etc.

Asked in Fractal Analytics

Q. What is truth? Like the one you have been taught or the one you learn yourself like your parents teach you to not cut nails at night etc ot go to the temple?
Truth is subjective and can be influenced by personal experiences and cultural beliefs.
Truth is not always objective or universal
It can be shaped by personal experiences and cultural beliefs
What is considered true in one culture may not be true in another
Truth can also change over time as new information is discovered
For example, the belief that the earth was flat was once considered true, but is now known to be false

Asked in BNY

Q. Cycle Detection in a Singly Linked List
Determine if a given singly linked list of integers forms a cycle or not.
A cycle in a linked list occurs when a node's next
points back to a previous node in the list. T...read more
Detect if a singly linked list forms a cycle by checking if a node's next points back to a previous node.
Traverse the linked list using two pointers, one moving one step at a time and the other moving two steps at a time.
If the two pointers meet at any point, it indicates the presence of a cycle in the linked list.
Use Floyd's Cycle Detection Algorithm to efficiently detect cycles in the linked list.

Asked in Samsung

Q. Gold Mine Problem Statement
You are provided with a gold mine, represented as a 2-dimensional matrix of size N x M with N rows and M columns. Each cell in this matrix contains a positive integer representing th...read more
The task is to determine the maximum amount of gold a miner can collect in a gold mine by moving in allowed directions.
Create a 2D array to represent the gold mine matrix.
Implement a dynamic programming approach to calculate the maximum amount of gold that can be collected.
Consider the constraints provided to optimize the solution.
Iterate through the matrix to calculate the maximum gold collection.
Keep track of the maximum gold collected at each cell based on the allowed move...read more

Asked in Goldman Sachs

Q. How would you solve a puzzle about two carts on a track with sensors, where you can only control their motion when they pass over the sensors, to cause a collision between them?
Control the carts' speeds using sensors to create a collision by timing their movements strategically.
Start both carts at different speeds.
Use the sensor to slow down one cart just before it reaches the other.
Time the slowing down so that both carts meet at the same point on the track.
Example: If Cart A is faster, slow it down when it passes the sensor to allow Cart B to catch up.

Asked in Northern Trust

Q. Mutual fund Hedge fund Diff between mutual fund and hedge fund Derivatives Types of derivatives with examples and explanation About Northern Trust Why you want to join Northern Trust Why they should select you...
read moreThe interview covered topics such as mutual funds, hedge funds, derivatives, Northern Trust, fixed income, financial statements, and more.
Mutual funds are investment vehicles that pool money from multiple investors to purchase securities.
Hedge funds are private investment funds that use advanced strategies to generate high returns for wealthy investors.
Derivatives are financial instruments that derive their value from an underlying asset or security.
Examples of derivatives in...read more

Asked in HSBC Group

Q. How would you identify the top 5 HSBC customers globally?
Top 5 customers of HSBC can be found by analyzing transaction history and account balances.
Analyze transaction history of all HSBC customers worldwide
Identify customers with highest transaction volumes and account balances
Rank customers based on transaction volumes and account balances
Select top 5 customers based on ranking
Consider other factors such as creditworthiness and profitability

Asked in Goldman Sachs

Q. A man starts at 0 and needs to reach 20 on a number line, moving in steps of 1 or 2. How many different ways can he accomplish this?
Count number of ways to reach 20 on number line starting from 0 in steps of 1 or 2. Derive recursive formula for n+1.
Use dynamic programming to count number of ways for each step.
For each step, number of ways is sum of number of ways for previous 1 or 2 steps.
Recursive formula: ways[n+1] = ways[n] + ways[n-1]
Interview Questions of Similar Designations
Interview Experiences of Popular Companies





Top Interview Questions for Analyst Related Skills

Calculate your in-hand salary
Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary


Reviews
Interviews
Salaries
Users

