According to the problem we are given a set arr[n] where n is the number of integer elements in the set, the task is to find the maximum difference elements which are to be added to obtain the elements in the set. In other words, the difference should be in form of |a-b| where 'a' and 'b' both are in the set and their difference should not be the least. So, we will count the maximum number of differences which are distinct and largest from a set. Let's understand the problem and its solution with help of an example.Input − ... Read More
According to the problem we are given a string str, we must count all the substrings in the given string. Substring is a string which is a part of an already existing string whose size may be smaller than or equal to the existing string.Let's understand the problem and its solution with the help of examples.Input − str = "wxyz";Output − count of distinct substring is: 10Explanation − Distinct substrings counted are −wxyz, wxy, wx, w, xyz, xy, x, yz, y, z so their count is 10Input − str = "zzzz"Output − count of distinct substring is: 4Explanation − Distinct ... Read More
The task is to find the greatest difference between the sum of m elements in an array. Suppose we have an array and a number m, then we will first find the sum of highest m numbers and then subtract the sum of lowest m numbers from it to get the maximum difference. So the main thing is to find two subsets of m numbers which have the highest sum and lowest sum.Let’s now understand what we have to do using an example −Input arr = {1, 2, 3, 4, 5} ; m=3Output Maximum difference here is : 6Explanation − Here the ... Read More
We are given a matrix and the task is to find the greatest difference between the sum of elements in two rows of a matrix. Suppose we have a matrix M[i,j] with i rows and j columns. Let the rows be R0 to Ri-1. The difference will be calculated by subtracting the (sum of elements of Ry) - (sum of elements of Rx), where xMD. If it is so, update MD. Else check is RSum[row]
According to International Financial Reporting standards (IFRS), Liabilities are present obligations of the enterprises arising from past events, the settlement of which is expected to result in an outflow from the enterprises of resources embodying economic benefits.In simple words, it is amount owned by the company to the creditors.Classification of liabilities is as follows −Current liabilities − Payment period is less than one year. It is also called as short term liability.Examples − Accounts payable, interest payable, income tax payables, bills payable, bank account overdrafts, accrued expenses, short term loans.Non – current liabilities − Payment period is more than one ... Read More
An asset is a resource which has an economic value which can generate future cash flows. It is owned or controlled by individuals, corporation or a government. Asset can be a property, inventory, trademarks or patents.Based on its liquidity, assets are recorded in the balance sheet in descending order. More the asset is liquid takes more time to convert into cash.Classification of assetsThe assets are classified as follows −ExamplesThe examples of assets as per convertibility are as follows −Currents assets − Cash, cash equivalents, short term deposits, stock, office supplies, marketable securities etc.Non- current assets − Land, building, equipment, machinery, ... Read More
The main difference between accrual base accounting and cash base accounting is as follows −Cash based accountingAccrual based accountingIt is a single entry accounting.Only cash transactions are recognised.Doesn’t recognise account receivables or accounts payable.Useful for small companies.Easy to understand.Focus on liquidity.Not recognised by companies act.Not a holistic approach.Not more accurate.Matching concept can’t be applicable.Low degree of accuracy.Shows lower income in income statement.Doesn’t meet GAAP requirements.Can mislead financial status.It is double entry accounting.Revenue and expenses are recorded irrespective of cash.Commonly used method.Complex and difficult to understand.Recognised by companies act.Focus on revenue, expenses, profit and loss.It has holistic approach.More accurate method.Match concept ... Read More
Cash based accounting means, it records only those transactions relates to cash. That means transactions of revenue and expenses are recorded when payments are made or received through cash only. It is a single entry accounting.It is useful for simple accounting system.It is used, if inventory is to be valued.It is useful, when audit is not necessary.It is useful in services business.Reasons why companies prefer cash based accounting are given below −Single entry accounting.Few financial transactions.Very few employees.Few valuable physical assets.Very few inventory, supplies and cash in bank.Sole proprietorship.Privately held.Legal reporting includes −Supports company’s income tax reporting.Paid government taxes.Forecast future ... Read More
Bookkeeping is keeping the record of business transactions on day to day basis. It includes identifying, measuring and recording of transactions. Bookkeeping is basis of preparing accounting statements. It records below transactions, but not limited to, Payments to suppliers.Loan payments.Invoice payments.Asset depreciation.Generating financial reports.In olden days, that means days before digitalisation. Bookkeeping starts with entries in general ledgers, later in place of general ledgers special ledgers and day books were introduced. Special ledgers are separated ledgers for sales, purchases, cash receipts, cash payments etc. these entries were made on day wise.Likewise, ledgers for sales, rent, wages, loans etc. are maintained ... Read More
Accounting is process of recording financial transactions of a firm. These recordings are classified into assets, liabilities, revenue, expenses, transactions and reporting. Recording the transactions can be done into −System of book keeping.Tracking transactions.Making financial reports.Objectives of accounting are as follows −Maintain records.Utility resources.Profit and loss.Financial position.Decision making.Different types of accounting are as follows −Managerial accounting.Tax accounting.Financial accounting.Auditing.Forensic accounting.Some of the advantages of accounting are as follows −Maintains business records.Decision making.Comparison of results.Valuation of business.Financial statements preparation.Taxation issues.Some of disadvantages are given below −Manipulation of accounts.Based on estimation.May be biased.Only financial nature is measurable.Change in price is not considered.Accounting equation ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP