Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: 在数组中查找特殊数字
给定一个数组,该数组包含除一个之外的所有元素三次。找到出现一次的元素。时间复杂度-O(n)。空间复杂度-O(1)。
例如。ar[10]={1,2,1,2,5,5,5,7,1,2}。答案= 7。