关闭

Android App启动流程

前言在使用Android手机时,我们总会启动各种各样的App以满足生活的各种需求,你是否想过,我们是怎样启动这些APP的?今天我将带着读者一起探索在Android系统中,一个App是如何被启动的。在开始分析之前,我们先回想下启动一个App的流程:Android系统桌面->点击应用图标->启动App从这个过程来看,只要弄明白: Android系统桌面是什么 点击应用图标后Android系统执行了什么操...
阅读(330) 评论(0)

LeetCode题解:Maximum Subarray

Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [−2,1,−3,4,−1,2,1,−5,4], the contiguous subarray [4,−1,2,1] has the...
阅读(204) 评论(0)

LeetCode题解:Kth Smallest Element in a BST

Given a binary search tree, write a function kthSmallest to find the kth smallest element in it.Note: You may assume k is always valid, 1 ≤ k ≤ BST’s total elements.Follow up: What if the BST is mod...
阅读(173) 评论(0)

LeetCode题解:Linked List Cycle

/** * Definition for singly-linked list. * class ListNode { * int val; * ListNode next; * ListNode(int x) { * val = x; * next = null; * } * } */ pub...
阅读(182) 评论(0)

LeetCode题解:Maximum Product of Word Lengths

Given a string array words, find the maximum value of length(word[i]) * length(word[j]) where the two words do not share common letters. You may assume that each word will contain only lower case lette...
阅读(211) 评论(0)

LeetCode题解:Binary Tree Preorder Traversal

Given a binary tree, return the preorder traversal of its nodes’ values.For example: Given binary tree {1,#,2,3}, 1 \ 2 / 3 return [1,2,3].题意:先序遍历思路:代码:/** * Definition for a...
阅读(175) 评论(0)

LeetCode题解:Missing Number

Given an array containing n distinct numbers taken from 0, 1, 2, …, n, find the one that is missing from the array.For example, Given nums = [0, 1, 3] return 2.Note: Your algorithm should run in line...
阅读(238) 评论(0)

LeetCode题解:Bulb Switcher

There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third round, you toggle every third bulb (turning on if it’s off or turning off i...
阅读(224) 评论(0)

LeetCode题解:Best Time to Buy and Sell Stock with Cooldown

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, buy one and...
阅读(206) 评论(0)

LeetCode题解:Product of Array Except Self

Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except nums[i].Solve it without division and in O(n).For e...
阅读(311) 评论(0)
242条 共25页1 2 3 4 5 ... 下一页 尾页
    个人资料
    • 访问:178886次
    • 积分:4137
    • 等级:
    • 排名:第7733名
    • 原创:234篇
    • 转载:8篇
    • 译文:0篇
    • 评论:41条
    博客专栏
    最新评论