Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character'.'.You may assume that there will be on...
分类:
其他好文 时间:
2014-12-04 13:53:10
阅读次数:
99
# 题目 > Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete at most two transactions. Note: You...
分类:
其他好文 时间:
2014-12-04 12:23:54
阅读次数:
161
Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character'.'.You may assume that there will be on...
分类:
其他好文 时间:
2014-12-04 00:55:16
阅读次数:
354
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:
其他好文 时间:
2014-12-03 23:15:35
阅读次数:
248
Dubbo作为一个分布式的服务治理框架,提供了集群部署,路由,软负载均衡及容错机制
下图描述了dubbo调用过程中的对于集群,负载等的调用关系。
Cluster
将Directory中的多个Invoker伪装成一个Invoker, 对上层透明,包含集群的容错机制
Cluster接口定义
@SPI(FailoverCluster.NAME)
public
interf...
分类:
其他好文 时间:
2014-12-03 21:33:00
阅读次数:
122
Given preorder and inorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the tree.
这类问题非常适合用递归做,递归思路如下:
前序遍历的第一个节点必然是根节点,中序遍历中根节点之前的节...
分类:
其他好文 时间:
2014-12-03 21:27:24
阅读次数:
172
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a...
分类:
其他好文 时间:
2014-12-03 21:13:00
阅读次数:
187
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the fol...
分类:
其他好文 时间:
2014-12-03 21:11:39
阅读次数:
186
Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 ...
分类:
其他好文 时间:
2014-12-03 21:10:21
阅读次数:
166
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a...
分类:
其他好文 时间:
2014-12-03 21:00:33
阅读次数:
141