![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
gggzy
这个作者很懒,什么都没留下…
展开
-
leetCode刷题(1)
题目描述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 leaf node./*** Definition for binary tr...原创 2019-05-15 09:14:31 · 111 阅读 · 0 评论 -
LeetCode刷题(2)
题目描述Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another expression.Some examples:用异常处理,感觉很妙。逆波...原创 2019-05-15 10:04:54 · 64 阅读 · 0 评论 -
LeetCode刷题(3)
题目描述Given a singly linked listL:L0→L1→…→Ln-1→Ln,reorder it to:L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For example,Given{1,2,3,4}, r...原创 2019-05-18 11:45:48 · 66 阅读 · 0 评论 -
LeetCode刷题(4)
题目描述Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it without using extra space?public class Solution { public L...原创 2019-05-18 13:34:06 · 82 阅读 · 0 评论 -
2019.6.4 vivo开发后端(java)笔试
Test1:两个数组,输出数组1中有 而 数组2 中没有的元素package vivo;public class Test1 { public static void test1(int[] arr1 , int[] arr2){ if(arr1 == null){ return; } if(arr2 ==...原创 2019-06-14 11:15:07 · 694 阅读 · 0 评论 -
2019.7.23
Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.(链表中有没有环的问题)/** * Definition for singly-linked list. * class ListNode { * int val; * ListNo...原创 2019-07-23 21:09:36 · 141 阅读 · 0 评论 -
7.29(动态规划)
Given a stringsand a dictionary of wordsdict, add spaces insto construct a sentence where each word is a valid dictionary word.Return all such possible sentences.For example, givens="catsand...原创 2019-07-29 23:26:43 · 104 阅读 · 0 评论 -
2019.7.20刷题记录
Sort a linked list in O(n log n) time using constant space complexity.Sort a linked list in O(n log n) time using constant space complexity.Sort a linked list in O(n log n) time using constant space c...原创 2019-07-20 17:07:49 · 90 阅读 · 0 评论 -
2019.7.22
zyb大概是凉凉了继续加油啦============================分割线===========================Given a binary tree, return the preorder traversal of its nodes' values.先序遍历 输入到list中/** * Definition for binary tree...原创 2019-07-22 22:08:04 · 102 阅读 · 0 评论