Analyst
2000+ Analyst Interview Questions and Answers
Popular Companies
Q1. 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.
Q2. 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
Analyst Interview Questions and Answers for Freshers
Q3. 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
Q4. A 10x10x10 cube is made up of 1x1x1 cubes. Its outer surface is painted red and then 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)
Q5. 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
Q6. 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
Share interview questions and help millions of jobseekers 🌟
Q7. Good old standard problem: Playing number game with your friend to select any of the number between 1 to 3. Whoever reaches 20 first, wins. You have to tell the strategy to win the game. Basically, you start wi...
read moreThe 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.
Q8. 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
Analyst Jobs
Q9. What type of customer queries you have 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
Q10. what will you do if set of box 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
Q11. 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
Q12. 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
Q13. 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.
Q14. 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
Q15. 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
Q16. Given a tank with liquid, and there are flows in and out, inflow is U and outflow is Kx, where x is current height of liquid in tank, all needed quantities given, what are the conditions for overflow and steady...
read moreConditions 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
Q17. Greatest Common Divisor Problem Statement
You are tasked with finding the greatest common divisor (GCD) of two given numbers 'X' and 'Y'. The GCD is defined as the largest integer that divides both of the given...read more
Q18. 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
Q19. In your hostel every girl plays badminton atleast once a month. The probability of one playing badminton in 1st week is a, probability that if one doesn’t play in 1st week than she will play in 2nd week is b, p...
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
Q20. 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
Q21. Boyer Moore Algorithm for Pattern Searching
You are given a string text
and a string pattern
. Your task is to find all occurrences of pattern
in the string text
and return an array of indexes of all those occur...read more
Q22. Circular Tour Problem Statement
Consider a circular path with N petrol pumps. Each pump is numbered from 0 to N-1. Every petrol pump provides:
- The amount of petrol available at the pump.
- The distance to the ne...read more
Q23. Given we have a (un)biased die, with given probabilities, and we toss it till we get a sum of 100 or more (basically if the sum crosses 100), and we stop. What is the most probable number you will get on the la...
read moreThe 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.
Q24. If I give you the data can you use Excel formulas to give the 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.
Q25. Maximum Subarray Sum Problem Statement
Given an array ARR
consisting of N
integers, your goal is to determine the maximum possible sum of a non-empty contiguous subarray within this array.
Example of Subarrays:...read more
Q26. 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
Q27. 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
Q28. Rotate Array Problem Statement
The task is to rotate a given array with N elements to the left by K steps, where K is a non-negative integer.
Input:
The first line contains an integer N representing the size of...read more
Q29. LRU Cache Design Question
Design a data structure for a Least Recently Used (LRU) cache that supports the following operations:
1. get(key)
- Return the value of the key if it exists in the cache; otherwise, re...read more
Q30. Shortest Path in a Binary Matrix Problem Statement
Given a binary matrix of size N * M
where each element is either 0 or 1, find the shortest path from a source cell to a destination cell, consisting only of 1s...read more
Q31. Suppose a man starts at 0, and has to go to 20 on the number line. He can either move in steps of 1 or 2. How many number of ways can he do this? Extending this, if we know the number of ways for going from 0 t...
read moreCount 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]
Q32. How will you find the top 5 customer of HSBC from the entire world?
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
Q33. If you are asked to play a game where you toss a fair coin again and again until you get consecutive heads and win Re. 1 or you get consecutive tails and lose and quit, how much will you be willing to pay to pl...
read moreI would be willing to pay 50 paise to play this game.
The expected value of the game is 50 paise.
This is because the probability of getting consecutive heads is 1/3 and the probability of getting consecutive tails is 1/4.
Therefore, the expected value of the game is (1/3 * 1) - (1/4 * 1) = 1/12 = 8.33 paise.
However, since the minimum amount that can be won is Re. 1, I would be willing to pay 50 paise to play the game.
Q34. 3. 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
Q35. What is Active Directory? How do we manage role from active directory
Active Directory is a Microsoft service that manages network resources and user access.
Active Directory is used to manage user accounts, computers, and other network resources.
It allows for centralized authentication and authorization for users and computers in a network.
Roles can be managed through Active Directory by assigning users to specific groups with corresponding permissions.
Examples of roles that can be managed through Active Directory include domain administrators,...read more
Q36. There is an urn with n red balls and 1 black ball in it. You and your friend play a game where you take turns drawing from the urn. The player who draws the black ball first wins. Should you go first or second?
Go second. The probability of winning is higher when going second.
The probability of winning when going first is (1/n+1), while the probability of winning when going second is (n/n+1)
This is because the first player has a chance of drawing the black ball on their turn, while the second player has a chance of drawing the black ball on their turn or the first player's turn
For example, if there are 10 red balls and 1 black ball, the probability of winning when going first is 1/1...read more
Q37. There is a closed room with 3 bulbs and there are three switches outside. You can toggle any two switches once without looking inside the room and map the bulbs to their corresponding switches. (Since I had don...
read moreYou can map the bulbs to their corresponding switches by toggling two switches and leaving one switch untouched.
Toggle switch 1 and switch 2, leave switch 3 untouched.
After a few minutes, toggle switch 2 back to its original position.
Enter the room and observe the bulbs.
The bulb that is on corresponds to switch 1, the bulb that is off and still warm corresponds to switch 2, and the bulb that is off and cool corresponds to switch 3.
Q38. Suppose there are N chocolates, and I pick a random one, and eat that chocolate and also everything to the right of it. I then continue this process with the remaining. How many ways are there to do this?
There are (N-1)! ways to eat chocolates from left to right.
The first chocolate can be chosen in N ways, the second in (N-1) ways, and so on.
However, since the order of chocolates eaten matters, we need to divide by the number of ways to order N chocolates, which is N!.
Therefore, the total number of ways to eat chocolates is (N-1)!
For example, if N=4, there are 3! = 6 ways to eat the chocolates.
Q39. Given 3 functions, f which gives the first day of the current month, g gives the next working day and h gives the previous working day, conpute the 3rd working day? Compute the 2nd working day of the previous m...
read moreCompute working days using given functions f, g, and h.
To compute the 3rd working day, apply function g three times to function f.
To compute the 2nd working day of the previous month, apply function h to function f, then apply function g twice.
To compute the 4th working day of the next month, apply function g four times to function f.
Q40. How would you segment a population based on certain attributes, which algorithm would you use. SAS and proc sql related questions are must for analyst interview. If lateral hire, expect questions based on work...
read moreTo segment a population based on attributes, use clustering algorithms like k-means or hierarchical clustering.
Identify relevant attributes such as age, income, education level, etc.
Normalize the data to ensure all attributes are on the same scale.
Choose a clustering algorithm based on the size of the dataset and the desired number of segments.
Evaluate the results using metrics like silhouette score or within-cluster sum of squares.
Use SAS and proc sql to perform the analysis...read more
Q41. what do you know about networking?
Networking refers to the practice of connecting devices together to share resources and communicate with each other.
Networking involves the use of protocols and standards such as TCP/IP, DNS, and HTTP.
Networking can be done through wired or wireless connections.
Networking can be used for various purposes such as sharing files, printers, and internet access.
Networking can be secured through the use of firewalls, encryption, and authentication.
Examples of networking devices inc...read more
Q42. An IT sector multinational wants to expand its business into more countries. Suggest a strategy. This was the question given in the VC round by the Partner. It was followed by a lot of numerical and qualitative...
read moreTo expand into more countries, the IT sector multinational can adopt a market entry strategy that includes market research, partnerships, localization, and scalability.
Conduct thorough market research to identify potential countries for expansion
Establish strategic partnerships with local companies to leverage their knowledge and networks
Adapt products and services to meet the specific needs and preferences of each target market
Ensure scalability of operations to handle the i...read more
Q43. Which language do you prefer to code in? "Have you read The C Programming Language book by Dennis Retchie?" Which technical book have you read recently?.-So you like C, have you ever thought of bringing up the...
read moreYes, I prefer coding in C and have read The C Programming Language book. I have also explored the concept of Inheritance in C.
I find C to be a powerful and efficient language for system programming.
Yes, I have read The C Programming Language book by Dennis Retchie and found it to be a great resource.
Recently, I have been exploring the concept of Inheritance in C through various online resources and tutorials.
While C does not have built-in support for Inheritance, it is possib...read more
Q44. How would you find whether a number is even or odd without using any conditions?
Using bitwise operator to check the last bit of the number.
Use bitwise AND operator with 1 to check the last bit of the number.
If the result is 0, the number is even. If the result is 1, the number is odd.
Example: 6 & 1 = 0 (even), 7 & 1 = 1 (odd)
Q45. In how many ways can i permute n numbers 1 2 3...n so that all the no.s between u and i+1 are less than i (for all i in the permutation)?
Counting permutations where numbers between u and i+1 are less than i for all i in the permutation.
The first number in the permutation must be 1.
For each i in the permutation, all numbers between u and i+1 must be less than i.
Use dynamic programming to count the number of valid permutations.
The answer is (n-1)th Catalan number.
Example: for n=4, the answer is 5.
Q46. One puzzles--How to calculate the average no of person coming to the airport daily?
The average number of people coming to the airport daily can be calculated by taking the total number of people arriving and departing and dividing it by two.
Collect data on the number of arrivals and departures for a given period, such as a week or a month.
Add the number of arrivals and departures together to get the total number of people coming to the airport.
Divide the total number by the number of days in the period to get the average number of people coming to the airpo...read more
Q47. Can some work you did at Microsoft be used in DB (I wasn’t at all expecting this but thought and found that an algo I designed could be applied to a problem in the stock market domain)?
Yes, an algorithm I designed at Microsoft can be applied to a problem in the stock market domain.
I designed an algorithm at Microsoft that can be used in the stock market domain
The algorithm can be applied to solve a specific problem in the stock market
The work I did at Microsoft has potential applications in the financial industry
Q48. In a unit circle, p is chosen uniformly on the circle and q inside the circle, what is the prob. that the rectangle is inside the circle?
Probability of a rectangle being inside a unit circle with p chosen uniformly on the circle and q inside the circle.
The probability can be found by calculating the ratio of the area of the rectangle to the area of the circle.
The area of the circle is pi and the area of the rectangle can be found using the distance between p and q.
The probability is 1/4.
Example: If the distance between p and q is 0.5, then the area of the rectangle is 0.25 and the probability is 0.25/pi.
Q49. 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
Q50. Suppose you and I are playing a dice game. The one who get the lesser number looses the games. The dice has n sides. If I start the game, what is the probablity of you winning?
Probability of winning a dice game where the one with lesser number wins.
The probability of winning depends on the number of sides on the dice.
If the dice has an odd number of sides, the probability of winning is higher for the second player.
If the dice has an even number of sides, the probability of winning is equal for both players.
Interview Questions of Similar Designations
Top Interview Questions for Analyst Related Skills
Interview experiences of popular companies
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/Month