Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def pascal(c: Int, r: Int): Int = {
- if (c == 0 || c == r) 1
- else pascal(c - 1, r - 1) + pascal(c, r - 1)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement