mirror of
https://github.com/chefyuan/algorithm-base.git
synced 2024-12-27 21:06:17 +00:00
Update 剑指offer3数组中重复的数.md
This commit is contained in:
parent
19b8ca6a04
commit
d1dee7d48e
@ -88,7 +88,7 @@ C++ Code:
|
|||||||
class Solution {
|
class Solution {
|
||||||
public:
|
public:
|
||||||
int findRepeatNumber(vector<int>& nums) {
|
int findRepeatNumber(vector<int>& nums) {
|
||||||
if(nums.empty()) return 0;
|
if(nums.empty()) return 0;
|
||||||
int n = nums.size();
|
int n = nums.size();
|
||||||
for(int i = 0; i < n; ++i){
|
for(int i = 0; i < n; ++i){
|
||||||
while(nums[i] != i){
|
while(nums[i] != i){
|
||||||
|
Loading…
Reference in New Issue
Block a user