```
class Solution:
# @return a list of lists of integers
def generate(self, numRows):
ans = []
if numRows == 0:
return ans
for i in range(numRows):
t = []
w = 1
for j in range(0, (i+1)/2):
t.append(w)
w = w*(i-j)/(j+1)
if i%2 == 1:
ans.append(t+t[::-1])
else:
ans.append(t+[w]+t[::-1])
return ans
```