Starry_1
码龄7年
关注
提问 私信
  • 博客:4,934
    4,934
    总访问量
  • 27
    原创
  • 918,642
    排名
  • 2
    粉丝
  • 0
    铁粉
IP属地以运营商信息为准,境内显示到省(区、市),境外显示到国家(地区)
IP 属地:湖南省
  • 加入CSDN时间: 2017-12-28
博客简介:

Starry_1的博客

查看详细资料
个人成就
  • 获得6次点赞
  • 内容获得8次评论
  • 获得0次收藏
创作历程
  • 27篇
    2018年
成就勋章
TA的专栏
  • LeetCode刷题
    25篇
兴趣领域 设置
  • 后端
    spring
  • 服务器
    linux
  • 最近
  • 文章
  • 代码仓
  • 资源
  • 问答
  • 帖子
  • 视频
  • 课程
  • 关注/订阅/互动
  • 收藏
搜TA的内容
搜索 取消

LeetCode 111. Minimum Depth of Binary Tree

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.Note: A leaf is a node with no childr...
原创
发布博客 2018.12.04 ·
180 阅读 ·
2 点赞 ·
0 评论 ·
0 收藏

LeetCode 110. Balanced Binary Tree

Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as:a binary tree in which the depth of the two subtrees of every node never differ b...
原创
发布博客 2018.11.30 ·
166 阅读 ·
1 点赞 ·
0 评论 ·
0 收藏

LeetCode 108. Convert Sorted Array to Binary Search Tree

Given an array where elements are sorted in ascending order, convert it to a height balanced BST.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the...
原创
发布博客 2018.11.28 ·
159 阅读 ·
1 点赞 ·
0 评论 ·
0 收藏

LeetCode 107. Binary Tree Level Order Traversal II

Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).Tips:题目说的很绕,说白了相当于树的层次遍历 public List<List<In...
原创
发布博客 2018.11.27 ·
156 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 104. Maximum Depth of Binary Tree

Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.Note: A leaf is a node with no childre...
原创
发布博客 2018.11.22 ·
168 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 101. Symmetric Tree

Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree [1,2,2,3,4,4,3] is symmetric/** * Definition for a binary tree node. ...
原创
发布博客 2018.11.20 ·
293 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 100. Same Tree

Given two binary trees, write a function to check if they are the same or not.Two binary trees are considered the same if they are structurally identical and the nodes have the same value. /** ...
原创
发布博客 2018.11.18 ·
175 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 88. Merge Sorted Array

Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note:The number of elements initialized in nums1 and nums2 are m and n respectively. You may assume tha...
原创
发布博客 2018.11.17 ·
157 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 83. Remove Duplicates from Sorted List

Given a sorted linked list, delete all duplicates such that each element appear only once.public class Solution { public ListNode deleteDuplicates(ListNode head) { /** * 去除链表中的...
原创
发布博客 2018.11.15 ·
114 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 70. Climbing Stairs

You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?Note: Given n will be a positive...
原创
发布博客 2018.11.14 ·
194 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 69. Sqrt(x)

Implement int sqrt(int x).Compute and return the square root of x, where x is guaranteed to be a non-negative integer.Since the return type is an integer, the decimal digits are truncated and only...
原创
发布博客 2018.11.11 ·
224 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 67. Add Binary

Given two binary strings, return their sum (also a binary string).The input strings are both non-empty and contains only characters 1 or 0.public class AddBinarySolution { public String addBi...
原创
发布博客 2018.11.08 ·
165 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 66. Plus One

Given a non-empty array of digits representing a non-negative integer, plus one to the integer.The digits are stored such that the most significant digit is at the head of the list, and each element...
原创
发布博客 2018.10.22 ·
154 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 58. Length of Last Word

Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last word does not exist, return 0.Note: A word is defin...
原创
发布博客 2018.10.21 ·
189 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 53. Maximum Subarray

Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.Follow up:If you have figured out the O(n) solution, try cod...
原创
发布博客 2018.10.14 ·
135 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 35. Search Insert Position

Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array....
原创
发布博客 2018.10.07 ·
200 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 28. Implement strStr()

Implement strStr().Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Clarification:What should we return when needle is an empty string? Thi...
原创
发布博客 2018.10.06 ·
211 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 27. Remove Element

Given an array nums and a value val, remove all instances of that value in-place and return the new length.Do not allocate extra space for another array, you must do this by modifying the input arra...
原创
发布博客 2018.10.05 ·
149 阅读 ·
1 点赞 ·
0 评论 ·
0 收藏

LeetCode 26. Remove Duplicates from Sorted Array

Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this by modifyi...
原创
发布博客 2018.10.01 ·
162 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 21. Merge Two Sorted Lists

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.public class MergeTwoSortedListsSolution { /** ...
原创
发布博客 2018.09.29 ·
160 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏
加载更多