Morgan Stanley
20+ NK Industrial Services pvt ltd Interview Questions and Answers
Q1. 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
Q2. 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)
Q3. 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.
Q4. 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.
Q5. x, y are random variables with probability distribution ke^(-kx) and ue^(-ux). What is the dist. for min(x,y)
Finding the probability distribution for the minimum of two random variables with given distributions.
Use the formula P(min(x,y)>z) = P(x>z)P(y>z)
Integrate over the range of z to get the distribution of min(x,y)
Final distribution is 2ke^(-kx)ue^(-ux)exp(-uz)
Q6. Minimize the cost of the pen, what innovations can you do with it?
Innovations to minimize cost of pen
Use recycled materials for pen body and ink
Simplify design to reduce production costs
Implement refillable ink cartridges to reduce waste and cost
Partner with companies for bulk purchasing of materials
Automate production process to reduce labor costs
Q7. An organism dies out with prob. p and spawns into 2 with prob (1-p). what is the prob. that starting from 1,the organism will die out?
Given prob. p of dying out and prob. (1-p) of spawning into 2, find prob. of dying out starting from 1 organism.
Use probability tree to visualize outcomes
Probability of dying out starting from 1 is p + (1-p) * (probability of dying out starting from 2)^2
Solve recursively to get final answer
Q8. A is a matrix vi's are n linear vectors s.t. Avi= Vj a<=j<=n, what are the possible values of |A|?
Possible values of determinant of matrix A given Avi=Vj for n linear vectors
The possible values of |A| are non-zero as the given vectors are linearly independent
The value of |A| can be calculated using the formula |A| = (-1)^n * det(A)
If the given vectors are orthogonal, then |A| is the product of the magnitudes of the vectors
Q9. A and B play a game with unfair count with P[Heads]= p. they count # of heads and tails .if # of heads > #tails +1 at any point, A wins.Find the prob. that A wins
A and B play a game with unfair coin. A wins if # of heads > #tails +1 at any point. Find prob. of A winning.
The game is played with an unfair coin with P[Heads]=p
A wins if # of heads > #tails +1 at any point
Find the probability of A winning
Q10. What is the prob. that element at 20th position lands up at 31st position after the first iteration?
The probability of element at 20th position landing up at 31st position after the first iteration.
The probability depends on the size of the dataset and the algorithm used for iteration.
If the algorithm involves swapping adjacent elements, the probability is higher.
If the dataset is sorted in a way that the element at 20th position is adjacent to the element at 31st position, the probability is 1.
The probability can be calculated using combinatorics and probability theory.
Q11. Find f(n) : pdt F(x) cdf. the value of k> 0 a constant -inf S +inf f(x)*F(kx) dx x follows normal standard distribution?
Finding f(n) for a normal standard distribution with a given constant k.
Calculate the product of probability density function and cumulative distribution function.
Integrate the product of f(x) and F(kx) from -inf to +inf.
The value of k is a constant greater than 0.
Q12. Find a local minima of an array in o(log n)? In a functional program
Find local minima of an array in o(log n) in functional programming.
Use binary search to find the local minima.
Check if the mid element is a local minima, if not, move towards the lower side.
If the mid element is greater than its left element, move towards the left side, else move towards the right side.
Repeat until a local minima is found.
Example: [5, 3, 2, 4, 6, 8, 9] -> local minima is 2.
Q13. Given a sorted array find two element (i,j) s.t. i+j =x in O(n) time?
Find two elements in a sorted array that add up to a given sum in linear time.
Use two pointers, one at the beginning and one at the end of the array.
If the sum of the two pointers is greater than the target, move the right pointer to the left.
If the sum of the two pointers is less than the target, move the left pointer to the right.
Repeat until the sum is found or the pointers meet.
Example: Given [1, 2, 3, 4, 5] and target 7, return (2, 5).
Q14. Implement a dynamic 2D excel sheet using DS (underwent various levels of improvisations)
Implement a dynamic 2D excel sheet using DS
Use a 2D array to store the data
Implement functions to add, delete, and modify data
Use data structures like linked lists or hash tables for efficient searching and sorting
Implement dynamic resizing to handle large amounts of data
Use GUI libraries like Tkinter or PyQt for user interface
Q15. What between Tower and Morgan Stanley?
Tower and Morgan Stanley are both financial services companies.
Tower is a global investment management firm with over $1 trillion in assets under management.
Morgan Stanley is a multinational investment bank and financial services company.
Both companies offer a range of financial services including wealth management, investment banking, and asset management.
Tower is known for its focus on sustainable investing, while Morgan Stanley has a strong presence in mergers and acquisit...read more
Q16. Tell me about Yourself. What excel functions are you aware of?
I am a detail-oriented analyst with knowledge of various Excel functions.
I am proficient in basic functions such as SUM, AVERAGE, MAX, MIN, COUNT, etc.
I am also familiar with more advanced functions such as VLOOKUP, HLOOKUP, INDEX, MATCH, IF, AND, OR, etc.
I have experience using PivotTables, PivotCharts, and creating macros to automate tasks.
I am constantly learning and exploring new functions to improve my skills.
Q17. A build up that resulted in the concept of using joins in DBMS
Joining tables in DBMS evolved as a solution to handle complex data relationships.
Joins allow combining data from multiple tables based on a common column.
The concept of joins originated from the need to handle complex data relationships.
Joins can be inner, outer, left, right, or cross depending on the type of data required.
Joins can improve query performance by reducing the number of queries needed to retrieve data.
Joins can also help in data normalization by reducing data r...read more
Q18. Find an even length palindrome in a string in o(n)?
To find an even length palindrome in a string in O(n), we can use the two-pointer approach.
Initialize two pointers at the center of the string.
Expand the pointers outwards while checking if the characters at both pointers are equal.
If they are not equal, return the previous substring as the even length palindrome.
If the pointers reach the end of the string, return the entire string as the even length palindrome.
Q19. Write a code to sort a list without pipes?
Code to sort a list without pipes
Use a sorting algorithm like bubble sort, insertion sort, or selection sort
Implement the algorithm in the programming language of your choice
Test the code with different input sizes and types
Q20. What are Hedge Funds? Components of Financial Statements
Hedge funds are alternative investment vehicles that use pooled funds to employ various strategies to generate high returns.
Hedge funds are privately owned and managed investment funds
They use a variety of investment strategies such as long-short equity, global macro, and event-driven
They are typically only available to accredited investors due to their high-risk nature
Components of financial statements include balance sheet, income statement, and cash flow statement
Q21. Prove that for N>= a, N> N^.5 + N^(1/3)+N^(1/4)
Prove N>=N^.5+N^(1/3)+N^(1/4) for N>=a
Use AM-GM inequality
Substitute N with a and prove the inequality holds
Use calculus to find the minimum value of the expression
Q22. Number of inversions in an array in O(nlogn) time?
Number of inversions in an array in O(nlogn) time.
Use merge sort algorithm to count inversions
Divide the array into two halves and recursively count inversions
Merge the two halves and count split inversions
Time complexity is O(nlogn)
Q23. Write a sorting algorithm in detail.
Sorting algorithm organizes data in a specific order.
Choose a sorting algorithm based on the data size and type.
Common sorting algorithms include bubble sort, insertion sort, and quicksort.
Implement the chosen algorithm in code.
Test the algorithm with sample data to ensure it sorts correctly.
Q24. Current CTC, Expected CTC, total years of expeience
Current CTC, Expected CTC, total years of experience are common questions in job interviews to gauge candidate's salary expectations and experience level.
Current CTC refers to the candidate's current salary or compensation package.
Expected CTC is the salary or compensation package the candidate is looking for in the new role.
Total years of experience includes all relevant work experience in the field.
It is important to be honest and realistic when discussing current and expec...read more
Q25. Explain each line item on resume
Explaining each line item on a resume
Provide a brief overview of each job position, including responsibilities and achievements
Explain any relevant education or certifications
Discuss any relevant skills or qualifications
Include any volunteer work or extracurricular activities that demonstrate relevant experience
Q26. Tell about one known AS
Ankylosing spondylitis (AS) is a type of arthritis that primarily affects the spine.
AS causes inflammation in the vertebrae, leading to pain and stiffness in the back and neck.
It can also cause inflammation in other joints, such as the hips and shoulders.
AS is more common in men than women and typically starts in early adulthood.
Treatment for AS includes medication, physical therapy, and exercise to improve flexibility and strength.
Q27. Explain different option strategies
Options strategies involve buying or selling options contracts to achieve specific investment goals.
Some common options strategies include covered calls, protective puts, straddles, and iron condors.
Covered calls involve selling call options on a stock you own to generate income.
Protective puts involve buying put options to protect against a decline in the value of a stock.
Straddles involve buying both a call and a put option on the same stock with the same expiration date.
Ir...read more
Q28. Explain CDS and credit risk
CDS stands for Credit Default Swap, a financial derivative used to transfer credit risk between parties.
CDS is a type of insurance contract where one party pays a premium to another party in exchange for protection against a credit event, such as default or bankruptcy.
The buyer of a CDS makes periodic payments to the seller, who agrees to compensate the buyer in the event of a credit event on a specified reference asset.
CDS can be used by investors to hedge against the risk o...read more
Q29. Explain option strategies
Options strategies involve buying and selling options contracts to achieve specific investment goals.
Buy Call Option: Bullish strategy where investor expects the price of the underlying asset to rise.
Buy Put Option: Bearish strategy where investor expects the price of the underlying asset to fall.
Covered Call: Selling a call option while holding the underlying asset to generate income.
Straddle: Buying both a call and put option with the same strike price and expiration date t...read more
Top HR Questions asked in NK Industrial Services pvt ltd
Interview Process at NK Industrial Services pvt ltd
Top Analyst Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month