摘要:
题目描述: There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the ... 阅读全文
摘要:
问题描述: Given an array of integers, every element appears three times except for one. Find that single one. 参考出现两次的,也是需要异或运算,问题是现在得判断出现三次归零的运算。需要两个... 阅读全文
摘要:
问题描述: Given an array of integers, every element appears twice except for one. Find that single one.每个元素出现两次,主要考察异或运算。一开始考虑到两两相消,但忘记存储时是用01存储,可以用异... 阅读全文
摘要:
问题描述: Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may... 阅读全文