原创 [LeetCode] Add Two Numbers題解

Add Two Numbers: You are given two non-empty linked lists representing two non-negative integers. The digits are s

原创 Recyclerview adapter

import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import

原创 [LeetCode] Remove Element題解

Remove Element: Given an array and a value, remove all instances of that value in place and return the new length.

原创 [LeetCode]Reverse Words in a String

Reverse Words in a String: Given an input string, reverse the string word by word. For example, Given s = “the

原创 [LeetCode]Longest Substring Without Repeating Characters題解

Longest Substring Without Repeating Characters: Given a string, find the length of the longest substring without r

原创 Android Studio下載/更新SDK

今天安裝配置Android Studio的時候,用SDK Manager下載SDK的時候只顯示了一個7.0,別的都刷新不出來(被牆了)。去網上搜索怎麼解決,發現很多帖子的方法已經過時了(跟現在的AS版本不一樣)。 最後找到一種方

原创 [LeetCode]Generate Parentheses題解

Generate Parentheses: Given n pairs of parentheses, write a function to generate all combinations of well-formed p

原创 Socket的基本操作

socket的基本操作: (1)socket()函數: (2)bind()函數: (3)listen(),connect()函數; (4)accept()函數; (5)socket中的發送與接收函數: (6)close(

原创 [LeetCode]Swap Nodes in Pairs題解

Swap Nodes in Pairs: Given a linked list, swap every two adjacent nodes and return its head. For example, Given

原创 [LeetCode]3Sum Closest題解

3sum Closest: Given an array S of n integers, find three integers in S such that the sum is closest to a given num

原创 [LeetCode]Symmetric Tree

Symmetric Tree: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For

原创 [LeetCode]Remove Duplicates from Sorted Array題解

Remove Duplicates from Sorted Array: Given a sorted array, remove the duplicates in place such that each element a

原创 [LeetCode] Binary Tree Postorder題解

Binary Tree Postorder Given a binary tree, return the postorder traversal of its nodes’ values. For example: Gi

原创 [LeetCode] Three Sum題解

Three Sum: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all uniqu

原创 Java中InputStream 、 InputStreamReader 、 BufferedReader的區別

1.InputStream、OutputStream 處理字節流的抽象類 InputStream 是字節輸入流的所有類的超類,一般我們使用它的子類,如FileInputStream等. OutputStream是字節輸出流的所有類