自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

转载 浅谈《过气堡垒》,一个RTS玩家的视角

这次主要想谈一谈《上海堡垒》这个电影我并没有去电影院看这片,主要原因是,我知道这个片的时候它已经下架了。我主要想从一个RTS玩家的视角去谈。我并非一个严格的RTS玩家,我只喜欢RA3,命令与征服系列罢了《上海堡垒》这电影槽点有多少,实在是吐不完的地步,我也不在去赘述了。就讲一讲它在“战略”这个层面的一些观点吧。首先我们理一下敌我双方的战力我方:自走行火炮,上海大炮...

2019-09-23 22:05:00 227

转载 新的开始,新的计划

写下这篇文章时,其实是我最近最浮躁的一段时间吧既然是写给自己看的,就一切都实话实说吧,同时也想见证一下自己的成长写这篇文章时,大四,收到BAT的意向书。已经咸鱼了一段时间了。本来想在自己正式签完三方之后再去行动,这几天自己也放松的差不多了。也该开始为之后做一些打算了。就想具体的做一些计划之类的。不过具体列计划表之前,还是想记录一下自己这段时间的心情。既复杂又难受。收到意向...

2019-09-17 22:50:00 205

转载 [LeetCode] 54. Spiral Matrix

Given a matrix ofmxnelements (mrows,ncolumns), return all elements of the matrix in spiral order.Example 1:Input:[ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ]]Output: [1,2,3,...

2018-11-11 19:53:00 93

转载 [LeetCode] 40. Combination Sum II

Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations incandidateswhere the candidate numbers sums totarget.Each number incandi...

2018-11-11 18:45:00 191

转载 [LeetCode] 611. Valid Triangle Number

Given an array consists of non-negative integers, your task is to count the number of triplets chosen from the array that can make triangles if we take them as side lengths of a triangle.Exampl...

2018-11-10 23:02:00 212

转载 [LeetCode] 583. Delete Operation for Two Strings

Given two wordsword1andword2, find the minimum number of steps required to makeword1andword2the same, where in each step you can delete one character in either string.Example 1:Input: ...

2018-11-05 21:06:00 57

转载 [LeetCode] 522. Longest Uncommon Subsequence II

Given a list of strings, you need to find the longest uncommon subsequence among them. The longest uncommon subsequence is defined as the longest subsequence of one of these strings and this ...

2018-11-05 21:00:00 75

转载 [LeetCode] 240. Search a 2D Matrix II

Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted in ascending from left to right.Integers ...

2018-10-30 19:02:00 59

转载 [LeetCode] 128. Longest Consecutive Sequence

Given an unsorted array of integers, find the length of the longest consecutive elements sequence.Your algorithm should run in O(n) complexity.Example:Input:[100, 4, 200, 1, 3, 2]Output:...

2018-10-28 11:31:00 71

转载 [LeetCode] 540. Single Element in a Sorted Array

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.Example 1:Input: ...

2018-10-20 22:43:00 66

转载 [LeetCode] 69. Sqrt(x)

Implementint sqrt(int x).Compute and return the square root ofx, wherexis guaranteed to be a non-negative integer.Since the return typeis an integer, the decimal digits are truncated and...

2018-10-20 22:35:00 70

转载 [LeetCode] 524. Longest Word in Dictionary through Deleting

Given a string and a string dictionary, find the longest string in the dictionary that can be formed by deleting some characters of the given string. If there are more than one possible results, ...

2018-10-20 22:30:00 65

转载 [LeetCode] 763. Partition Labels

A stringSof lowercase letters is given. We want to partition this string into as many parts as possible so that each letter appears in at most one part, and return a list of integers representi...

2018-10-20 22:26:00 91

转载 [LeetCode] 189. Rotate Array

Given an array, rotate the array to the right byksteps, wherekis non-negative.Example 1:Input: [1,2,3,4,5,6,7] and k = 3Output: [5,6,7,1,2,3,4]Explanation:rotate 1 steps to the righ...

2018-10-17 22:42:00 59

转载 [LeetCode] 378. Kth Smallest Element in a Sorted Matrix

Given anxnmatrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matrix.Note that it is the kth smallest element in the sorted order, ...

2018-10-16 20:12:00 96

转载 [LeetCode] 35. Search Insert Position

Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the arr...

2018-10-15 21:39:00 61

转载 [LeetCode] 347. Top K Frequent Elements

Given a non-empty array of integers, return thekmost frequent elements.Example 1:Input: nums = [1,1,1,2,2,3], k = 2Output: [1,2]Example 2:Input: nums = [1], k = 1Output: [1]...

2018-10-14 22:28:00 65

转载 [LeetCode] 238. Product of Array Except Self

Given an arraynumsofnintegers wheren> 1, return an arrayoutputsuch thatoutput[i]is equal to the product of all the elements ofnumsexceptnums[i].Example:Input: [1,2,3,4]Out...

2018-10-14 10:57:00 68

转载 [LeetCode] 572. Subtree of Another Tree

Given two non-empty binary treessandt, check whether treethas exactly the same structure and node values with a subtree ofs. A subtree ofsis a tree consists of a node insand all of this...

2018-10-14 10:33:00 66

转载 [LeetCode] 538. Convert BST to Greater Tree

Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all keys greater than the original key in BST.E...

2018-10-13 21:56:00 60

转载 [LeetCode] 448. Find All Numbers Disappeared in an Array

Given an array of integers where 1 ≤ a[i] ≤n(n= size of array), some elements appear twice and others appear once.Find all the elements of [1,n] inclusive that do not appear in this array...

2018-10-13 21:40:00 72

转载 深入理解Java虚拟机笔记(2) - 垃圾收集器与内存分配策略

1.1 概述 GC需要考虑的事:哪些内存需要回收,什么时候回收,如何回收 我们只要在程序出于运行期间的时候才会知道创建哪些对象,这部分内存和回收都是动态的,垃圾回收器所关注的就是这部分内存1.2 对象已死吗? 回收的前提就是判断对象是否还存活1.2.1 引用计数算法 给一个对象添加一个计数器,若它被引用则计数器+1,当引用失效的时候就-1,...

2018-10-13 20:24:00 66

转载 [LeetCode] 617. Merge Two Binary Trees

Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not.You need to merge them into a new binary...

2018-10-13 09:09:00 71

转载 [LeetCode] 738. Monotone Increasing Digits

Given a non-negative integerN, find the largest number that is less than or equal toNwith monotone increasing digits.(Recall that an integer hasmonotone increasing digitsif and only if eac...

2018-10-11 22:15:00 63

转载 [LeetCode] 322. Coin Change

You are given coins of different denominations and a total amount of moneyamount. Write a function to compute the fewest number of coins that you need to make up that amount. If that amount of m...

2018-10-11 09:44:00 58

转载 深入理解Java虚拟机笔记(1) - Java 内存区域与内存溢出异常

1.1概述 Java与C++有一堵由内存分配和垃圾回收技术所构成的“高墙”1.2 运行时数据区域1.2.1 程序计数器 程序计数器是一小块的内存空间,它可以看作是当前线程执行字节码的行号指示器。通过改变这个计数器可以去选取下一条指令 在任何一个确定的时刻,一个处理器都只会执行一条线程中的指令。每个线程都有其独立的计数器,各个线程互不干扰,称为“线程私有”...

2018-10-10 22:38:00 56

转载 [LeetCode] 462. Minimum Moves to Equal Array Elements II

Given anon-emptyinteger array, find the minimum number of moves required to make all array elements equal, where a move is incrementing a selected element by 1 or decrementing a selected elemen...

2018-10-10 22:34:00 56

转载 [LeetCode] 453. Minimum Moves to Equal Array Elements

Given anon-emptyinteger array of sizen, find the minimum number of moves required to make all array elements equal, where a move is incrementingn- 1 elements by 1.Example:Input:[1,2,3]...

2018-10-10 22:32:00 53

转载 [LeetCode] 7. Reverse Integer

Given a 32-bit signed integer, reverse digits of an integer.Example 1:Input: 123Output: 321Example 2:Input: -123Output: -321Example 3:Input: 120Output: 21Note:Assume we ...

2018-10-10 22:28:00 53

转载 [LeetCode] 461. Hamming Distance

TheHamming distancebetween two integers is the number of positions at which the corresponding bits are different.Given two integersxandy, calculate the Hamming distance.Note:0 ≤x,y&lt...

2018-10-10 22:26:00 43

转载 [LeetCode] 557. Reverse Words in a String III

Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order.Example 1:Input: "Let's take LeetCode conte...

2018-10-09 22:35:00 52

转载 [LeetCode] 628. Maximum Product of Three Numbers

Given an integer array, find three numbers whose product is maximum and output the maximum product.Example 1:Input: [1,2,3]Output: 6Example 2:Input: [1,2,3,4]Output: 24...

2018-10-09 22:11:00 61

转载 [LeetCode] 543. Diameter of Binary Tree

Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of thelongestpath between any two nodes in a tree. This path may or m...

2018-10-08 22:28:00 78

转载 [LeetCode] 872. Leaf-Similar Trees

Consider all the leaves of a binary tree. Fromleft to right order, the values of thoseleaves form aleaf value sequence.For example, in the given tree above, the leaf value sequence is(6,...

2018-10-08 22:03:00 43

转载 [LeetCode] 503. Next Greater Element II

Given a circular array (the next element of the last element is the first element of the array), print the Next Greater Number for every element. The Next Greater Number of a number x is the firs...

2018-10-07 20:14:00 56

转载 [LeetCode] 859. Buddy Strings

Given two stringsAandBof lowercase letters, returntrueif and only if wecan swap two letters inAso that the result equalsB.Example 1:Input: A = "ab", B = "ba"Output: true...

2018-10-07 19:36:00 113

转载 [LeetCode] 27. Remove Element

Given an arraynumsand a valueval, remove all instances of that valuein-placeand return the new length.Do not allocate extra space for another array, you must do this bymodifying the i...

2018-10-07 19:23:00 70

转载 [LeetCode] 287. Find the Duplicate Number

Given an arraynumscontainingn+ 1 integers where each integer is between 1 andn(inclusive), prove that at least one duplicate number must exist. Assume that there is only one duplicate numbe...

2018-09-26 23:33:00 93

转载 [LeetCode] 142. Linked List Cycle II

Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.题意:找一个链表中是否含有环,如果没有则返回null,如果有则返回环的起点我的解法,投机取巧了,我改了val的值,再次扫到我改的那个值就是要的节点public class Soluti...

2018-09-26 23:24:00 48

转载 [LeetCode] 791. Custom Sort String

SandTare strings composed of lowercase letters. InS, no letter occurs more than once.Swas sorted in some custom order previously. We want to permute the characters ofTso that they match ...

2018-09-26 08:55:00 54

空空如也

空空如也

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

TA关注的人

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