- 博客(15)
- 收藏
- 关注
原创 leetcode题记:Maximum Depth of Binary Tree
编程语言:JAVA题目描述: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 ...
2018-07-31 22:00:10 155
原创 leetcode题记:Symmetric Tree
编程语言:JAVA题目描述: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: 1 / \ 2 2 /...
2018-07-31 20:56:47 120
原创 leetcode题记:Same Tree
编程语言:JAVA题目描述: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 s...
2018-07-30 22:03:54 139
原创 leetcode题记:Merge Sorted Array
编程语言:JAVA题目描述: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....
2018-07-30 20:27:56 147
原创 leetcode题记:Climbing Stairs
编程语言:JAVA 题目描述: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...
2018-07-30 11:37:29 160
原创 leetcode题记:Sqrt(x)
编程语言:JAVA题目描述: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 ...
2018-07-29 21:45:29 175
原创 leetcode题记:Add Binary
编程语言:JAVA题目描述: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.Example 1:Input: a = "11", b = "1"...
2018-07-23 22:06:30 148
转载 HDFS机架感知概念及配置实现
转自:魔鬼地下室一、机架感知是什么?告诉 Hadoop 集群中哪台机器属于哪个机架二、那么怎么告诉呢?Hadoop 对机架的感知并非是自适应的,亦即,hadoop 集群分辨某台 slave 机器是属于哪个 rack 并非是智能感知的,而是需要 hadoop的管理者人为的告知 hadoop 哪台机器属于哪个 rack,这样在 hadoop的 namenode 启动初始...
2018-07-23 16:39:05 4393 1
转载 HDFS核心技术详解
转自:魔鬼地下室的博客HDFS核心技术详解我们都知道Hadoop 主要由HDFS和MapReduce 两个核心部分组成。其中最底部就是HDFS,它被用来存储Hadoop 集群中所有存储节点上的文件。hadoop的核心子项目——HDFS(分布式文件系统),下面将从HDFS的背景、基本概念 开始,步步深入了解HDFS的设计目标、HDFS的基本结构以及HDFS的相关操作等核心...
2018-07-23 16:32:49 1054
原创 leetcode题记:Plus One
编程语言:JAVA题目描述: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...
2018-07-19 20:32:27 161
原创 leetcode题记:Length of Last Word
编程语言:JAVA题目描述: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.N...
2018-07-17 23:20:16 224
原创 leetcode题记:Maximum Subarray
编程语言:JAVA题目描述:Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.Example:Input: [-2,1,-3,4,-1,2,1,-5,4],Ou...
2018-07-15 22:21:46 154
原创 leetcode题记:Count and Say
编程语言:JAVA提交结果:Submission Detail18 / 18 test cases passed.Status: AcceptedRuntime: 41 msSubmitted: 0 minutes agoYou are here! Your runtime beats 4.27 % of java submissions题目描述:The cou...
2018-07-11 21:33:04 164
原创 leetcode题记:Search Insert Position
编程语言:java提交结果:62 / 62 test cases passed.Status: AcceptedRuntime: 3 msps:运行时间和占用空间打败了100%的提交者,hhh题目描述: Given a sorted array and a target value, return the index if the target is found....
2018-07-08 15:45:13 207
原创 leetcode题记:Implement strStr()
题目描述:Implement strStr().Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Example 1:Input: haystack = "hello", needle = "ll"Output: 2Exa...
2018-07-08 14:30:55 119
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人