Skip to content

第一周作业#39 - #5

Closed
zyziyun wants to merge 13 commits into
algorithm002:masterfrom
zyziyun:week1
Closed

zyziyun wants to merge 13 commits into
algorithm002:masterfrom
zyziyun:week1

Conversation

@zyziyun

@zyziyun zyziyun commented Jun 4, 2019 •

Copy link
Copy Markdown

还差4道题未提交;
174(递归解法报超时,dp不太理解)、42(和84一样只会暴力解法)、783、938(这两个有部分case没过去,需要看)

@zyziyun zyziyun changed the title Week1 Jun 7, 2019
if (!l1 && !l2) {
return null;
}
let head = new ListNode(null);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看了您的代码,更深刻地理解了哨兵的说法

*/

// 递归法
var treeSymmetric = function(t1, t2) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

t1, t2,最好能写成left, right, 容易懂些。

Comment thread Week_01/id_39/LeetCode_101_39.js Outdated

// 递归法
var treeSymmetric = function(t1, t2) {
if (t1 == null && t2 == null) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不懂javascript,不过可能四行可以合并为两行:
if (t1 == null || t2 == null) {
return t1 == t2;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

合并为两行我反而要想一下 😂

@GeekUniversity

Copy link
Copy Markdown
Contributor

还差4道题未提交;
174(递归解法报超时,dp不太理解)、42(和84一样只会暴力解法)、783、938(这两个有部分case没过去,需要看)

请按照代码文件命名规则进行命名:LeetCode_题目序号_学号,比如学号为 0 的学员完成 LeetCode_33_108 的第 2 题 后,请将代码文件名保存为 LeetCode_2_0.py (假设你使用的是 Python 语言)。

@zyziyun zyziyun closed this Jun 10, 2019
@zyziyun

zyziyun commented Jun 10, 2019

Copy link
Copy Markdown
Author

还差4道题未提交;
174(递归解法报超时,dp不太理解)、42(和84一样只会暴力解法)、783、938(这两个有部分case没过去,需要看)

请按照代码文件命名规则进行命名:LeetCode_题目序号_学号,比如学号为 0 的学员完成 LeetCode_33_108 的第 2 题 后,请将代码文件名保存为 LeetCode_2_0.py (假设你使用的是 Python 语言)。

我的哪里不符合规则,我没看出来命名有什么问题??

GeekUniversity added a commit that referenced this pull request Jun 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants