摘要:
终于到了二叉树。题目如下:Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the... 阅读全文
摘要:
第三道还是帕斯卡三角,这个是要求正常输出,题目如下:Given numRows, generate the first numRows of Pascal's triangle.For example, given numRows = 5, Return[ [1], [1,1], ... 阅读全文
摘要:
我是按难度往下刷的,第二道是帕斯卡三角形二。简单易懂,题目如下:Given an index k, return the kth row of the Pascal's triangle.For example, given k = 3, Return [1,3,3,1].Note: Could y... 阅读全文