Problems with India’s Education System



My neighbor’s child, a 13 year old in her most formative years of education had a computer science exam a few days back. She came to our home to prepare as the parents had a wedding to attend. Seeing her all perplexed, I came in to help. I asked her questions, such as what is a cell in a spreadsheet?. Closing her eyes, trying to regain from her last 2 hours effort of learning; in the most parrot-fashion there is, she muttered hastily, “A cell in a spreadsheet is a..”. It took her a few more attempts after which she finally was able to spit the whole definition, “A cell is the intersection between a row and a column on a spreadsheet”. I was a little unsettled after seeing her journey to the answer. Being a topper of her class comes with the expectations of her being a rational and a logical student. I then went deeper with the question, asking her to explain to me where a cell or a spreadsheet was used. Upon her silence, I tried to probe the cause of such an apathy. Her statement in defence stood that she didn’t have many practical classes. Sadly, this is the sorry state of one of the most renowned centrally funded schools of our country.

The present scenario of the state of schools in our country shows a uniformity in the learning pattern. Every kid receives the same textbooks, and gets the same notes. But how then do we grade our students? In order to do this, the country follows a uniform system of education which primarily aims at imparting basic education to the great 41 percent of our population. We believe that students need to be brought to the same footing across the country so that they have an equal shot at the life that awaits them. But in doing so, we try to measure the capabilities of every student with the same yardstick, forgetting the niche of every student.

The recent upsurge in the number of students who score 90% and above in boards, and not an equal one when it comes to their employability, goes on to reveal the nuances of the system that rote-learning has been successful in producing. Question papers are designed in such a way that any student having decent rote-learning capabilities can score well. Hence, there is a very limited motivation for the students to dive deeper in the subject. The propensity of their parents in wanting them to finish at the podium only worsens the case.

School years are the time when we can make our kids fearless in exploring. We can pick their curiosity and help them in stretching it to the extents of the Universe. Also, the roles of teachers in the schools are so strictly defined that even a hint of difference between what is taught to the children and the doubts that occur to them is almost always ignored and left under appreciated.

The definition of education in India is restricted to a handful of subjects and the appreciation for kids in fields other than those is lowly applauded. It doesn’t matter if it’s a Kathak queen or a Violin prodigy; all of them are only encouraged to score well in the 10th and prepare to become a Doctor, another engineer or the white collared Chartered Accountant.

To build a strong nation, it is required for it to have a solid foundation. For a country which has its 2/5th population under 18, it becomes imperative that a rightful methodology is placed in the education system. This 41% of India will define where our country ranks itself on the social, economical, political and scientific fronts for the century to come. As Mahatma Gandhi once said, “what is really needed to make democracy function is not knowledge of facts, but right education”.


How are Bitcoin profits taxed?


India now accounts for about 10% of the global trade in Bitcoin. It is quite interesting to note that even though the Indian government has not granted recognition to the cryptocurrency, it has also not declared it to be illegal.

Use of Bitcoin has witnessed an upsurge in India. This can be attributed to many factors. We have a large number of people whose curiosity has prompted them to ‘try’ dealing with Bitcoins to know what the fuss is all about. Another section includes the freelancers of this generation; who are taking up projects of their interest, across continents. In this case, bitcoin acts as a uniform currency. Due to its decentralised and non-regulated nature, it is the quickest and the easiest way to make payments.

But being an Indian citizen (and a responsible one!), it becomes imperative to understand what happens to the wealth accumulated. This also becomes extremely necessary in the wake of people making profits that are more than 1000 times their investments. How vocal is the regulatory framework about accumulation of such wealth?

The Income Tax Laws in India provide for 5 basic heads for a citizen to pay their tax under. A division of such heads has been done so beautifully, that it tries to never leave a scope for anyone to take advantage of tax laws. The 5 heads are:

  1. Income from house property;
  2. Income from salary;
  3. Income from capital gain;
  4. Income from business or profession;
  5. Income from other sources.

The 5th head, i.e. income from other sources is the savior here. In case of any confusion about what head should a wealth be declared under, this section serves as the solution.

When it comes to bitcoins, we can imagine 4 scenarios of their origin and how they can be taxed in each of those :

Exhibit A : When you have mined Bitcoins yourself

So out of sheer curiosity you decided to employ your processors to mine bitcoin? By logic, since you mined them yourself, these should technically fall under the category of self generated capital assets. And should you choose to sell them off, you are going to amass capital gains. This would require you to define the cost of acquisition of your property, i.e. Bitcoin. But since you generated this yourself, it doesn’t fall within the purview of the law, as under Section 55 of the Income Tax Act, 1961.

What this means: Capital gains tax doesn’t arise on the mining of bitcoins.

What you can do: Till the time there is no concrete provision, you can list your Bitcoin wealth, as income from other sources (the 5th head.)

Exhibit B : When you’ve held Bitcoins as an investment
Investment in bitcoin has seemed to be the safer idea for the lot who doesn’t have direct access to buying bitcoin. With the fluctuations in the price of Bitcoin, investment in this cryptocurrency has become a very lucrative way to earn profits from the difference in prices of Bitcoin as a result of market fluctuations. It is in this case that tax on bitcoin will come under the 3rd head, i.e. “income from capital gain.”

Investments are either long term or short term. The dividing line for investments in Bitcoin is 3 years :

  1. If the period for which you are holding your bitcoin is more than 3 years, the investment is long term. In this case, you shall be charged 20% tax. The benefit of indexation will be applicable as per the Income Tax Act, 1961.
  2. If the period for which you are holding your bitcoin is less than 3 years, the investment is short term. In this case, you shall be taxed at the individual slab rate.

Exhibit C : Trading in Bitcoin
Who is a Bitcoin trader? The definition is absent in Income Tax Act, 1961. The layman’s definition of a bitcoin trader is someone who frequently trades in Bitcoin, in such a way that it almost looks like this is his business or profession.

What you can do: In case you’re a trader of bitcoin, you shall be taxed under the head “income from business or profession,” until some more clarity is provided by the Indian government with regard to their stance on taxability of Bitcoin.

Exhibit D : When Bitcoin is received as a Payment/Consideration
Let’s understand what is meant by consideration. Say, I really liked a pen in the shop. The pen costs Rs. 100. But I have only Rs. 10. I really want to buy the pen, and I want to go home and get the money and come back and take this pen. I can give Rs. 10 to the shopkeeper, as consideration, in return for a promise that he would not sell this pen to anybody else until I come back.
In some cases Bitcoin can be received as a payment or consideration. In this case, the cryptocurrency would be treated as regular currency. So the payment or consideration that you have received in return for your services, would be taxed under “income from business or profession.”

With subsequent clarity in tax laws, the ambiguity shall resolve and it will become easier to pay taxes for cryptocurrencies.

Hedge Funds v/s Mutual Funds


Recent efforts by the Indian government to weed out black money from the economy and increase the tax base have called for a paradigm shift in the way people in India choose to save their money. The pumping out of cash from the economy has brought the citizen to a point where he is considering alternative investment options to save his money. This has led to an increase in the number of people who are now investing in the securities and derivative market. With a boom in the stock market over the past year, people are now more inclined to invest in securities, while carefully trying to avoid losses. It is the success of these markets that Long term capital gain tax found its way into the Budget announcement in February this year.

What are Hedge Funds and Mutual Funds?
Hedge funds and Mutual Funds are investment funds made by the fund management companies. The aim of these is to generate profits by investing in more than single entity i.e. through a diversified portfolio.

How do they work?
Investment from different parties gets pooled into a single portfolio. Both (Hedge Funds and Mutual Funds) of these play the stock, invest in land, real estate, currencies and derivatives in order to have high capital gains. They decide upon different investment options with the will of maximising the profits and create a single portfolio out of it.

What are the differences between Hedge Funds and Mutual Funds?
Hedge Funds are regulated by SEBI and are registered under SEBI, Alternative Investment Funds Regulation 2012. A Hedge Fund should have a minimum corpus of Rs. 20 Crores and minimum investment of Rs 1 Crore by each investor or member of the fund.
Whereas, Mutual Funds are regulated under Securities and Exchange Board of India (Mutual Funds) Regulations, 1996. A firm interested in opening Mutual Funds must register as trusts under the Indian Trusts Act, 1882 and set up a separate Asset Management Company, with the net worth of the parent company / AMC be amounting to at-least Rs 5 Crores.

Hedge Funds may at times be only available to a list of high profiled businesses and individuals. They are entrusted with total autonomy and are are allowed to take key decisions at all times. This luxury is not available to the Mutual Fund investors. Owing to the low budget nature of their clients, they are required to be more cautious.

When it comes to liquidity, hedge funds are somewhat stricter. One cannot withdraw their shares whenever they want to. There is a lockup period, during which one cannot withdraw their stake. In the case of mutual funds, one can withdraw their funds whenever they want to.

In the light of recent developments in the Indian securities ecosystem, hedge funds and mutual funds serve as lucrative investment options for corporates and public alike.


Invert a Binary Tree

What makes this question special is this tweet.

He questions the interview process, I am with him. But whatever it is, it is.

Question : Invert a binary tree. Return the root of the inverted tree.

   /   \
  2     7
 / \   / \
1   3 6   9
   /   \
  7     2
 / \   / \
9   6 3   1

 I would request you to change tabs or minimize your browser and give a good 30-40 minutes before seeing the solution.

Solution :-
As you can see in the example, all nodes have their siblings inverted or swapped! So we can recursively swap siblings for every node. But we cannot do it in one function, hence using another function to do the recursion work is required.

void inv(TreeNode* root){

    swap(root->left, root->right);


TreeNode* Solution::invertTree(TreeNode* root) {
    return root;

The Time Complexity : O(n)
, since each node is visited once. Here n is the number of nodes.
The Space Complexity : O(h), as this many function calls will be put on the stack in the worst case, here h is the height of the binary tree. h ∈ O(n)

The full working code is available at Github, you can star the repository to get updates. I am also maintaining an Interview-Question-Wiki, kindly star and contribute. You can also follow this blog for more such posts. Comment in your queries, report bugs, discuss!:)

Data structures and algorithms practice resources

Data Structure and Algorithms resource guide.


Here are the sites I have experience with and my thoughts

  • LeetCode is excellent because there are many problems and explanations. Furthermore the problems without explanations have answers and commented solutions in the discussion boards. It is the best online judge in my (limited) experience.
  • Code Wars is fun and great for learning a specific language and its features, i.e. JavaScript. But I did not find it as valuable for algorithms.
  • Cracking the Coding Interview has many questions and detailed answers in Java.
  • Data Structures and Algorithms Made Easy in Java is excellent. Sure there are many, many, many typos. But it has so many code samples for each of the data structures, explanations from worse (brute force) to best (optimized) along with advantages and disadvantages of the many possible solutions.

An honorable mention goes to Free Code Camp. The first time I ever had fun solving code challenges…

View original post 35 more words

Compare Versions


Given two strings which represent different version releases of a software, print -1, 1 or 0 depending on the order of the releases.

If version1 was released after version2 print 1,
If version1 was released before version2 print -1,
otherwise print 0.

Assumptions granted : Strings may only contain digits and the ‘.'(dot) character and must contain atleast 1 character.

The ‘.’ character does not represent a decimal point and is used to separate number sequences.
For instance, 2.5 is not “two and a half” or “half way to version three”, it is the fifth second-level revision of the second first-level revision.

Here is an example of version numbers ordering:
0.1 < 1.1 < 1.2 < 1.13 < 1.13.4

version number such as 1, 01, 1.0 are equivalent.

I would request you to change tabs or minimize your browser and give a good 30-40 minutes before seeing the solution.

This is a basic implementation based question, the only thing to take care about is the sequence of 0’s that may crept in after a dot.

WordPress is not rendering the code properly so kindly check out the code here on github.

Time Complexity   : O(n), where n is the sum of the lengths of the 2 versions.
Space Complexity  : O(n), where n is the sum of the lengths of the 2 versions.

It can also be done with the space complexity of O(1), with the help of substr function, left as an exercise. 

You can follow this blog for more such posts. Comment in your queries, report bugs, discuss! 🙂

Step by step Kaggle competition tutorial

A clean and concise guide to Data Science.


Kaggle is a Data Science community where thousands of Data Scientists compete to solve complex data problems.

In this article we are going to see how to go through a Kaggle competition step by step.

The contest explored here is the San Francisco Crime Classification contest. The goal is to classify a crime occurrence knowing the time and place it happened.

Screenshot from 2016-04-10 10:06:15.png

View original post 916 more words