Category: math
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 …
Given an integer n, return the number of trailing zeroes in Factorial N! Your solution should be in logarithmic time complexity. Naive/Bruteforce Solution It is easy to get the …