Category: math
We all know what rubik cubes. For example, here is a 2×2 rubik cubes and here is a 3×3 rubik cubes. The number of squares of a side for …
Most people requires mortgage to purchase a house (property). You borrow money from the bank and promise to pay back (with interests) within a specified periods e.g. 25 years. …
Given an index k, return the k-th row of the Pascal’s triangle. For example, given k = 3, Return . Could you optimize your algorithm to use only O(k) …
3D vector operations are quite useful and common in the math world, especially when it involves the geometry. The following is a simple class made in PHP that encapsulates …
I wrote these PHP functions to compute matrix determinant for 2×2 and 3×3 matrices long time ago and I share these three simple functions here just in case someone …