|
166 | 166 | }
|
167 | 167 | ]
|
168 | 168 | },
|
169 |
| -"median-of-two-sorted-array":{ |
| 169 | +"median-of-two-sorted-arrays":{ |
170 | 170 | "id": "4",
|
171 |
| - "name": "median-of-two-sorted-array", |
| 171 | + "name": "median-of-two-sorted-arrays", |
172 | 172 | "pre": [
|
173 | 173 | {
|
174 | 174 | "text": "中位数",
|
|
219 | 219 | "name": "腾讯"
|
220 | 220 | }
|
221 | 221 | ],
|
222 |
| - "giteeSolution": "https://gitee.com/golong/leetcode/blob/master/problems/4.median-of-two-sorted-array.md", |
223 |
| - "solution": "https://github.com/azl397985856/leetcode/blob/master/problems/4.median-of-two-sorted-array.md", |
| 222 | + "giteeSolution": "https://gitee.com/golong/leetcode/blob/master/problems/4.median-of-two-sorted-arrays.md", |
| 223 | + "solution": "https://github.com/azl397985856/leetcode/blob/master/problems/4.median-of-two-sorted-arrays.md", |
224 | 224 | "code": [
|
225 | 225 | {
|
226 | 226 | "language": "java",
|
|
333 | 333 | }
|
334 | 334 | ]
|
335 | 335 | },
|
336 |
| -"3-sum":{ |
| 336 | +"3sum":{ |
337 | 337 | "id": "15",
|
338 |
| - "name": "3-sum", |
| 338 | + "name": "3sum", |
339 | 339 | "pre": [
|
340 | 340 | {
|
341 | 341 | "text": "排序",
|
|
373 | 373 | "name": "字节跳动"
|
374 | 374 | }
|
375 | 375 | ],
|
376 |
| - "giteeSolution": "https://gitee.com/golong/leetcode/blob/master/problems/15.3-sum.md", |
377 |
| - "solution": "https://github.com/azl397985856/leetcode/blob/master/problems/15.3-sum.md", |
| 376 | + "giteeSolution": "https://gitee.com/golong/leetcode/blob/master/problems/15.3sum.md", |
| 377 | + "solution": "https://github.com/azl397985856/leetcode/blob/master/problems/15.3sum.md", |
378 | 378 | "code": [
|
379 | 379 | {
|
380 | 380 | "language": "js",
|
|
7071 | 7071 | }
|
7072 | 7072 | ]
|
7073 | 7073 | },
|
7074 |
| -"Find-Mode-in-Binary-Search-Tree":{ |
7075 |
| - "id": "501", |
7076 |
| - "name": "Find-Mode-in-Binary-Search-Tree", |
7077 |
| - "pre": [], |
7078 |
| - "keyPoints": [], |
7079 |
| - "companies": [], |
7080 |
| - "giteeSolution": "https://gitee.com/golong/leetcode/blob/master/problems/501.Find-Mode-in-Binary-Search-Tree.md", |
7081 |
| - "solution": "https://github.com/azl397985856/leetcode/blob/master/problems/501.Find-Mode-in-Binary-Search-Tree.md", |
7082 |
| - "code": [ |
7083 |
| - { |
7084 |
| - "language": "java", |
7085 |
| - "text": "\n/**\n * Definition for a binary tree node.\n * public class TreeNode {\n * int val;\n * TreeNode left;\n * TreeNode right;\n * TreeNode(int x) { val = x; }\n * }\n */\nclass Solution { \n List<Integer> list = new ArrayList<> ();\n TreeNode preNode = null;\n int max = 0, count = 0;\n \n public int[] findMode(TreeNode root) {\n helper(root);\n int[] res = new int[list.size()];\n for (int i=0; i<res.length; i++) {\n res[i] = list.get(i);\n }\n return res;\n }\n \n private void helper (TreeNode root) {\n if (root == null) return;\n helper(root.left);\n \n if (preNode != null && root.val == preNode.val) {\n count++;\n } else {\n count = 1;\n }\n \n if (count > max) {\n list.clear();\n list.add(root.val);\n max = count;\n } else if (max == count) {\n list.add(root.val); \n }\n preNode = root;\n helper(root.right);\n }\n}\n" |
7086 |
| - } |
7087 |
| - ] |
7088 |
| -}, |
7089 | 7074 | "longest-palindromic-subsequence":{
|
7090 | 7075 | "id": "516",
|
7091 | 7076 | "name": "longest-palindromic-subsequence",
|
|
0 commit comments