摘要: Java发送http请求 (get 与 post方法请求)Java发送http请求 (get 与post方法请求),以下代码经本人亲自调试可用!可以直接使用之。注意:通过BufferedReader 读取远程返回的数据时,必须设置读取编码,否则中文会乱码!packagecom.jiucool.www... 阅读全文
posted @ 2014-11-10 10:37 苍枫露雨 阅读(1039) 评论(0) 推荐(0) 编辑
摘要: 原文:http://blog.chinaunix.net/uid-1911213-id-3086475.html 阅读全文
posted @ 2014-10-24 16:08 苍枫露雨 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 问题: A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null. Return a deep copy of the list. 结点的定义如下: /** * Defini... 阅读全文
posted @ 2014-10-15 13:08 苍枫露雨 阅读(712) 评论(0) 推荐(0) 编辑
摘要: 问题: Given an array of integers, every element appears three times except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it with... 阅读全文
posted @ 2014-10-14 15:12 苍枫露雨 阅读(586) 评论(0) 推荐(0) 编辑
摘要: 问题: Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never d... 阅读全文
posted @ 2014-10-12 16:40 苍枫露雨 阅读(1648) 评论(0) 推荐(0) 编辑
摘要: 问题: 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. 依旧还是那个熟悉的味道,如... 阅读全文
posted @ 2014-10-11 22:42 苍枫露雨 阅读(486) 评论(0) 推荐(0) 编辑
摘要: 问题: 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 as many transactions as you like (ie, bu... 阅读全文
posted @ 2014-10-09 21:40 苍枫露雨 阅读(476) 评论(0) 推荐(0) 编辑
摘要: 问题: Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the sto... 阅读全文
posted @ 2014-10-09 21:05 苍枫露雨 阅读(1066) 评论(0) 推荐(0) 编辑
摘要: 问题: Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return –321 Have you thought about this? Here are some good questions to ask before coding. Bonus p... 阅读全文
posted @ 2014-10-07 18:08 苍枫露雨 阅读(656) 评论(0) 推荐(0) 编辑
摘要: 问题: Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical and the nodes have the same value. 分析: ... 阅读全文
posted @ 2014-10-07 15:39 苍枫露雨 阅读(459) 评论(0) 推荐(0) 编辑