Engaged employer
Write a function that would calculate a Pascal triangle element, given its coordinates.
Anonymous
Generally Pascal's triangle is considered to be 0-indexed, as it is based on combinations. public long Pascal(long n, long r) { if (r > n || r n) return Pascal(n, n - r); if (r == 0) return 1; return n * Pascal(n - 1, r - 1) / r; }
Check out your Company Bowl for anonymous work chats.