Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles on Trending Technologies
Technical articles with clear explanations and examples
Find the number of divisors of all numbers in the range [1, n] in C++
In this problem, we are given a number N. Our task is to find the number of divisors of all numbers in the range [1, n].Let’s take an example to understand the problem,Input : N = 7 Output : 1 2 2 3 2 4 2Solution ApproachA simple solution to the problem is by starting from 1 to N and for every number count the number of divisors and print them.Example 1Program to illustrate the working of our solution#include using namespace std; int countDivisor(int N){ int count = 1; for(int i = 2; i
Read MoreFind the number of different numbers in the array after applying the given operation q times in C++
In this problem, we are given a number N which is the size of an array consisting of all zeros and Q queries each of the following type −update(s, e, val ) -> this query will update all elements from s to e (both inclusive) to val.Our task is to find the number of different numbers in the array after applying the given operation q timesLet’s take an example to understand the problem, Input : N = 6, Q = 2 Q1 = update(1, 4, 3) Q2 = update(0, 2, 4) Output : 2ExplanationInitial array, arr[] = {0, 0, ...
Read MoreFind the number of boxes to be removed in C++
In this problem, we are given an array arr[] in which each element represents a pile of boxes (each of unit height). Our task is to find the number of boxes to be removed.The person is standing at index 0 of the array at the height of the pile of boxes and he needs to move to the end of the array. The condition to move from one pile to the next is by jumping to the next.Jump is possible only when the next pile is at the same height or is at height less than it. If the height ...
Read MoreFind the Nth term of the series 9, 45, 243,1377...in C++
In this problem, we are given an integer value N.Our task is to Find the nth term of the series −9, 45, 243, 1377, 8019, …Let’s take an example to understand the problem,Input : N = 4 Output : 1377Solution ApproachA simple solution to find the problem is by finding the Nth term using observation technique. On observing the series, we can formulate as follow −(11 + 21)*31 + (12 + 22)*32 + (13 + 23)*33 … + (1n + 2n)*3nExampleProgram to illustrate the working of our solution#include #include using namespace std; long findNthTermSeries(int n){ return ( ( (pow(1, n) + pow(2, n)) )*pow(3, n) ); } int main(){ int n = 4; cout
Read MoreFind the nth term of the series 0, 8, 64, 216, 512,... in C++
In this problem, we are given an integer value N. Our task is to find the nth term of the series −0, 8, 64, 216, 512, 1000, 1728, 2744…Let’s take an example to understand the problem, Input: N = 6 Output: 1000Solution ApproachTo find the Nth term of the series, we need to closely observe the series. The series is the cube of even numbers, where the first term is 0.So, the series can be decoded as −[0]3, [2]3, [4]3, [6]3, [8]3, [10]3…For ith term, T1 = [0]3 = [2*(1-1)]3T2 = [2]3 = [2*(2-1)]3T3 = [4]3 = [2*(3-1)]3T4 = [6]3 ...
Read MoreFind the nth term of the given series 0, 0, 2, 1, 4, 2, 6, 3, 8, 4... in C++
In this problem, we are given an integer value N. Our task is to Find the nth term of the given series −0, 0, 2, 1, 4, 2, 6, 3, 8, 4, 10, 5, 12, 6, 14, 7, 16, 8, 18, 9, 20, 10… Let’s take an example to understand the problem, Input − N = 6 Output − 2Solution ApproachTo find the Nth term of the series, we need to closely observe the series. It is the mixture of two series and odd and even terms of the series. Let’s see each of them, At even positions −T(2) = 0T(4) ...
Read MoreWhat is Subsidized Financing?
Companies in many countries, especially developing countries, may need assistance from the government to sustain and grow. The companies in these countries may be provided with reduced interest on the loans they acquire from the market or investors. These reductions are offered by the governments and are known as subsidies.Subsidized FinancingSubsidized financing is a mode of financing in which the interest on the loans for sourced funds are paid partially or completely by the government. The subsidized financing process is a way to help companies grow and achieve efficiency in financing. The subsidy in interests of loans are one of ...
Read MoreWhat is meant by Target Capital Structure?
The ultimate capital structure formed with debt, equity, and preferred debt that a company strives to obtain is known as the target capital structure of a company. The target capital structure of a company is decided depending upon some factors that are related to the financial condition of the company.Usually, companies define their target capital structure by optimizing the values of debt and equity and they make sure that the risk associated with the target capital structure is minimum. The company uses its target capital structure while it raises new capital from the market.Factors that Affect the Target Capital Structure ...
Read MoreWhat are Issue Costs in Corporate Finance?
Issue costs are one-time costs that are incurred while raising funds by debt and equity financing for a project. As the name suggests, every company needs to spend money while issuing securities in the stock exchange. It is incurred while offering the IPOs or raising debt from the market through issuance of securities. Although the issue costs are not ongoing, it may be a significant amount and hence must be accounted for in the Adjusted Present Value (APV) method of evaluation of a project.In legal terms, issue costs may be attached to any kind of cost that is incurred while ...
Read MoreWhat is Levered Beta in Corporate Finance?
Levered beta indicates the systematic risk a stock has in the capital asset pricing model (CAPM). In CAPM, the function of the financial debt versus equity represents the levered beta or equity beta.The debt a company collects from the markets and the equity it has in its reservoir make up the comparison that shows the levered beta of a stock.The debt portion of an investment in a project that has been resourced from the market makes big difference in the financials of the project.If a large amount of debt is used to finance a project, the risks associated with the ...
Read More