
LeetCode
一次就好12138
这个作者很懒,什么都没留下…
展开
-
并查集
本文主要来自于慕课网liuyubobobo老师的算法课程笔记,我在GitHub对该课程进行了详细的总结,查看本文源码可以点击此处。 本节主要介绍的是并查集这种数据结构,全文主要包含以下部分: 并查集的概念和简单实现 对union操作由浅入深的进行了三次优化。 对find操作进行了两次优化,又称之为路径压缩。 最终得到一个并查集的版本,在日常刷题和面试中可用。 概述 本节详述了并查集这一数据结构...原创 2020-03-20 15:50:06 · 216 阅读 · 0 评论 -
LeetCode problem 160. Intersection of Two Linked Lists
题目描述: Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: A: a1 → a2 ↘原创 2017-07-26 10:37:17 · 253 阅读 · 0 评论