Societe Generale Global Solution Centre
20+ Medusind Solutions Interview Questions and Answers
Q1. Spiral Matrix Path Problem
You are provided with a two-dimensional array named MATRIX
of size N x M, consisting of integers. Your task is to return the elements of the matrix following a spiral order.
Input:
Th...read more
Implement a function to return elements of a matrix in spiral order.
Iterate through the matrix in a spiral order by adjusting boundaries as you move along.
Keep track of the direction of movement (right, down, left, up) to traverse the matrix correctly.
Handle edge cases like when the matrix is a single row or column separately.
Q2. Common Elements Between Array of Strings Problem Statement
Given two 1-dimensional arrays containing strings of lowercase alphabets, determine and return the elements that are common in both arrays, i.e., the s...read more
Given two arrays of strings, find and return the common elements in the order they appear in the second array.
Iterate through the strings in the second array and check if they exist in the first array.
Maintain a set to keep track of common elements to avoid duplicates.
Return the common elements as a single space-separated string in the order they appear in the second array.
Q3. Cube of Matrix Problem Statement
Given a 2D array 'MATRIX' of size M x N, find and return the value (i * i + j * j) for those elements where the sum of the cubes of its digits equals the element itself. Here, '...read more
Given a 2D array, find elements where sum of cube of digits equals element itself and return (i * i + j * j) value.
Iterate through the 2D array and check if the sum of cube of digits equals the element itself.
Calculate (i * i + j * j) for such elements and return the values.
If no such element exists, return -1.
Q4. Decimal to Octal Conversion Problem Statement
Convert a given decimal number into its equivalent octal representation.
Explanation:
The octal number system is a base-8 system, meaning each digit ranges from 0 t...read more
Convert decimal numbers to octal representation.
Iterate through each test case and use built-in functions to convert decimal to octal.
Ensure the output is in base-8 system with digits ranging from 0 to 7.
Handle constraints such as number of test cases and range of decimal numbers.
Q5. What is the difference between SQL and NoSQL? Why MongoDB and not MySQL .
SQL is a relational database while NoSQL is non-relational. MongoDB is preferred for scalability and flexibility.
SQL is table-based while NoSQL is document-based
SQL is structured while NoSQL is unstructured
SQL is vertically scalable while NoSQL is horizontally scalable
MongoDB is preferred for its ability to handle large amounts of unstructured data and its flexibility in schema design
MySQL is preferred for its strong ACID compliance and well-established community support
Q6. What is a linked list ? How does it works in Java ?
A linked list is a linear data structure where each element is a separate object with a pointer to the next element.
In Java, a linked list is implemented using the LinkedList class in the java.util package.
LinkedList class provides methods like add(), remove(), get(), etc. to manipulate the list.
Each element in the list is represented by a node object which contains the data and a reference to the next node.
Linked lists are useful when the size of the list is not known before...read more
Q7. Explain what is a deadlock ?how to avoid it ? What different algorithm are there.
A deadlock is a situation where two or more processes are unable to proceed due to a circular dependency.
Deadlock occurs when two or more processes are waiting for each other to release resources.
To avoid deadlock, use techniques like resource allocation graph, banker's algorithm, and deadlock prevention.
Resource allocation graph is a visual representation of resource allocation and can help identify potential deadlocks.
Banker's algorithm is a resource allocation and deadlock...read more
Q8. What are ACID Properties ?
ACID Properties are a set of properties that ensure database transactions are processed reliably.
ACID stands for Atomicity, Consistency, Isolation, and Durability.
Atomicity ensures that a transaction is treated as a single, indivisible unit of work.
Consistency ensures that a transaction brings the database from one valid state to another.
Isolation ensures that concurrent transactions do not interfere with each other.
Durability ensures that once a transaction is committed, it ...read more
Q9. Coding question - swap 2 numbers without using 3rd variable
Swap 2 numbers without using a third variable
Use bitwise XOR operation to swap two numbers without using a third variable
Example: a = 5, b = 7. a = a XOR b, b = a XOR b, a = a XOR b
Ensure to handle edge cases like swapping same numbers or zero
Q10. what is capital budgeting
Capital budgeting is the process of planning and managing a firm's long-term investments.
Involves evaluating potential investments and deciding which ones to pursue
Considers factors such as cash flows, risks, and returns
Helps in determining the best allocation of resources for maximum profitability
Examples include building a new factory, purchasing equipment, or launching a new product
Q11. what is indices
Indices are statistical measures used to track the performance of a specific group of assets or market.
Indices are used to provide a snapshot of the overall market or a specific sector.
They are often used as benchmarks for investment performance.
Examples include the S&P 500, Dow Jones Industrial Average, and NASDAQ Composite.
Q12. Design Redis cache
Design Redis cache
Redis is an in-memory data structure store
It can be used as a cache to improve performance
Design should consider data eviction policies and cache invalidation strategies
Q13. Explain Clean price and Dirty price
Clean price is the price of a bond excluding accrued interest, while dirty price includes accrued interest.
Clean price is the price of a bond without any accrued interest
Dirty price is the price of a bond including accrued interest
Accrued interest is the interest that has accumulated on a bond since its last coupon payment
Clean price + accrued interest = dirty price
Dirty price is also known as the full or invoice price
Q14. Explain Trade Life Cycle
Trade Life Cycle is the process of a trade from initiation to settlement.
Trade initiation
Order routing
Execution
Confirmation
Clearing and settlement
Trade reporting
Q15. Explain Fixed Income Securities.
Fixed income securities are debt instruments that pay a fixed interest rate over a specific period of time.
Fixed income securities are also known as bonds.
They are issued by governments, corporations, and other entities to raise capital.
Investors receive regular interest payments until the bond matures, at which point they receive the principal amount.
The interest rate on fixed income securities is determined by the creditworthiness of the issuer and the prevailing market int...read more
Q16. Different functions of Investment Bank.
Investment banks perform various functions such as underwriting, M&A advisory, sales and trading, research, and asset management.
Underwriting: helping companies issue securities and managing the process of selling them to investors
M&A advisory: advising companies on mergers and acquisitions
Sales and trading: buying and selling securities on behalf of clients
Research: providing analysis and recommendations on companies and industries
Asset management: managing investment portfo...read more
Q17. Role of Investment Bank
Investment banks help companies and governments raise capital by underwriting and selling securities.
Assist in mergers and acquisitions
Provide financial advisory services
Underwrite and sell securities
Help clients raise capital
Facilitate trading of securities
Examples: Goldman Sachs, JPMorgan Chase, Morgan Stanley
Q18. add two linked list minimum cost path print all the nodes in a tree except the leaf nodes.
The question asks for adding two linked lists, finding the minimum cost path, and printing all nodes in a tree except the leaf nodes.
To add two linked lists, traverse both lists simultaneously and add corresponding nodes.
To find the minimum cost path, use algorithms like Dijkstra's or A*.
To print all nodes in a tree except the leaf nodes, perform a depth-first traversal and print non-leaf nodes.
Q19. Name two authors from the literary movement in France
Gustave Flaubert and Emile Zola are two prominent authors from the literary movement in France.
Gustave Flaubert is known for his novel 'Madame Bovary' which is considered a masterpiece of realism.
Emile Zola is famous for his series of novels called 'Les Rougon-Macquart' which explores the impact of heredity and environment on characters.
Q20. Square root of a number in log n time
Using binary search, square root of a number can be found in log n time.
Choose a range for the square root
Use binary search to find the square root within the range
Adjust the range based on whether the guess is too high or too low
Q21. Culture difference between india and France
India and France have significant cultural differences in terms of language, cuisine, traditions, and social norms.
Language: India has hundreds of languages and dialects, while France primarily speaks French.
Cuisine: Indian cuisine is known for its use of spices and vegetarian dishes, while French cuisine is famous for its cheeses, wines, and pastries.
Traditions: India has a rich history of festivals and rituals, while France is known for its art, fashion, and literature.
Soci...read more
Q22. Difference between python and java
Python is dynamically typed, interpreted language while Java is statically typed, compiled language.
Python is easier to learn and write code quickly.
Java is more verbose and requires more code to accomplish the same task.
Python is better suited for scripting and rapid prototyping.
Java is better suited for large-scale enterprise applications.
Python has a larger community and more third-party libraries.
Java has better performance and is more secure.
Python is used for data scien...read more
Top HR Questions asked in Medusind Solutions
Interview Process at Medusind Solutions
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month