- 博客(11)
- 收藏
- 关注
转载 java中的==、equals()、hashCode()源码分析
== java中的==是比较两个对象在JVM中的地址。 public class ComAddr{ public static void main(String[] args) throws Exception { String s1 = "hello"; String s2 = "hello"; String s3 = new String...
2019-04-18 18:04:45
134
原创 Leetcode107- Binary Tree Level Order Traversal II
问题描述 Given a binary tree, return the postorder traversal of its nodes’ values. 给定二叉树,返回层次遍历。 For example: Given binary tree{1,#,2,3}, 3 / \ 9 20 / \ 15 7 return its level order tr...
2019-04-06 13:02:52
105
原创 Leetcode102-Binary Tree Level Order Traversal
问题描述 Given a binary tree, return the postorder traversal of its nodes’ values. 给定二叉树,返回层次遍历。 For example: Given binary tree{1,#,2,3}, 3 / \ 9 20 / \ 15 7 return its level order tr...
2019-04-06 12:12:33
123
原创 LeetCode149-max-points-on-a-line
问题描述 Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 求二维平面上n个点中,最多共线的点数。 Input: [[1,1],[2,2],[3,3]] Output: 3 Explanation: ^ | | o | o | ...
2019-04-05 19:59:43
106
原创 LeetCode11-Container With Most Water
问题描述 Given n non-negative integers a1, a2, …, an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find ...
2019-04-03 19:29:43
117
原创 链表中环的入口结点
问题描述 给一个链表,若其中包含环,请找出该链表的环的入口结点,否则,输出null。 解题思路 方法一 哈希表,时间O(n),空间O(n) 遍历整个链表,并将链表结点存入哈希表中(这里我们使用容器set) 如果遍历到某个链表结点已经在set中,那么该点即为环的入口结点 public ListNode EntryNodeOfLoop1(ListNode pHead) { if (...
2019-04-02 18:26:16
99
原创 LeetCode150-evaluate-reverse-polish-notation
问题描述 Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are+,-,*,/. Each operand may be an integer or another expression. Some examples: 用逆波兰符号计算算术表达式的值。有效的运算符为...
2019-04-01 18:52:00
122
原创 LeetCode111-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. 给定一个二叉树,求出它的最小深度,最小深度是从根节点到最近的叶子节点的最...
2019-03-31 17:32:36
108
转载 微服务架构
目录微服务架构介绍传统开发模式和微服务的区别传统开发模式微服务SOA和微服务的区别 微服务架构介绍 微服务架构(Microservice Architecture)是一种架构概念,旨在通过将功能分解到各个离散的服务中从而降低系统的耦合性,并提供更加灵活的服务支持。 概念:把一个大型的单个应用程序和服务拆分为数个甚至数十个的支持微服务,它可扩展单个组件而不是整个的应用程序堆栈,从而满足服务等级协议。...
2019-03-30 21:00:31
176
原创 IDEA向hadoop集群提交作业
1. 说明 本地环境:Intellij IDEA15.0.2 、jdk-7u65-windows-x64.exe、hadoop-2.6.1.tar.gz 集群环境及其配置详情请见:http://blog.csdn.net/qq_28039433/article/details/78147172 本文原先是根据http://blog.csdn.net/uq_jin/article/details/52
2017-10-02 12:58:29
1820
原创 Hadoop分布式集群搭建
HADOOP集群具体来说包含两个:HDFS 集群和YARN 集群,两者逻辑上分离但物理集群。 一个HDFS集群是由一个NameNode和若干个DataNode组成的。其中NameNode作为主服务器,管理文件系统的命名空间和客户端对文件系统的访问操作;集群中的DataNode管理存储的数据。 YARN集群主要负责海量数据运算时的资源调度,集群中角色主要有 ResourceManager/
2017-10-01 12:57:18
347
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人