LeetCode-Easy
文章平均质量分 67
7bae
这个作者很懒,什么都没留下…
展开
-
LeetCode-520. Detect Capital
520.Detect CapitalGiven a word, you need to judge whether the usage of capitals in it is right or not.We define the usage of capitals in a word to be right when one of the following cases holds:All le...原创 2018-02-10 01:31:41 · 263 阅读 · 0 评论 -
LeetCode-762. Prime Number of Set Bits in Binary Representation
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.(Recall that the number of set bits an integer ha...原创 2018-03-01 18:29:14 · 173 阅读 · 0 评论 -
LeetCode-717. 1-bit and 2-bit Characters
We have two special characters. The first character can be represented by one bit 0. The second character can be represented by two bits (10 or 11).Now given a string represented by several bits. Retu...原创 2018-03-05 20:32:53 · 170 阅读 · 0 评论 -
LeetCode-136. Single Number 389. Find the Difference
136. Single NumberGiven an array of integers, every element appears twice except for one. Find that single one.ConceptIf we take XOR of zero and some bit, it will return that bita ⊕ 0 = aIf we take XO...原创 2018-03-05 20:29:17 · 222 阅读 · 0 评论 -
LeetCode-371. Sum of Two Integers
Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -.Example:Given a = 1 and b = 2, return 3.Credits:Special thanks to @fujiaozhu for adding this problem and ...原创 2018-03-06 12:47:47 · 161 阅读 · 0 评论