leetCode解题报告之SingleNumberI,II(知识点:位运算)
source link: https://blog.csdn.net/ljphhj/article/details/21840199
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
由于两题是姐妹题,所以放在同一个博文里了!
题目1:
Given an array of integers, every element appears twice except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?
Given an array of integers, every element appears three times except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?
不知道这个题目如何做分析和讲解,直接上AC代码,欢迎留言指点:
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK