nryoung/algorithms — pull request #38 by ConanChou (2013-03-08 07:19:05+00:00)
Title: Fixed the binary tree left and right nodes calculation

The original code works somehow, but it is not logical.

Let's say a length-10 list A, index starts from 0. The left and right node of node `A[1]`(the 2nd node), should be `A[3]` and `A[4]` (they are 1*2+1 and 1*2+2), instead of `A[2]` and `A[3]` (i+1, 1+2).