Skip to content
#

leetcode

Here are 3,743 public repositories matching this topic...

leetcode
azl397985856
azl397985856 commented Mar 24, 2020

集合 S 包含从1到 n 的整数。不幸的是,因为数据错误,导致集合里面某一个元素复制了成了集合里面的另外一个元素的值,导致集合丢失了一个整数并且有一个元素重复。

给定一个数组 nums 代表了集合 S 发生错误后的结果。你的任务是首先寻找到重复出现的整数,再找到丢失的整数,将它们以数组的形式返回。

示例 1:

输入: nums = [1,2,2,4]
输出: [2,3]
注意:

给定数组的长度范围是 [2, 10000]。
给定的数组是无序的。

来源:力扣(LeetCode)
链接:https://leetcode-cn.com/problems/set-mismatch

📚 C/C++ 技术面试基础知识总结,包括语言、程序库、数据结构、算法、系统、网络、链接装载库等知识及面试经验、招聘、内推等信息。This repository is a summary of the basic knowledge of recruiting job seekers and beginners in the direction of C/C++ technology, including language, program library, data structure, algorithm, system, network, link loading library, interview experience, recruitment, recommendation, etc.

  • Updated Apr 19, 2020
  • C++

《大厂面试指北》——后端面试题精选,包括Java基础、JVM、数据库、mysql、redis、计算机网络、算法、数据结构、操作系统、设计模式、系统设计、框架原理(获取《大厂面试指北》PDF版本请关注我的公众号"大厂面试",技术交流可以扫主页的二维码进群,希望给我一个Star,谢谢!) 最佳阅读地址:http://notfound9.github.io/interviewGuide/

  • Updated Jul 3, 2020
  • Java

Improve this page

Add a description, image, and links to the leetcode topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the leetcode topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.