欢迎来到PJCK的博客

随笔分类 -  数据结构与算法----队列

摘要:Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest l 阅读全文
posted @ 2019-04-16 09:20 PJCK 阅读(138) 评论(0) 推荐(0)
摘要:690. Employee Importance Easy 377369FavoriteShare 690. Employee Importance Easy 377369FavoriteShare Easy You are given a data structure of employee in 阅读全文
posted @ 2019-04-15 20:33 PJCK 阅读(129) 评论(0) 推荐(0)
摘要:Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacen 阅读全文
posted @ 2019-04-15 19:47 PJCK 阅读(147) 评论(0) 推荐(0)
摘要:题目描述 在一个果园里,多多已经将所有的果子打了下来,而且按果子的不同种类分成了不同的堆。多多决定把所有的果子合成一堆。 每一次合并,多多可以把两堆果子合并到一起,消耗的体力等于两堆果子的重量之和。可以看出,所有的果子经过 n-1n−1 次合并之后, 就只剩下一堆了。多多在合并果子时总共消耗的体力等 阅读全文
posted @ 2019-03-18 17:37 PJCK 阅读(206) 评论(0) 推荐(0)