每日一题
博主最近两天有急事…没什么详细解释,好在今天的题很简单哈哈哈哈
public class Solution {
public ListNode getIntersectionNode(ListNode a, ListNode b) {
for (ListNode h1 = a; h1 != null ; h1 = h1.next) {
for (ListNode h2 = b; h2 != null ; h2 = h2.next) {
if (h1.equals(h2)) return h1;
}
}
return null;
}
}