Array

Level: Beginner

1. Write a function to find the maximum number in an array.
2. Write a function to find the minimum number in an array.
3. Implement a function to calculate the sum of all elements in an array.
4. Write a function to count the number of even numbers in an array
5. Implement a function to count the number of odd numbers in an array.
6. Write a function to reverse an array.
7. Implement a function to find the average of elements in an array.
8. Write a function to check if a given element exists in an array.
9. Implement a function to find the index of a given element in an array.
10. Write a function to find the second largest number in an array.
11. Implement a function to remove duplicates from an array.
12. Write a function to sort an array in ascending order.
13. Implement a function to sort an array in descending order.
14. Write a function to find the median of an array.
15. Implement a function to merge two arrays into one.
16. Write a function to rotate an array to the right by one position.
17. Implement a function to rotate an array to the left by one position.
18. Write a function to find the intersection of two arrays.
19. Implement a function to find the union of two arrays.
20. Write a function to find the difference between two arrays.
21. Implement a function to find the maximum product of two numbers in an array.
22. Write a function to find the common elements in three arrays.
23. Implement a function to move all zeros to the end of an array.
24. Write a function to move all zeros to the beginning of an array.
25. Implement a function to separate even and odd numbers in an array.
26. Write a function to find the frequency of each element in an array.
27. Implement a function to remove a given element from an array.
28. Write a function to check if two arrays are equal.
29. Implement a function to find the missing number in an array of consecutive numbers.
30. Write a function to find the duplicate number in an array of integers.

Intermediate Level: View

Advanced Level: View