原创 LeetCode Keyboard Row
Given a List of words, return the words that can be typed using letters of alphabet on only one row’s of American k
原创 LeetCode Detect Captital
Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usage of capital
原创 Latex llncs2e模板 通訊作者標註小信封方法
To mark the corresponding author in the first page of the paper, you should use a small envelope. You can use the bbd
原创 LeetCode Add Digits
class Solution(object): def addDigits(self, num): """ :type num: int :rtype: int ""
原创 Dominant Resource Fairness: Fair Allocation of Multiple Resource Types
論文的大致內容: 在一個擁有多資源系統中往往需要面對資源平均分配的問題,每個用戶對每個資源都有不同的需求。針對這個問題,伯克利幾位大牛Ali Ghodsi, Matei Zaharia, Benjamin Hindman, Andy K
原创 LeetCode Array Partition I
Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), …,
原创 LeetCode Assign Cookies
class Solution(object): def findContentChildren(self, g, s): """ :type g: list[int] :type s
原创 LeetCode Ransom Note
class Solution(object): def canConstruct(self, ransomNote, magazine): """ :type ransomNote: str
原创 LeetCode Relative Ranks
class Solution(object): def findRelativeRanks(self, nums): """ :type nums: list[int] :rtype
原创 LeetCode Majority Element
Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋
原创 LeetCode Minimum Moves to Equal Array Elements
#coding=utf-8 class Solution(object): def minMoves(self, nums): """ :type nums: list[int] :
原创 New Surface pro +Vmware 12 +Ubuntu 16.04 分辨率問題
最近新入了今年的Surface pro,衆所周知這個屏幕是個高清屏,3:2的比例,高達2736x1824的分辨率,但是安裝完Vmware 12+Ubuntu 16.04後分辨率一直有點問題,1400x1050勉強能看,但是這個是4:3比例
原创 LeetCode First Unique Character in a String
#coding=utf-8 import string class Solution(object): def firstUniqChar(self, s): """ :type s: str
原创 LeetCode Move Zeroes
class Solution(object): def moveZeroes(self, nums): """ :type nums: list[int] :rtype: void
原创 LeetCode Construct the Rectangle
import math class Solution(object): def constructRectangle(self, area): """ :type area: int