Macbook Pro 使用总结

2023-12-09
阅读 4 分钟
96
前言我使用 macbook pro 2014 已经一年了,于是写篇总结吧。macbook 机器的亮点:轻薄,铝制机身,外观简洁美观触摸板真的很好用,我已经很久没用过鼠标了(但触摸板很不适合打游戏)键盘背光retina 屏也是非常养眼立体声也十分不错细节做得很好,充电口是磁吸的,正反两面都能充,指示灯是能显示是否充满的(用过 surfa...
封面图

leetcode讲解--856. Score of Parentheses

2019-01-10
阅读 1 分钟
1.6k
Given a balanced parentheses string S, compute the score of the string based on the following rule:

leetcode讲解--695. Max Area of Island

2019-01-09
阅读 3 分钟
1.5k
Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) You may assume all four edges of the grid are surrounded by water.

leetcode讲解--647. Palindromic Substrings

2019-01-09
阅读 2 分钟
1.9k
Given a string, your task is to count how many palindromic substrings in this string.

leetcode讲解--892. Surface Area of 3D Shapes

2019-01-08
阅读 2 分钟
1.5k
Each value v = grid[i][j] represents a tower of v cubes placed on top of grid cell (i, j).

leetcode讲解--917. Reverse Only Letters

2019-01-08
阅读 1 分钟
1.8k
Given a string S, return the "reversed" string where all characters that are not a letter stay in the same place, and all letters reverse their positions.

leetcode讲解--824. Goat Latin

2019-01-08
阅读 3 分钟
1.4k
A sentence S is given, composed of words separated by spaces. Each word consists of lowercase and uppercase letters only.

leetcode讲解--540. Single Element in a Sorted Array

2019-01-08
阅读 1 分钟
2.1k
Given a sorted array consisting of only integers where every element appears twice except for one element which appears once. Find this single element that appears only once.

leetcode讲解--515. Find Largest Value in Each Tree Row

2019-01-07
阅读 2 分钟
1.6k
题目 You need to find the largest value in each row of a binary tree. Example: {代码...} 讲解 又是树的层次遍历题。相同的题我已经做了两个了:637. Average of Levels in Binary Tree、429. N-ary Tree Level Order Traversal Java代码 {代码...}

889. Construct Binary Tree from Preorder and Postorder Traversal

2019-01-07
阅读 2 分钟
1.4k
Return any binary tree that matches the given preorder and postorder traversals.

leetcode讲解762.Prime Number of Set Bits in Binary Representation

2019-01-07
阅读 2 分钟
2.2k
Given two integers L and R, find the count of numbers in the range [L, R] (inclusive) having a prime number of set bits in their binary representation.

leetcode讲解--693. Binary Number with Alternating Bits

2019-01-07
阅读 2 分钟
1.5k
Given a positive integer, check whether it has alternating bits: namely, if two adjacent bits will always have different values.

leetcode讲解--937. Reorder Log Files

2019-01-04
阅读 3 分钟
3k
You have an array of logs. Each log is a space delimited string of words.

leetcode讲解--739. Daily Temperatures

2019-01-04
阅读 1 分钟
1.9k
Given a list of daily temperatures T, return a list such that, for each day in the input, tells you how many days you would have to wait until a warmer temperature. If there is no future day for which this is possible, put 0 instead.

leetcode讲解--637. Average of Levels in Binary Tree

2019-01-03
阅读 2 分钟
2.1k
Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array.

leetcode讲解--513. Find Bottom Left Tree Value

2019-01-02
阅读 1 分钟
1.3k
Given a binary tree, find the leftmost value in the last row of the tree.

leetcode讲解--429. N-ary Tree Level Order Traversal

2019-01-02
阅读 2 分钟
2.5k
Given an n-ary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).

leetcode讲解--946. Validate Stack Sequences

2019-01-02
阅读 2 分钟
2k
Given two sequences pushed and popped with distinct values, return true if and only if this could have been the result of a sequence of push and pop operations on an initially empty stack.

leetcode讲解--953. Verifying an Alien Dictionary

2019-01-02
阅读 3 分钟
2.8k
In an alien language, surprisingly they also use english lowercase letters, but possibly in a different order. The order of the alphabet is some permutation of lowercase letters.

leetcode讲解--496. Next Greater Element I

2019-01-02
阅读 2 分钟
1.4k
You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1's elements in the corresponding places of nums2.

leetcode讲解--566. Reshape the Matrix

2019-01-02
阅读 2 分钟
1.6k
In MATLAB, there is a very useful function called 'reshape', which can reshape a matrix into a new one with different size but keep its original data.

leetcode讲解--841. Keys and Rooms

2019-01-02
阅读 2 分钟
1.6k
There are N rooms and you start in room 0. Each room has a distinct number in 0, 1, 2, ..., N-1, and each room may have some keys to access the next room.

leetcode讲解--575. Distribute Candies

2019-01-02
阅读 2 分钟
1.3k
Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one candy of the corresponding kind. You need to distribute these candies equally in number to brother and sister. Return the maximum number of kinds of candies t...

leetcode讲解--868. Binary Gap

2019-01-01
阅读 2 分钟
1.3k
Given a positive integer N, find and return the longest distance between two consecutive 1's in the binary representation of N.

leetcode讲解--669. Trim a Binary Search Tree

2019-01-01
阅读 2 分钟
1.6k
Given a binary search tree and the lowest and highest boundaries as L and R, trim the tree so that all its elements lies in [L, R] (R >= L). You might need to change the root of the tree, so the result should return the new root of the trimmed binary search tree.

leetcode讲解--877. Stone Game

2019-01-01
阅读 3 分钟
2.6k
Alex and Lee play a game with piles of stones. There are an even number of piles arranged in a row, and each pile has a positive integer number of stones piles[i].

leetcode讲解--682. Baseball Game

2019-01-01
阅读 3 分钟
1.1k
Given a list of strings, each string can be one of the 4 following types:

leetcode讲解--884. Uncommon Words from Two Sentences

2019-01-01
阅读 2 分钟
2.2k
We are given two sentences A and B. (A sentence is a string of space separated words. Each word consists only of lowercase letters.)

leetcode讲解--791. Custom Sort String

2018-12-31
阅读 3 分钟
1.9k
S and T are strings composed of lowercase letters. In S, no letter occurs more than once.

leetcode讲解--897. Increasing Order Search Tree

2018-12-31
阅读 2 分钟
2.4k
Given a tree, rearrange the tree in in-order so that the leftmost node in the tree is now the root of the tree, and every node has no left child and only 1 right child.