博客园_Grandyang仰天长啸仗剑红尘，冬去春来寒暑几更...uuid:40f72be3-bbef-45f7-9bdc-00e6624ae297;id=2743162019-09-16T02:24:39ZGrandyanghttp://www.cnblogs.com/grandyang/feed.cnblogs.comhttp://www.cnblogs.com/grandyang/p/11520804.html[LeetCode] 834. Sum of Distances in Tree 树中距离之和 - GrandyangAn undirected, connected tree with nodes labelled and `edges` are given. The th edge connects nodes and together. Return a list , where is the sum of 2019-09-14T15:46:00Z2019-09-14T15:46:00ZGrandyanghttp://www.cnblogs.com/grandyang/【摘要】An undirected, connected tree with nodes labelled and `edges` are given. The th edge connects nodes and together. Return a list , where is the sum of <a href="http://www.cnblogs.com/grandyang/p/11520804.html" target="_blank">阅读全文</a>http://www.cnblogs.com/grandyang/p/11515655.html[LeetCode] 913. Cat and Mouse 猫和老鼠 - GrandyangA game on an undirected graph is played by two players, Mouse and Cat, who alternate turns. The graph is given as follows: is a list of all nodes such2019-09-12T15:55:00Z2019-09-12T15:55:00ZGrandyanghttp://www.cnblogs.com/grandyang/【摘要】A game on an undirected graph is played by two players, Mouse and Cat, who alternate turns. The graph is given as follows: is a list of all nodes such <a href="http://www.cnblogs.com/grandyang/p/11515655.html" target="_blank">阅读全文</a>http://www.cnblogs.com/grandyang/p/11503433.html[LeetCode] 839. Similar String Groups 相似字符串组 - GrandyangTwo strings and are similar if we can swap two letters (in different positions) of , so that it equals . For example, and are similar (swapping at pos2019-09-10T14:14:00Z2019-09-10T14:14:00ZGrandyanghttp://www.cnblogs.com/grandyang/【摘要】Two strings and are similar if we can swap two letters (in different positions) of , so that it equals . For example, and are similar (swapping at pos <a href="http://www.cnblogs.com/grandyang/p/11503433.html" target="_blank">阅读全文</a>http://www.cnblogs.com/grandyang/p/11483981.html[LeetCode] 912. Sort an Array 数组排序 - GrandyangGiven an array of integers , sort the array in ascending order. Example 1: Example 2: Note: 1. `1 这道题让我们给数组排序，在平时刷其他题的时候，遇到要排序的时候，一般都会调用系统自带的排序函数，像 C+2019-09-07T15:52:00Z2019-09-07T15:52:00ZGrandyanghttp://www.cnblogs.com/grandyang/【摘要】Given an array of integers , sort the array in ascending order. Example 1: Example 2: Note: 1. `1 这道题让我们给数组排序，在平时刷其他题的时候，遇到要排序的时候，一般都会调用系统自带的排序函数，像 C+ <a href="http://www.cnblogs.com/grandyang/p/11483981.html" target="_blank">阅读全文</a>http://www.cnblogs.com/grandyang/p/11449244.html[LeetCode] 843. Guess the Word 猜单词 - GrandyangThis problem is an interactive problem new to the LeetCode platform. We are given a word list of unique words, each word is 6 letters long, and one wo2019-09-02T13:45:00Z2019-09-02T13:45:00ZGrandyanghttp://www.cnblogs.com/grandyang/【摘要】This problem is an interactive problem new to the LeetCode platform. We are given a word list of unique words, each word is 6 letters long, and one wo <a href="http://www.cnblogs.com/grandyang/p/11449244.html" target="_blank">阅读全文</a>http://www.cnblogs.com/grandyang/p/11421511.html[LeetCode] 911. Online Election 在线选举 - GrandyangIn an election, the th vote was cast for at time . Now, we would like to implement the following query function: will return the number of the person 2019-08-27T15:48:00Z2019-08-27T15:48:00ZGrandyanghttp://www.cnblogs.com/grandyang/【摘要】In an election, the th vote was cast for at time . Now, we would like to implement the following query function: will return the number of the person <a href="http://www.cnblogs.com/grandyang/p/11421511.html" target="_blank">阅读全文</a>http://www.cnblogs.com/grandyang/p/11410007.html[LeetCode] 847. Shortest Path Visiting All Nodes 访问所有结点的最短路径 - GrandyangAn undirected, connected graph of N nodes (labeled ) is given as . , and is in the list exactly once, if and only if nodes and are connected. Return t2019-08-25T15:37:00Z2019-08-25T15:37:00ZGrandyanghttp://www.cnblogs.com/grandyang/【摘要】An undirected, connected graph of N nodes (labeled ) is given as . , and is in the list exactly once, if and only if nodes and are connected. Return t <a href="http://www.cnblogs.com/grandyang/p/11410007.html" target="_blank">阅读全文</a>http://www.cnblogs.com/grandyang/p/11397303.html[LeetCode] 1123. Lowest Common Ancestor of Deepest Leaves 最深叶结点的最小公共父节点 - GrandyangGiven a rooted binary tree, return the lowest common ancestor of its deepest leaves. Recall that: The node of a binary tree is a leaf if and only if i2019-08-22T14:39:00Z2019-08-22T14:39:00ZGrandyanghttp://www.cnblogs.com/grandyang/【摘要】Given a rooted binary tree, return the lowest common ancestor of its deepest leaves. Recall that: The node of a binary tree is a leaf if and only if i <a href="http://www.cnblogs.com/grandyang/p/11397303.html" target="_blank">阅读全文</a>http://www.cnblogs.com/grandyang/p/11371256.html[LeetCode] 850. Rectangle Area II 矩形面积之二 - GrandyangWe are given a list of (axis aligned) . Each , where (x1, y1) are the coordinates of the bottom left corner, and (x2, y2) are the coordinates of the t2019-08-17T18:56:00Z2019-08-17T18:56:00ZGrandyanghttp://www.cnblogs.com/grandyang/【摘要】We are given a list of (axis aligned) . Each , where (x1, y1) are the coordinates of the bottom left corner, and (x2, y2) are the coordinates of the t <a href="http://www.cnblogs.com/grandyang/p/11371256.html" target="_blank">阅读全文</a>http://www.cnblogs.com/grandyang/p/11361245.html[LeetCode] 910. Smallest Range II 最小区间之二 - GrandyangGiven an array of integers, for each integer we need to choose either or , and add to . After this process, we have some array . Return the smallest p2019-08-15T15:29:00Z2019-08-15T15:29:00ZGrandyanghttp://www.cnblogs.com/grandyang/【摘要】Given an array of integers, for each integer we need to choose either or , and add to . After this process, we have some array . Return the smallest p <a href="http://www.cnblogs.com/grandyang/p/11361245.html" target="_blank">阅读全文</a>