自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 收藏
  • 关注

原创 快上车!EventBus使用

首先在接收EventMessage的地方---注册事件 EventBus.getDefault().register(this); 然后这里就开始时刻监控有没有通知它启动。 在注解中定义接收处在发动EVEnt时在哪个线程中进行 @Subscribe(threadMode = ThreadMode.MAIN) public void onMoonEvent(MessageEven

2017-05-08 16:06:02 329

原创 as中drawable和mipmap都用右键res,new image asset方法放入

否则很多问题

2017-05-06 20:17:15 536 1

转载 网络加载图片用glide,真神器啊

LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> Button

2017-05-06 19:12:06 191

原创 LeetCode钻研9 判断链表是否有环

/快慢指针能相遇说明有环! public class Solution {     public boolean hasCycle(ListNode head) {         if(head==null)             return false;         ListNode fast=head;        

2017-01-26 09:45:51 188

原创 LeetCode钻研7 链表的后半与前半进行穿插

Given a singly linked list L: L0→L1→…→Ln-1→Ln, reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do this in-place without altering the nodes' values. For example, Given{1,2,3,4}, reorder it to{1

2017-01-25 16:37:49 188

原创 LeetCode钻研8 前序遍历树

public ArrayList preorderTraversal(TreeNode root){         //非递归简洁版         if (root == null)             return new ArrayList }         TreeNode current = root;        

2017-01-23 17:33:42 169

原创 leetCode钻研6 二叉树的后序遍历

import java.util.Stack; import java.util.ArrayList; public class Solution {     public ArrayList postorderTraversal(TreeNode root) {         TreeNode p=root,r=null;         Stack s=new Stack();

2017-01-05 23:02:23 280

原创 leetcode钻研5 链表的插入排序

Sort a linked list using insertion sort. public class Solution{        public ListNode insertionSortList(ListNode head) {  ListNode dumy=new ListNode(Integer.MIN_VALUE); ListNode pre=dumy; Li

2016-12-30 19:17:35 200

原创 leetcode4 链表的归并排序

Sort a linked list in O(n log n) time using constant space complexity. public class Solution {     public ListNode sortList(ListNode head) {         if(head==n

2016-12-28 22:28:07 226

原创 leetcode钻研3 串最多点的直线上面点的个数(二维)

Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. import java.util.*;   class Point {       int x;       int y;       Point() { x = 0

2016-12-17 14:50:10 460

原创 leetcode钻研2 后续表达式

Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are+,-,*,/. Each operand may be an integer or another expression. Some examples: ["2", "1", "+", "3",

2016-12-16 20:53:00 211

原创 leetcode钻研1 求树最短路径到叶子

public class Solution {     public int run(TreeNode root) {     if(root==null)         return 0;     if(root.right==null&&root.left==null)         return 1;     if(root.right==null)         ret

2016-12-16 10:22:38 436

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除