20 people like it.
Like the snippet!
Returns the pascal triangle in a 2D list . This snippet computes rows translating the 'visual' method taught at school into Lists and the usage of map2 function. It takes almost 5 seconds to compute 5000 rows.
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: |
|
| Link: | http://fssnip.net/2Y |
| Posted: | 14 years ago |
| Author: | Horacio Nuñez |
| Tags: | math , pascal , algorithms , lists |