Array programs
Array programs
Print array
2. Print array in reverse order
3. Sum of array element
4. Find average of all the element of array
5. Check if element is present or not
6. Count odd / even element in array
7. Print Mth element
8. Print Mth element from last
9. Print alternate elements from array
10. Print alternate elements from last in array
11. Print odd elements first then even elements from array
12. Find largest (maximum) element from array
13. Why does the Array index start from Zero? [topic]
14. Copy array element in another array
15. Copy all the odd elements first then even in new array
16. Copy array element in another array in reverse
17. Reverse an array in memory
18. How Many Numbers Are Smaller Than the Current Number - store
in countArray
19. Given an array, create another array arr2 with double the size of
arr and copy arr element two times in arr2
20. Arr1, arr2 same size -> arr3 alternative
21. Given an array of even length - divide into two arrays
22. Check if given number is duplicate or not
23. Check if given number is unique or not
24. Find common elements between two arrays (first array unique ele)
25. Data Structures vs Database, what is Algorithms [topic]
26. Time & Space complexity [topic]
27. Find element -> simple and binary search
28. Print all unique numbers from array
29. Print all duplicate numbers from array (all elements are positive)
30. Insert / update / search / print / delete
31. Leetcode [topic]
32. Sorting Algorithms
33. Find 2nd largest element from array
34. Find 3rd largest element from array
35. Pair with sum present or not in array O(N^2)
36. Pair with sum present or not in sorted array? Two pointers O(N)
37. Move all 0 to right and 1s to left
38. Move odd numbers to left and even numbers to right
39. 1 to n-1 in an array : 1 number is missing -> find out
40. 1 to n in an array : 1 number is duplicate -> find out
41. Left rotate an array by d positions
42. Merge two sorted array
43. Largest contiguous sum (Kadane’s Algorithm)
44. ArrayList
45. Insert / update / search / print / delete in sorted array
https://leetcode.com/problems/concatenation-of-array/
https://leetcode.com/problems/how-many-numbers-are-smaller-than-the-
current-number/
https://leetcode.com/problems/count-number-of-pairs-with-absolute-differ
ence-k/
https://leetcode.com/problems/running-sum-of-1d-array/
https://leetcode.com/problems/number-of-good-pairs/
https://leetcode.com/problems/difference-between-element-sum-and-digi
t-sum-of-an-array/
https://leetcode.com/problems/sum-of-unique-elements/
https://leetcode.com/problems/left-and-right-sum-differences/
https://leetcode.com/problems/create-target-array-in-the-given-order/
https://leetcode.com/problems/sum-multiples/
https://leetcode.com/problems/number-of-arithmetic-triplets/
ArrayList
https://leetcode.com/problems/count-pairs-whose-sum-is-less-than-targe
t/description/
https://leetcode.com/problems/kids-with-the-greatest-number-of-candies/