• 72827

    文章

  • 665

    评论

  • 17

    友链

  • 最近新加了换肤功能,大家多来逛逛吧~~~~
  • 喜欢这个网站的朋友可以加一下QQ群,我们一起交流技术。

数组的相关题目

撸了今年阿里、腾讯和美团的面试,我有一个重要发现.......>>

数组的特点:长度固定,查询复杂度O(1) ,增加或者删除一个元素是很慢

经常问数组的反转、数组的排序或者查找数组中的一个元素等。

1. How to find the missing number in integer array of 1 to 100?
2. How to find duplicate number on Integer array in Java? 
3. How to check if array contains a number in Java?
4. How to find largest and smallest number in unsorted array?
5. How to find all pairs on integer array whose sum is equal to given number? 
6.   How to find repeated numbers in an array if it contains multiple duplicates?
7. Write a program to remove duplicates from array in Java?
8. How to sort an array in place using QuickSort algorithm?
9. Write a program to find intersection of two sorted arrays in Java? 
10. There is an array with every element repeated twice except one. Find that element?
11. How to find kth smallest element in unsorted array? 
12. How to find kth largest element in unsorted array? 
13 How to find common elements in three sorted array? 
14. How find the first repeating element in an array of integers? 
15. How to find first non-repeating element in array of integers?
16. How to find top two numbers from an integer array?
17. How to find the smallest positive integer value that cannot be represented as sum of any subset of a given array? 
18. How to rearrange array in alternating positive and negative number? 
19. How to find if there is a sub array with sum equal to zero? 
20. How to remove duplicates from array in place? 
21. How to remove a given element from array in Java? 
22. How to merge sorted array? 
23. How to find sub array with maximum sum in an array of positive and negative number? 
24. How to find sub array with largest product in array of both positive and negative number? 
25. Write a program to find length of longest consecutive sequence in array of integers? 
26. How to find minimum value in a rotated sorted array? 
27. Given an array of of size n and a number k, find all elements that appear more than n/k times? 
28. How to reverse array in place in Java? 
29. Difference between array and linked list data structure? 
30. How to check if array contains a duplicate number? 
 


 


695856371Web网页设计师②群 | 喜欢本站的朋友可以收藏本站,或者加入我们大家一起来交流技术!

欢迎来到梁钟霖个人博客网站。本个人博客网站提供最新的站长新闻,各种互联网资讯。 还提供个人博客模板,最新最全的java教程,java面试题。在此我将尽我最大所能将此个人博客网站做的最好! 谢谢大家,愿大家一起进步!

转载原创文章请注明出处,转载至: 梁钟霖个人博客www.liangzl.com

0条评论

Loading...


发表评论

电子邮件地址不会被公开。 必填项已用*标注

自定义皮肤
注册梁钟霖个人博客