Snippets tagged jagged array

  • Pascal's Triangle (2)

    This code sample generates Pascal's triangle as jagged 2D list (list of lists). It takes 0.5 sec to generate 3000 rows (vs 16 sec for http://fssnip.net/23). Tip: try to avoid of using "list1 @ list2" construction.

    13 people like this

    Posted: 6 years ago by Shamil Sayfutdinov