Arcesium
100+ Genpact Interview Questions and Answers
Q1. Connecting Ropes with Minimum Cost
You are given 'N' ropes, each of varying lengths. The task is to connect all ropes into one single rope. The cost of connecting two ropes is the sum of their lengths. Your obj...read more
Q2. Determine the Left View of a Binary Tree
You are given a binary tree of integers. Your task is to determine the left view of the binary tree. The left view consists of nodes that are visible when the tree is vi...read more
Q3. Topological Sort Problem Statement
Given a Directed Acyclic Graph (DAG) consisting of V
vertices and E
edges, your task is to find any topological sorting of this DAG. You need to return an array of size V
repr...read more
Q4. BST to Greater Tree Problem Statement
Given a binary search tree (BST) with 'N' nodes, the task is to convert it into a Greater Tree.
A Greater Tree is defined such that every node's value in the original BST i...read more
Q5. Ninja and Binary String Problem Statement
Ninja has a binary string S
of size N
given by his friend. The task is to determine if it's possible to sort the binary string S
in decreasing order by removing any num...read more
Q6. Minimum Operations to Equalize Array
Given an integer array ARR
of length N
where ARR[i] = (2*i + 1)
, determine the minimum number of operations required to make all the elements of ARR
equal. In a single opera...read more
Q7. Bottom View of Binary Tree
Given a binary tree, determine and return its bottom view when viewed from left to right. Assume that each child of a node is positioned at a 45-degree angle from its parent.
Nodes in...read more
Q8. Maximum Meetings Problem Statement
Given the schedule of N meetings with their start time Start[i]
and end time End[i]
, you need to determine which meetings can be organized in a single meeting room such that t...read more
Q9. N-th Node From The End Problem Statement
You are provided with a Singly Linked List containing integers. Your task is to determine the N-th node from the end of the list.
Example:
Input:
If the list is (1 -> -2...read more
Q10. Serialize and Deserialize Binary Tree Problem Statement
Given a binary tree of integers, your task is to implement serialization and deserialization methods. You can choose any algorithm for serialization and d...read more
Q11. Spiral Order Traversal of a Binary Tree
Given a binary tree with N
nodes, your task is to output the Spiral Order traversal of the binary tree.
Input:
The input consists of a single line containing elements of ...read more
Q12. Number of Islands Problem Statement
You are given a non-empty grid that consists of only 0s and 1s. Your task is to determine the number of islands in this grid.
An island is defined as a group of 1s (represent...read more
Q13. Optimize Memory Usage Problem Statement
Alex wants to maximize the use of 'K' memory spaces on his computer. He has 'N' different document downloads, each with unique memory usage, and 'M' computer games, each ...read more
Q14. Count Subarrays with Sum Divisible by K
Given an array ARR
and an integer K
, your task is to count all subarrays whose sum is divisible by the given integer K
.
Input:
The first line of input contains an integer...read more
Multitasking in Java can be achieved using threads.
Create multiple threads to execute tasks concurrently.
Use the Thread class or the Runnable interface to define the tasks.
Use synchronization mechanisms like locks or semaphores to coordinate access to shared resources.
Java provides built-in support for multitasking with the Thread class and the Executor framework.
Example: creating two threads to perform different tasks simultaneously.
Q16. What is the duration of the bond & explain its use?
The duration of a bond is the time until it reaches maturity. It is used to determine the bond's sensitivity to interest rate changes.
Duration is measured in years and can range from a few months to several decades
Longer duration bonds are more sensitive to interest rate changes than shorter duration bonds
Duration is an important factor to consider when investing in bonds
For example, a 10-year bond with a duration of 8 years will decrease in value by approximately 8% if inter...read more
ACID properties are a set of properties that guarantee reliability and consistency in database transactions.
ACID stands for Atomicity, Consistency, Isolation, and Durability.
Atomicity ensures that a transaction is treated as a single unit of work, either all of its operations are executed or none.
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 ...read more
A transaction is a logical unit of work that consists of multiple database operations that must be executed as a single, indivisible unit.
A transaction ensures data consistency and integrity.
It follows the ACID properties: Atomicity, Consistency, Isolation, and Durability.
Transactions are used to maintain data integrity in databases.
Examples of transactions include transferring funds between bank accounts or updating inventory levels.
Design a schema for a restaurant app like Zomato.
Create tables for restaurants, users, reviews, and orders
Include columns for restaurant details like name, address, cuisine type
Include columns for user details like name, email, and password
Link reviews to restaurants and users
Link orders to restaurants and users
Consider additional tables for menu items, categories, and ratings
Q20. Find first missing positive integer from an array for non-negative integers.
Find first missing positive integer from an array of non-negative integers.
Create a hash set to store all positive integers in the array
Loop through the array and add all positive integers to the hash set
Loop through positive integers starting from 1 and return the first missing integer not in the hash set
A semaphore is a synchronization object that controls access to a shared resource through the use of a counter.
Semaphores are used to manage concurrent access to shared resources in multi-threaded or multi-process environments.
They can be used to limit the number of threads or processes that can access a resource simultaneously.
Semaphores can have two types: counting semaphores and binary semaphores.
Counting semaphores allow multiple threads/processes to access a resource at ...read more
SQL databases are relational databases that use structured query language, while NoSQL databases are non-relational databases that use various data models.
SQL databases are based on a fixed schema, while NoSQL databases are schema-less.
SQL databases are better suited for complex queries and structured data, while NoSQL databases are better for unstructured and semi-structured data.
SQL databases ensure ACID (Atomicity, Consistency, Isolation, Durability) properties, while NoSQ...read more
Q23. What is Equity Swap, black scholes, option pricing, type of risks, what is CAPM
Equity Swap, Black Scholes, Option Pricing, CAPM are all financial concepts related to risk management and investment analysis.
Equity Swap is a financial contract between two parties to exchange cash flows based on the performance of an underlying asset.
Black Scholes is a mathematical model used to calculate the theoretical value of European-style options.
Option Pricing is the process of determining the fair value of an option contract.
Types of risks include market risk, cred...read more
Q24. What is Enterprise value? What is equity value? Can EV value be greater than enterprise value?
EV is the total value of a company, including debt and equity, while equity value is the value of a company's equity only.
Enterprise value (EV) is the total value of a company, including debt and equity. It is calculated by adding the market value of equity, debt, minority interest, and preferred shares, and then subtracting cash and cash equivalents.
Equity value is the value of a company's equity only. It is calculated by multiplying the number of outstanding shares by the c...read more
Q25. Given list of strings group them into distinct anagrams.
Group list of strings into distinct anagrams.
Create a hash table with sorted string as key and list of anagrams as value.
Iterate through the list of strings and add each string to its corresponding anagram list in the hash table.
Return the values of the hash table as a list of lists.
Q26. There's a string s1,s2 and s3. s1 and s2 are divided into n and m parts respectively. check if, after interleaving strings s1 and s2, we get s3 as one of the answers.
Check if after interleaving strings s1 and s2, we get s3 as one of the answers.
Create a recursive function to check all possible interleavings of s1 and s2
Check if the current interleaving matches s3
Return true if a valid interleaving is found, false otherwise
Q27. What is nifty? How many companies are listed in NSE, BSE?
Nifty is a stock market index of National Stock Exchange (NSE) comprising of 50 actively traded companies.
Nifty is short for National Stock Exchange Fifty
It is a benchmark index for Indian equity market
The companies listed in NSE and BSE are constantly changing
As of 2021, there are 50 companies listed in Nifty and over 5000 companies listed in BSE
Some of the companies listed in Nifty are Reliance Industries, HDFC Bank, Infosys, TCS, etc.
Q28. Minimum weight to reach bottom right corner in matrix starting from top left. You can move only down and right.
Minimum weight to reach bottom right corner in matrix starting from top left. You can move only down and right.
Use dynamic programming to solve the problem efficiently
Create a 2D array to store the minimum weight to reach each cell
The minimum weight to reach a cell is the minimum of the weight to reach the cell above and the cell to the left plus the weight of the current cell
The minimum weight to reach the bottom right corner is the value in the last cell of the 2D array
Q29. What are topline and bottom line in Income statement?
Topline refers to revenue or sales, while bottom line refers to net income or profit.
Topline is the first line of the income statement and represents the total revenue or sales generated by a company.
Bottom line is the last line of the income statement and represents the net income or profit after all expenses have been deducted.
Topline and bottom line are important metrics for evaluating a company's financial performance.
For example, a company may have a high topline indicat...read more
Q30. Find least common ancestor of a binary tree.
Find the lowest common ancestor of a binary tree.
Traverse the tree recursively from the root node.
If the current node is null or matches either of the given nodes, return the current node.
Recursively search for the nodes in the left and right subtrees.
If both nodes are found in different subtrees, return the current node.
If both nodes are found in the same subtree, continue the search in that subtree.
Q31. What is Investment banking? Can you name few investment banks?
Investment banking is a type of financial service that helps companies and governments raise capital by underwriting and selling securities.
Investment banks provide services such as mergers and acquisitions, securities trading, and asset management.
Examples of investment banks include Goldman Sachs, JPMorgan Chase, and Morgan Stanley.
Investment banking is a highly competitive and lucrative industry, with professionals often working long hours and earning high salaries.
Investm...read more
Q32. What is call and put option and define with examples?
Call and put options are financial contracts that give the buyer the right, but not the obligation, to buy or sell an underlying asset at a predetermined price within a specified time period.
Call option: gives the buyer the right to buy an underlying asset at a predetermined price within a specified time period.
Put option: gives the buyer the right to sell an underlying asset at a predetermined price within a specified time period.
Example of call option: A stock trader buys a...read more
Q33. What is qualitative and quantitative analysis in fundamental analysis?
Qualitative analysis involves subjective evaluation of non-numerical data while quantitative analysis involves objective evaluation of numerical data.
Qualitative analysis involves analyzing factors such as management quality, brand reputation, and industry trends.
Quantitative analysis involves analyzing financial statements, ratios, and other numerical data.
Both types of analysis are important in fundamental analysis as they provide a comprehensive understanding of a company'...read more
Q34. Stock Split, What happens to value of options after stock split?
After a stock split, the value of options will be adjusted based on the new stock price and the split ratio.
Value of options will be adjusted based on the new stock price and the split ratio
Number of options will increase proportionally to the split ratio
Strike price of options will decrease proportionally to the split ratio
Q35. What's the time complexity of insertion in a hashmap?
Time complexity of insertion in a hashmap is O(1).
Insertion in a hashmap has a constant time complexity of O(1) on average.
This is because hashmaps use a hashing function to determine the index where the key-value pair should be stored.
Even in the worst-case scenario, where there are collisions, the time complexity is still O(1) due to techniques like chaining or open addressing.
Example: Inserting a key-value pair into a hashmap takes constant time regardless of the size of t...read more
Q36. Find nearest index of character in string for each index.
Find the nearest index of a character in a string for each index.
Create an array of strings to store the results.
Loop through each character in the string.
For each character, loop through the rest of the string to find the nearest index of the same character.
Store the result in the array.
Q37. What is revenue and how to forecast revenue
Revenue is the income generated by a company through its business activities.
Revenue is the total amount of money earned by a company from the sale of goods or services.
It can be forecasted by analyzing past sales data, market trends, and economic conditions.
Revenue forecasting is important for budgeting, resource allocation, and decision-making.
Factors that can impact revenue include competition, pricing, customer demand, and external factors like government regulations.
Exam...read more
Q38. Effect of Covid global economy and Impact of Covid on eduction?
Covid has severely impacted the global economy and education sector.
The pandemic has caused a significant decline in economic growth and increased unemployment rates worldwide.
Many businesses have shut down, and the stock market has been highly volatile.
The education sector has been forced to shift to online learning, causing disruptions in the learning process and affecting students' mental health.
Many students have been unable to access online education due to a lack of res...read more
Q39. What are the mandatory checks in client position file
Mandatory checks in client position file
Client identification information
Position details including quantity and price
Trade date and settlement date
Margin requirements and collateral
Compliance with regulatory requirements
Accuracy and completeness of data
Q40. Can an Individual set up Mutual fund Company?
Yes, an individual can set up a mutual fund company.
The individual needs to fulfill the eligibility criteria set by SEBI.
They need to have a minimum net worth of Rs. 50 lakhs.
They need to have a team of professionals with relevant experience.
Examples of individuals who have set up mutual fund companies include Radhakishan Damani (D-Mart founder) and Rakesh Jhunjhunwala (investor).
Q41. What is Beta, Required Return, Methods of calculating required return?
Beta is a measure of a stock's volatility, required return is the minimum return an investor expects, methods include CAPM and DDM.
Beta measures a stock's volatility in relation to the market.
Required return is the minimum return an investor expects to compensate for the risk of an investment.
Methods of calculating required return include Capital Asset Pricing Model (CAPM) and Dividend Discount Model (DDM).
CAPM formula: Required Return = Risk-Free Rate + Beta * (Market Return...read more
Q42. Difference between cluster and non-cluster indexing. Do you know about database indexing?
Cluster indexing physically reorders the data on disk to match the index, while non-cluster indexing does not.
Cluster indexing physically reorders the data on disk to match the index structure, leading to faster retrieval of data.
Non-cluster indexing creates a separate data structure that points to the actual data, which may result in slower retrieval times.
Cluster indexing is typically used in primary keys, while non-cluster indexing is used for secondary indexes.
Examples of...read more
Q43. If the price of stock goes down, you buy what type of options
Q45. What is the use of IF function in Excel?
IF function in Excel is used to test a condition and return one value if the condition is true and another value if the condition is false.
IF function is a logical function in Excel
It takes three arguments: logical_test, value_if_true, and value_if_false
Logical_test is the condition that needs to be tested
Value_if_true is the value that is returned if the condition is true
Value_if_false is the value that is returned if the condition is false
IF function is commonly used in fin...read more
Q46. Whose is obligation in options and futures?
The obligation in options and futures lies with the seller or writer of the contract.
In options, the seller has the obligation to sell or buy the underlying asset at the agreed price if the buyer decides to exercise the option.
In futures, the seller has the obligation to deliver the underlying asset at the agreed price and date.
The buyer of options and futures has the right, but not the obligation, to exercise the contract.
The obligation can be transferred to another party th...read more
Q47. 1) Maximum meetings in one room 2)Bottom view of tree 3) Serialize deserialize binary tree 4) Difference between Virtual destructor in java and c++
Interview questions for Software Developer Intern
Maximum meetings in one room can be calculated using greedy approach
Bottom view of tree can be obtained using level order traversal and a map to store horizontal distance
Serialization and deserialization of binary tree can be done using preorder traversal
Virtual destructor in Java is automatically called while in C++ it needs to be explicitly defined
Q48. Design a app which will bring data from lot of external vendors in different formats
Design an app to bring data from external vendors in different formats
Create a data ingestion pipeline to collect data from various vendors
Implement data transformation processes to standardize formats
Utilize APIs or web scraping techniques to retrieve data from vendors
Use a database to store and manage the collected data
Implement data validation and cleansing techniques to ensure data quality
Q49. Hld design on job scheduler, understanding how to create an job scheduler service in distributed system
Q50. Which is better during inflation period, lifo Or fifo
Q51. What is Market Capitalisation?
Market capitalisation is the total value of a company's outstanding shares.
Market capitalisation is calculated by multiplying the current market price of a company's stock by the total number of outstanding shares.
It is used to determine the size of a company and its relative importance in the market.
Companies with higher market capitalisation are generally considered to be more stable and less risky investments.
For example, as of August 2021, Apple Inc. had a market capitali...read more
Q52. How to achieve multitasking in java
Multitasking in Java can be achieved through multithreading.
Create a new thread using the Thread class or Runnable interface
Use the start() method to start the thread
Synchronize shared resources to avoid race conditions
Use wait() and notify() methods for inter-thread communication
Example: creating a thread to perform a long-running task while the main thread continues executing other tasks
Q53. binary search how would u search a name in a directory how would u optimize this
Q54. how is bond prices related to interest rates
Bond prices and interest rates have an inverse relationship.
When interest rates rise, bond prices fall.
When interest rates fall, bond prices rise.
This is because existing bonds with lower interest rates become less attractive compared to new bonds with higher rates.
Investors demand a discount on existing bonds to match the higher rates available on new bonds.
Q55. Difference b/w Bonus issue and stock split
Bonus issue is free shares given to existing shareholders while stock split is dividing existing shares into multiple shares.
Bonus issue increases the number of shares outstanding while stock split does not
Bonus issue is usually done to reward shareholders while stock split is done to make shares more affordable
Bonus issue does not affect the market capitalization while stock split does
Example of bonus issue: Infosys gave 1:1 bonus issue in 2018
Example of stock split: Apple d...read more
Q56. 1.Desgin Schema for restaurant apps like zomato.
Design a schema for a restaurant app like Zomato.
Create tables for restaurants, menus, reviews, and users.
Include columns for restaurant name, location, cuisine, and ratings.
Add columns for menu items, prices, and descriptions.
Include user information such as name, email, and password.
Create relationships between tables using foreign keys.
Implement search and filter functionality for restaurants and menus.
Allow users to leave reviews and ratings for restaurants.
Include featur...read more
Q57. Acid test ratio and ideal acid test ratio?
Acid test ratio measures a company's ability to pay off its current liabilities with quick assets. Ideal ratio is 1:1.
Acid test ratio is also known as quick ratio.
It excludes inventory from current assets as it may not be easily convertible to cash.
An ideal acid test ratio is considered to be 1:1, which means the company has enough quick assets to pay off its current liabilities.
A ratio below 1:1 indicates that the company may have difficulty paying off its current liabilitie...read more
Q58. Difference between preferential and equity shares?
Preferential shares have priority over equity shares in terms of dividend payment and liquidation proceeds.
Preferential shares have a fixed dividend rate, while equity shares do not.
Preferential shareholders have priority over equity shareholders in receiving dividend payments.
In case of liquidation, preferential shareholders have priority over equity shareholders in receiving proceeds.
Preferential shares are less risky than equity shares.
Examples of preferential shares inclu...read more
Q59. Mandatory fields to check the bond income in Bloomberg
Mandatory fields to check bond income in Bloomberg
To check bond income in Bloomberg, mandatory fields to be checked are bond identifier, coupon rate, maturity date, and price.
The bond identifier can be ISIN, CUSIP, or Bloomberg ticker.
Coupon rate is the interest rate paid by the bond issuer to the bondholder.
Maturity date is the date when the bond will be redeemed.
Price is the current market price of the bond.
Other optional fields to check are yield, credit rating, and durati...read more
Q60. What is depreciation and amortization?
Depreciation is the decrease in value of an asset over time, while amortization is the process of spreading out the cost of an intangible asset over its useful life.
Depreciation is used for tangible assets like buildings, machinery, and vehicles.
Amortization is used for intangible assets like patents, copyrights, and trademarks.
Both are non-cash expenses that reduce the value of an asset on the balance sheet.
Depreciation and amortization are important for calculating a compan...read more
Q61. What is wealth and asset management
Wealth and asset management involves managing and growing an individual's or organization's financial assets.
Wealth management focuses on managing high net worth individuals' assets and investments.
Asset management involves managing a portfolio of assets, such as stocks, bonds, and real estate, to maximize returns.
Both wealth and asset management involve developing investment strategies, monitoring performance, and making adjustments as needed.
Examples of wealth and asset man...read more
Q62. Explain capital, primary and secondary market?
Capital is money used to start or grow a business. Primary market is where new securities are issued. Secondary market is where existing securities are traded.
Capital is the money used to start or grow a business.
Primary market is where new securities are issued for the first time, such as initial public offerings (IPOs).
Secondary market is where existing securities are traded, such as stocks and bonds.
Investors buy securities in the primary market and sell them in the second...read more
Q63. What are cash and non cash expenses
Cash expenses are payments made in cash, while non-cash expenses are expenses that do not involve cash payments.
Cash expenses are payments made in physical currency
Non-cash expenses are expenses that do not involve physical currency
Examples of cash expenses include rent paid in cash, cash purchases of supplies, etc.
Examples of non-cash expenses include depreciation, amortization, etc.
Q65. Three important statements in annual report?
Three important statements in annual report are income statement, balance sheet, and cash flow statement.
Income statement shows the company's revenue and expenses over a period of time.
Balance sheet shows the company's assets, liabilities, and equity at a specific point in time.
Cash flow statement shows the company's inflow and outflow of cash over a period of time.
These statements provide important financial information for investors and stakeholders.
For example, the income ...read more
Q66. difference between sql and nosql dbs
SQL is a relational database while NoSQL is a non-relational database.
SQL databases use structured query language while NoSQL databases use unstructured query language.
SQL databases are vertically scalable while NoSQL databases are horizontally scalable.
SQL databases are good for complex queries while NoSQL databases are good for large amounts of unstructured data.
Examples of SQL databases include MySQL, Oracle, and PostgreSQL while examples of NoSQL databases include MongoDB...read more
Q67. What are mergers and acquisitions?
Mergers and acquisitions refer to the consolidation of companies through various financial transactions.
Mergers involve two companies joining together to form a new entity
Acquisitions involve one company purchasing another company
Mergers and acquisitions are often used as a growth strategy for companies
Examples include Disney's acquisition of Marvel, and the merger of Exxon and Mobil
Q68. What is X path?how it is identify?
XPath is a language used to navigate XML documents and identify elements.
XPath is a query language for selecting nodes from an XML document.
It uses path expressions to navigate through elements and attributes.
XPath can be used to locate elements based on their attributes, text content, or position in the document.
It is commonly used in software testing to locate specific elements for verification or manipulation.
Example: //div[@class='container'] selects all div elements with...read more
Q69. Accounting concepts and convenctions definition?
Accounting concepts and conventions are the basic principles and guidelines followed in the preparation of financial statements.
Accounting concepts are the fundamental ideas and assumptions that underlie the preparation of financial statements.
Accounting conventions are the practices and procedures that are generally accepted in the accounting profession.
Examples of accounting concepts include the going concern concept, the accruals concept, and the consistency concept.
Exampl...read more
Q70. What are futures and forward contracts?
Futures and forward contracts are financial agreements to buy or sell an asset at a specified price on a future date.
Futures contracts are standardized and traded on exchanges, while forward contracts are customized and traded over-the-counter.
Both contracts involve an agreement to buy or sell an asset at a predetermined price on a future date.
Futures contracts require daily settlement of gains and losses, while forward contracts settle at the end of the contract period.
Examp...read more
Q71. Difference between stack and heap memory.
Stack memory is used for static memory allocation and follows a Last In First Out (LIFO) structure, while heap memory is used for dynamic memory allocation and has a more flexible structure.
Stack memory is limited in size and is typically faster to access compared to heap memory.
Variables stored in stack memory have a fixed size determined at compile time, while variables in heap memory can have a size determined at runtime.
Stack memory is automatically managed by the system,...read more
Q72. futures and forwards what are custom contracts
Custom contracts in futures and forwards are agreements between two parties that are tailored to meet specific needs or requirements.
Custom contracts allow parties to negotiate terms such as quantity, price, delivery date, and other specifications.
These contracts are not standardized like exchange-traded futures and forwards, making them flexible and customizable.
Examples of custom contracts include over-the-counter (OTC) derivatives and bespoke structured products.
Q73. Find nth node from last in a linked list in one traversal
To find nth node from last in a linked list in one traversal
Use two pointers, one at the head and the other at nth node from head
Move both pointers simultaneously until the second pointer reaches the end
The first pointer will be at the nth node from last
Q74. What is beta of a stock?
Q75. What is Black Scholes Pricing of Derivatives
Black Scholes Pricing of Derivatives is a mathematical model used to calculate the theoretical price of European-style options.
Developed by Fischer Black, Myron Scholes, and Robert Merton in 1973.
Factors in the current stock price, strike price, time to expiration, volatility, risk-free interest rate, and dividends.
Assumes the option can only be exercised at expiration (European-style).
Used to determine the fair market value of options and other derivatives.
Helps investors an...read more
Q76. What is instrinsic value?
Intrinsic value is the true value of an asset based on its fundamental characteristics.
Intrinsic value is not influenced by market fluctuations or emotions.
It is calculated by analyzing the asset's financial and operational data.
For example, the intrinsic value of a stock can be calculated by analyzing its earnings, assets, and liabilities.
Investors use intrinsic value to determine whether an asset is undervalued or overvalued.
Intrinsic value is subjective and can vary depend...read more
Q77. What is conglomerate?
A conglomerate is a company that owns multiple subsidiaries operating in different industries.
Conglomerates are formed through mergers and acquisitions.
They have diversified business interests and operate in multiple sectors.
Examples include Berkshire Hathaway, Tata Group, and Samsung.
Conglomerates can provide economies of scale and risk diversification, but can also be difficult to manage.
They may face challenges in integrating different businesses and maintaining focus.
Q78. What is a stable sort?
A stable sort is a sorting algorithm that preserves the relative order of equal elements in the sorted output.
Stable sorts are useful when the original order of equal elements needs to be maintained.
Examples of stable sorting algorithms include Merge Sort, Bubble Sort, and Insertion Sort.
In a stable sort, if two elements have the same key value, their relative order in the original array is preserved in the sorted array.
Q79. Topological sorting given n jobs find order of deployment of jobs least dependent first
Q80. Design a parking lot
Design a parking lot
Consider the size and capacity of the parking lot
Decide on the layout and organization of parking spaces
Implement a system to manage parking availability and reservations
Include features like ticketing, payment, and security
Consider scalability and future expansion
Q81. Describe complete process of IPO?
IPO process involves several steps from selecting underwriters to listing on stock exchange.
Selecting underwriters
Preparing registration statement
Roadshow and investor presentations
Pricing the IPO
Listing on stock exchange
Post-IPO activities such as reporting and compliance
Q82. Different types of shares?
Shares are units of ownership in a company. Different types of shares include common shares, preferred shares, and dual-class shares.
Common shares give shareholders voting rights and a share in the company's profits.
Preferred shares give shareholders priority in receiving dividends and assets in case of bankruptcy.
Dual-class shares give certain shareholders more voting power than others.
Other types of shares include redeemable shares, voting shares, and non-voting shares.
Comp...read more
Q83. What is derivative?
A financial contract between two parties based on an underlying asset or security.
Derivatives are used to hedge against risk or speculate on future market movements.
Examples include options, futures, swaps, and forwards.
Derivatives can be traded on exchanges or over-the-counter.
They are complex financial instruments that require expertise to understand and use effectively.
Q84. What is Alpha and Beta?
Alpha and Beta are measures of investment performance compared to a benchmark.
Alpha measures the excess return of an investment compared to its benchmark.
Beta measures the volatility of an investment compared to its benchmark.
Alpha and Beta are commonly used in finance to evaluate the performance of investment portfolios.
A positive alpha indicates that the investment outperformed its benchmark, while a negative alpha indicates underperformance.
A beta of 1 indicates that the i...read more
Q85. Missing number in array in 1 to n
Find the missing number in an array of integers from 1 to n.
Create a hash set to store the numbers in the array
Loop through the numbers from 1 to n and check if they are in the hash set
Return the number that is not in the hash set
Q86. what is semaphores?
Semaphores are a synchronization tool used to control access to a shared resource.
Semaphores can be used to prevent race conditions in multi-threaded programs.
They can be used to limit the number of concurrent accesses to a resource.
Semaphores can be binary (0 or 1) or counting (0 to n).
Examples of semaphore functions include wait(), signal(), and init().
Q87. What is the Accounting equation
Q88. How to calculate yield on bond
Yield on a bond can be calculated by dividing the annual interest payment by the current market price of the bond.
Yield on a bond is calculated by dividing the annual interest payment by the current market price of the bond.
The formula for calculating yield on a bond is: Yield = (Annual Interest Payment / Current Market Price) * 100%
For example, if a bond pays $50 in annual interest and is currently priced at $1,000, the yield would be (50 / 1000) * 100% = 5%
Q89. what is transaction?
A transaction is a unit of work that is performed on a database.
A transaction is a sequence of database operations that are treated as a single unit of work.
It ensures that all the operations are completed successfully or none of them are performed.
Transactions are used to maintain data consistency and integrity in a database.
Examples of transactions include transferring money between bank accounts or updating inventory levels in a retail system.
Q90. What is NAV?
NAV stands for Net Asset Value and is the value of a fund's assets minus its liabilities.
NAV is used to determine the price of a mutual fund or exchange-traded fund (ETF).
It is calculated by dividing the total value of the fund's assets by the number of outstanding shares.
NAV is updated at the end of each trading day.
Investors can use NAV to track the performance of their investments and to buy or sell shares of the fund.
For example, if a mutual fund has assets worth $100 mil...read more
Q91. System design scenarios for enough monitoring and alarming
Implementing system design scenarios for monitoring and alarming
Utilize monitoring tools like Prometheus, Grafana, or Nagios to collect and visualize data
Set up alerts based on predefined thresholds for key metrics
Implement a centralized logging system like ELK stack to track system behavior
Utilize distributed tracing tools like Jaeger or Zipkin to monitor request flows
Implement health checks for services to ensure they are running properly
Q92. What is working capital
Working capital is the amount of money a company has available for its day-to-day operations.
Working capital is calculated by subtracting current liabilities from current assets.
It is important for a company to have enough working capital to pay for expenses such as salaries, rent, and inventory.
A positive working capital indicates that a company has enough assets to cover its short-term liabilities.
Examples of current assets include cash, accounts receivable, and inventory.
E...read more
Q93. Topological Sort along with dry run
Topological Sort is a linear ordering of vertices in a directed acyclic graph.
It is used to find a linear ordering of elements that have dependencies.
It is based on the concept of DFS (Depth First Search).
It can be implemented using both DFS and BFS (Breadth First Search).
It is commonly used in scheduling jobs, resolving dependencies, and compiling code.
Example: Topological sorting of courses to take in a college based on prerequisites.
Q94. What is pivot table?
A pivot table is a data summarization tool used in spreadsheet programs like Excel.
It allows users to quickly summarize and analyze large amounts of data.
Users can easily rearrange the table to view data from different perspectives.
Pivot tables can perform calculations such as sums, averages, and counts.
They are commonly used in financial analysis and business reporting.
Example: A pivot table can be used to summarize sales data by product, region, and time period.
Q95. What is DCF?
DCF stands for Discounted Cash Flow, a valuation method used to estimate the value of an investment based on its future cash flows.
DCF takes into account the time value of money, meaning that a dollar received in the future is worth less than a dollar received today.
It involves projecting future cash flows of an investment and discounting them back to their present value using a discount rate.
The resulting present value represents the estimated intrinsic value of the investme...read more
Q96. Impact of stock split on P&L
A stock split does not have any impact on the P&L of a company.
Stock split increases the number of outstanding shares and reduces the share price proportionally.
The total value of the shares remains the same before and after the split.
The earnings per share (EPS) and the price-to-earnings (P/E) ratio change after the split, but not the total earnings or revenue.
Investors may perceive a stock split as a positive signal and the stock price may increase.
Companies may split their...read more
Q97. What is IRR?
IRR stands for Internal Rate of Return, a financial metric used to calculate the profitability of an investment.
IRR is a discount rate that makes the net present value (NPV) of all cash flows from an investment equal to zero.
It is used to compare the profitability of different investments.
A higher IRR indicates a more profitable investment.
IRR can be calculated using Excel or financial calculators.
For example, if an investment has an initial cost of $10,000 and generates cash...read more
Q98. Hashing and collision in hashing
Hashing is a process of converting data into a fixed-size output. Collision occurs when two different inputs produce the same output.
Hashing is used for indexing and retrieving data quickly
Hash functions should be deterministic and produce the same output for the same input
Collisions can be resolved using techniques like chaining or open addressing
Examples of hashing algorithms include MD5, SHA-1, and SHA-256
Q99. Design a 2 player chess game
A 2 player chess game with standard rules and GUI
Implement standard chess rules and moves
Create a GUI for players to interact with the game
Allow players to make moves and track game progress
Incorporate checkmate and stalemate conditions
Implement a timer for each player's turn
Q100. What is hashing?
Hashing is a process of converting input data into a fixed-size string of bytes using a hash function.
Hashing is used to securely store passwords by converting them into a hash value.
Hashing is used in data structures like hash tables to quickly retrieve data based on a key.
Common hash functions include MD5, SHA-1, and SHA-256.
Interview Process at Genpact
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month