Java
文章平均质量分 79
ljffdream
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
【Java网络】Socket 多线程, 一对多服务
再说ServerSocket; 1.C/S模式中,Server需要创建特定端口的ServerSocket.->其负责接收client连接请求. 2.线程池->包括一个工作队列和若干工作线程->工作线程不断的从工作队列中取出任务并执行.-->java.util.concurrent->线程池 3.server可利用多线程来处理与多个客户的通信任务. 1.构造ServerSocke转载 2015-02-01 13:05:46 · 3620 阅读 · 0 评论 -
【Java网络】STMP邮件协议 发送客户端
1. SMTP 协议简介simple mail Transfer Protocal:简称传输协议,是应用vengeance的协议。建立在TCP/IP的协议之上。SMTP协议规定了把邮件从发送方传输的接受方的规则SMTP 客户程序请求发送邮件,SMTP服务器负责吧邮件传输到目的地。默认情况下,SMTP服务器监听25端口。在SMTP客户与SMTP服务器的一次绘画过程中,SMTP客户转载 2015-02-01 23:28:16 · 1182 阅读 · 0 评论 -
【Leetcode】Permutations
【题目】Given a collection of numbers, return all possible permutations.For example,[1,2,3] have the following permutations:[1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], and [3,2,1].【分析原创 2015-04-09 04:50:04 · 361 阅读 · 0 评论 -
[Leetcode]Implement Stack using Queues
[题目]Implement the following operations of a stack using queues.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get the top element.empty() -- Ret转载 2015-06-18 17:45:46 · 503 阅读 · 0 评论 -
[Leetcode]Invert Binary Tree
[题目]Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1Trivia:This problem was inspired by this original tweet by原创 2015-06-18 16:30:12 · 765 阅读 · 0 评论 -
[Leetcode]House Robber2
[题目]Note: This is an extension of House Robber.After robbing those houses on that street, the thief has found himself a new place for his thievery so that he will not get too much attention. T转载 2015-07-08 09:15:07 · 570 阅读 · 0 评论 -
【Leetcode】House Robber
【题目】You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adja转载 2015-07-02 16:24:31 · 283 阅读 · 0 评论 -
【Leetcode】Find the kth in the BST
[题目][思路]BST的特点就是排序性,左边的节点一定比root小,右边的节点一定比root大。另外就是二分性。找第k个,可以先看左边树节点的个数,小于k的话,就保证了肯定是在右边。那么去找右边的k-left.k - left,就变成了新的k.数root所在的树的节点数。这个就是用递归实现。想法就是,如果root自己本身就是null,那么就return 0; 否则至转载 2015-07-08 21:28:09 · 580 阅读 · 0 评论
分享