![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
minglotus
这个作者很懒,什么都没留下…
展开
-
Leetcode Customers Who Never Order
WA: select Customers.Name as Customers from Customers where Customers.Name not in (select Customers.Name from Customers join Orders on Customers.Id = Orders.CustomerId) ; AC: select Customers.Name a原创 2015-04-23 16:34:02 · 219 阅读 · 0 评论 -
leetcode Remove Elements Java
public class Solution { public int removeElement(int[] A, int elem) { int len = A.length; for(int i = 0; i < len;){ if(A[i] == elem){ A[len - 1] ^= A[i];原创 2015-04-17 22:48:50 · 217 阅读 · 0 评论 -
leetcode Number of 1 Bits
class Solution { public: int hammingWeight(uint32_t n) { n = ((n & 0xAAAAAAAA) >> 1) + (n & 0x55555555); n = ((n & 0xCCCCCCCC) >> 2) + (n & 0x33333333); n = ((n & 0xF0F0F0F0原创 2015-04-22 00:59:08 · 181 阅读 · 0 评论 -
leetcode Bitwise AND of Numbers Range
class Solution { public: int rangeBitwiseAnd(int m, int n) { unsigned int mask = 0x80000000; int ret = 0; while(mask != 0){ int bit1 = n & mask; int原创 2015-04-22 00:49:58 · 267 阅读 · 0 评论 -
Different Ways to Add Parentheses
class Solution { public: void get_result(const vector<int>&digits, const vector<char>& sign, int left, int right, vector<int>&result){ if(left == right){ result.push_back(digits原创 2015-08-01 08:45:45 · 199 阅读 · 0 评论