Set - 03 (array) related problems

   80 Problems   

Set - 03 (array) related problems, competitive programming


1. Compute the sum of all elements in a matrix.
2. Compute the product of all elements in a matrix.
3. Find the largest element in a matrix.
4. Find the smallest element in a matrix.
5. Check if a given matrix is symmetric.
6. Check if a given matrix is a diagonal matrix.
7. Add two matrices.
8. Subtract two matrices.
9. Multiply two matrices.
10. Find the sum of each row in a matrix.
11. Find the sum of each column in a matrix.
12. Find the average of each row in a matrix.
13. Find the average of each column in a matrix.
14. Check if all elements in a matrix are the same.
15. Check if a matrix is an identity matrix.
16. Check if a matrix is upper triangular.
17. Check if a matrix is lower triangular.
18. Check if a matrix is a square matrix.
19. Find the diagonal elements of a matrix.
20. Calculate the determinant of a 2x2 matrix.
21. Calculate the trace of a square matrix.
22. Rotate a matrix 90 degrees clockwise.
23. Rotate a matrix 90 degrees counterclockwise.
24. Generate a random matrix.
25. Transpose a matrix in-place.
26. Check if a matrix is a magic square.
27. Sort the rows of a matrix in ascending order.
28. Sort the columns of a matrix in descending order.
29. Find the median of each row in a matrix.
30. Find the mode of each column in a matrix.
31. Find the number of even elements in a matrix.
32. Find the number of odd elements in a matrix.
33. Find the number of prime elements in a matrix.
34. Find the number of zero elements in a matrix.
35. Check if a matrix is a toeplitz matrix.
36. Check if a matrix is a Hankel matrix.
37. Check if a matrix is a sparse matrix.
38. Perform matrix exponentiation.
39. Find the upper and lower bounds of a matrix.
40. Sort the entire matrix in ascending order.
41. Shuffle the rows of a matrix.
42. Shuffle the columns of a matrix.
43. Find the sum of left diagonal elements in a matrix.
44. Find the sum of right diagonal elements in a matrix.
45. Find the kth largest element in a matrix.
46. Find the kth smallest element in a matrix.
47. Find the product of elements in each row of a matrix.
48. Find the product of elements in each column of a matrix.
49. Perform matrix interpolation.
50. Remove duplicates from a matrix.
51. Find the sum of elements below the main diagonal of a square matrix.
52. Find the number of prime numbers in each row of a matrix.
53. Find the number of perfect squares in each column of a matrix.
54. Sort the rows of a matrix based on the sum of their elements.
55. Find the difference between the sum of even-indexed rows and the sum of odd-indexed rows in a matrix.
56. Perform matrix multiplication using dynamic memory allocation.
57. Create a Pascal's triangle using a 2D array.
58. Swap the rows and columns of a matrix.
59. Find the sum of each diagonal in a matrix.
60. Calculate the norm of a matrix.
61. Find the maximum element in each row of a matrix.
62. Find the minimum element in each column of a matrix.
63. Sort the matrix in a snake pattern (left to right and right to left alternately).
64. Calculate the row-wise and column-wise cumulative sum of a matrix.
65. Check if a matrix is a permutation matrix.
66. Find the row with the maximum sum in a matrix.
67. Find the column with the minimum sum in a matrix.
68. Find the number of elements greater than a threshold in each row of a matrix.
69. Find the number of elements less than a threshold in each column of a matrix.
70. Swap the maximum and minimum elements in each row of a matrix.
71. Find the row with the minimum sum in a matrix.
72. Find the column with the maximum sum in a matrix.
73. Rotate a matrix 180 degrees.
74. Check if a matrix is a submatrix of another matrix.
75. Calculate the average of each row in a matrix, excluding the largest and smallest elements.
76. Check if a matrix is a magic square using functions.
77. Find the row with the maximum sum of prime numbers in a matrix.
78. Find the column with the minimum sum of even numbers in a matrix.
79. Calculate the product of elements in the main diagonal of a matrix.
80. Swap the elements in the upper and lower triangles of a matrix.

Comments

Contact Form

Send

Archive