原创 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
原创 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. class Point {
原创 系統之間共享cookie的要求
在分佈式系統中,系統之間需要共享cookie時,要求 : 1 domain必須相同,如www.baidu.com,search.baidu.com,sso.baidu.com,domain必須設置爲.baidu.com 2 path設置爲
原创 二叉樹的先序遍歷BTPreorderTraversal
public class BTPreorderTraversal { //節點數據結構 static class TreeNode { int val;
原创 購物車邏輯
今天是雙十一光棍節,先祝自己節日快樂。。。。 大傢伙剁手了沒,給馬雲爸爸做了多大貢獻啊 藉着今天購物狂歡的東風,我就來說說實現購物車的代碼邏輯。。。 addCart(...)//將商品添加到購物車,存商品 { 1、取出Cookies,
原创 linked-list-cycle-ii
Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? public
原创 安裝zookeeper(單機)
1 上傳:我使用secureFX 上傳到目錄 /root 2 解壓:tar -zxvf zookeeper-3.4.6.tar.gz -C /usr/local/src 3 目錄結構:關注bin、conf兩個目錄即可 4 配置配
原创 word-break
Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separat
原创 spring整合dubbo
dubbo原理,簡圖: 服務提供方dubbo-provider.xml配置: <!-- dubbo服務提供方 --> <!-- 名稱 --> <dubbo:application name=" 如工程名"/> <