In this problem, we are given N ranges. Our task is to maximum occurred integer in n ranges.For the starting and ending value of all ranges. We need to find the value which occurs the most.Let’s take an example to understand the problem, Input S1 = 1, E1 = 3 S2 = 2, E2 = 6 S3 = 3, E3 = 4Output 2Solution ApproachA simple approach t o solve the problem is by using hashing, we will use a hash table to count all members and their count. We will traverse all ranges and store count in the hash table, ... Read More
In this problem, we are given an integer value N.Our task is to find the nth term of the series −14, 28, 20, 40, 32, 64, 56, 112….Let’s take an example to understand the problem, InputN = 6Output64Solution ApproachTo find the Nth term of the series we need to find the general term of the series. For which we need to observe the series closely. I can see two different ways to solve the series.Method 1The series is a mixture of two different series at even and odd positions.At odd positions − 14, 20, 32, 56, ….T1 = 14 T3 ... Read More
In this problem, we are given an integer value N. Our task is to use a C + + program to find the Nth Non Fibonacci Number.Fibonacci Series generates subsequent number by adding two previous numbers. The Fibonacci series starts from two numbers − F0 & F1. The initial values of F0 & F1 can be taken 0, 1 or 1, 1 respectively.Let’s take an example to understand the problem, Input N = 5Output 10Solution ApproachA simple solution to the problem is to find the Fibonacci numbers and then print the first n numbers which are not present in the ... Read More
In this problem, we are given a binary matrix where elements of each row are sorted. Our task is to find the row with maximum number of 1s.Let’s take an example to understand the problem, Inputmat[][] = {{ 0 1 1 1} {1 1 1 1} {0 0 0 1} {0 0 1 1}}Output1ExplanationThe count of 1’s in each row of the matrix : Row 0 : 3 Row 1 : 4 Row 2 : 1 Row 3 : 2Solution ApproachA simple solution to the problem is by finding the row with the smallest index of the ... Read More
Power FactorThe cosine of angle between voltage and current in an AC circuit is called the power factor of the circuit. In other words, the power factor is defined as the ratio of active power to the apparent power in the circuit, i.e., $$\mathrm{\mathrm{Power\: factor, }\:\mathrm{cos}\:\phi \:=\:\frac{\mathrm{Active\: power\: (in\: Watts)}}{\mathrm{Apparent\: power \:(in\: VA)}}}$$Where, $\phi$ is the power factor angle.In an AC circuit, there may be a phase difference ($\phi$) between voltage and current. The term cos $\phi$ is called the power factor of the circuit.When the given circuit is inductive, then the current lags behind the voltage and the power ... Read More
Connected LoadThe connected load is defined as the sum of continuous ratings of all the equipment connected to the electrical power station.An electric power station supplies the power to thousands of consumers. Each consumer has certain equipment in his premises. The sum of the continuous ratings of all the equipment in the consumer’s premises is the connected load of the consumer. The sum of the connected loads of all the consumers is called the connected load to the power station.Average LoadThe average load on a power station is defined as the average of loads occurring on the power station in ... Read More
A power plant converts one form of energy (for example, hydro, thermal, nuclear, etc.) to electrical energy. We can broadly classify the power plants as follows −Thermal Power PlantHydroelectric Power PlantNuclear Power PlantDiesel Power PlantIn addition, there can be other types of power plants such as Solar Power Plant and Wind Power Plant, but these type of power plants are so far insignificant in terms of capacity and utilization.In this article, we will compare and contrast the different attributes of thermal, hydroelectric, nuclear, and diesel power plantsThermal Power PlantA Thermal Power Plant is a generating station which converts heat energy ... Read More
The electric power can be transmitted either by using AC transmission system or DC transmission system. Each transmission system has its own advantages and disadvantages. Therefore, to choose the right system for electric power transmission, we need to compare the two systems.The following table compares and contrasts the AC transmission system and DC transmission system based on different parameters −ParameterAC Transmission SystemDC Transmission SystemDefinitionAn electric power transmission system that uses alternating current to transmit the power is called the AC transmission system.An electric power transmission system which transmits the electric power in the form of DC supply, is called the ... Read More
Cost of Electrical EnergyThe cost of electrical energy generated can be divided into three parts, viz −Fixed CostSemi-Fixed CostOperating or Running CostFixed Cost of Electrical EnergyThe cost of electrical energy generated which is independent of the units generated and the maximum demand, is known as fixed cost.The fixed cost of electrical energy is mainly due to the annual cost of central organisation, interest on capital cost of land and the salaries of high officials. The annual cost of the central organisation and the salaries of high officials is fixed, it is because, it has to be met whether the power ... Read More
Demand FactorThe demand factor of an electric power station is defined as the ratio of maximum demand on the power station to its connected load, i.e., $$\mathrm{Demand \:Factor\:=\:\frac{Maximum\: Demand}{Connected \:Load}}$$Generally, the value of demand factor is less than 1. It is because the maximum demand on the power station is usually less than the connected load to the power station. The knowledge of demand factor is important in determining the capacity of equipment of the power plant.Numerical Example (1)A generating station has a connected load of 50 MW and a maximum demand of 30 MW. Determine the demand factor of ... Read More