从一道 leetcode 题到离散对数求解算法
我们先来看题面,点进去之前可以先思考一下:
Given an array of integers
nums
containing integers where each integer is in the range inclusive, .There is only one repeated number in
nums
, return this repeated number.You must solve the problem without modifying the array and using only constant extra space.