- 博客(1)
- 收藏
- 关注
原创 【leetcode剑指offer刷题笔记】数据结构部分03-07
03. 数组中重复的数字 思路 一种hash思想,感觉有点类似于用基数排序的方法排序全国人年龄,注意题目限制了数字的大小,所以hash数组的大小也好确认了。 代码 class Solution { public int findRepeatNumber(int[] nums) { //一种hash思想 int[] arr = new int[nums.length]; for(int i = 0; i < nums.length; i++){
2022-04-02 13:33:21
415
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人