随笔分类 -  BFS

457. Circular Array Loop --类似BFS 和快慢指针
摘要:这个题目本质上是一个graph 的BFS 题目,虽然光度题目很难看出来。 数组里是的value 表示走几步,负数表示往回走. “If a number k at an index is positive, then move forward k steps. Conversely, if it's 阅读全文
posted @ 2019-09-29 14:11 KeepAC 阅读(153) 评论(0) 推荐(0)