diff --git a/Easy/Pascals_Triangle.cpp b/Easy/Pascals_Triangle.cpp new file mode 100644 index 0000000..f5ca177 --- /dev/null +++ b/Easy/Pascals_Triangle.cpp @@ -0,0 +1,26 @@ +class Solution { +public: + int ncr(int n,int r) + { int res=1; + for(int i=0;i> generate(int numRows) { + vector>ans; + for(int i=0;itemp; + + for(int j=0;j<=i;j++) + { + temp.push_back(ncr(i,j)); + } + ans.push_back(temp); + } + return ans; + } +}; \ No newline at end of file