707代码规范化,添加部分comments; 203添加了java版本的递归 #2818
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
将外置的ListNode class统一放进MyLinkedList class内部,对外部不可见的封装ListNode class更规范;
format了单向和双向链表两版code的ListNode的名称,统一使用3个字母,和本身构造类中的4个字母错开,更清晰易懂;
统一了size++和size--在方法的末尾而不是中间,更规范,并且方便后期debug;
统一了index判断语句,修改了部分格式没有空格等不规范问题;
修改和添加了部分comment,主要的comment和算法结构都没有修改;
两版code都已通过leetcode test,请放心食用