Java Arrays & Matrices - 400 Question Checklist
---
1. 1. Create an array of integers.
2. 2. Initialize an array with predefined values.
3. 3. Find the length of an array.
4. 4. Access the first and last elements of an array.
5. 5. Modify an element at a given index.
6. 6. Iterate over an array using a for loop.
7. 7. Iterate over an array using an enhanced for loop.
8. 8. Iterate over an array using a while loop.
9. 9. Print an array using [Link]().
10. 10. Sum all elements of an array.
11. 11. Find the maximum element in an array.
12. 12. Find the minimum element in an array.
13. 13. Calculate the average of array elements.
14. 14. Find the index of a specific element.
15. 15. Count even numbers in an array.
16. 16. Count odd numbers in an array.
17. 17. Replace negative numbers with zero.
18. 18. Copy elements to another array.
19. 19. Clone an array.
20. 20. Check if an array is empty.
21. 21. Swap two elements in an array.
22. 22. Find the frequency of a particular element.
23. 23. Check if the array contains a specific value.
24. 24. Print all odd elements.
25. 25. Print all even elements.
26. 26. Find maximum and minimum in a single traversal.
27. 27. Calculate the product of array elements.
28. 28. Separate positive and negative numbers.
29. 29. Move all zeros to the end.
30. 30. Move all zeros to the beginning.
31. 31. Reverse an array.
32. 32. Rotate an array left by one position.
33. 33. Rotate an array right by one position.
34. 34. Rotate an array by k positions.
35. 35. Shift array elements left by one position.
36. 36. Shift array elements right by one position.
37. 37. Merge two arrays.
38. 38. Find the intersection of two arrays.
39. 39. Find the union of two arrays.
40. 40. Find the difference of two arrays.
41. 41. Remove duplicates from an array.
42. 42. Find the second largest element.
43. 43. Find the second smallest element.
44. 44. Find all unique elements.
45. 45. Find frequency of each element.
46. 46. Find the most frequent element.
47. 47. Check if arrays are equal.
48. 48. Check if arrays are permutations.
49. 49. Find subarrays with sum zero.
50. 50. Find all pairs with a given sum.
51. 51. Find triplets with a given sum.
52. 52. Count pairs with given sum.
53. 53. Find subarrays with a given XOR.
54. 54. Find longest subarray with given sum.
55. 55. Find minimum length subarray with sum >= target.
56. 56. Find maximum sum of k consecutive elements.
57. 57. Find minimum swaps required to bring elements <= k together.
58. 58. Minimum operations to equalize array elements.
59. 59. Check if array can become non-decreasing by modifying at most one element.
60. 60. Find equilibrium index of an array.
61. 61. Sort an array using Bubble Sort.
62. 62. Sort an array using Selection Sort.
63. 63. Sort an array using Insertion Sort.
64. 64. Sort an array using Merge Sort.
65. 65. Sort an array using Quick Sort.
66. 66. Sort an array using [Link]().
67. 67. Sort an array using [Link]().
68. 68. Perform Binary Search on a sorted array.
69. 69. Find the first occurrence of a number.
70. 70. Find the last occurrence of a number.
71. 71. Find the number of rotations in a sorted rotated array.
72. 72. Find the pivot element in a rotated sorted array.
73. 73. Find the peak element.
74. 74. Find missing number from 1 to n.
75. 75. Find duplicate number in an array.
76. 76. Find multiple duplicates in an array.
77. 77. Find element appearing once when others appear twice.
78. 78. Find maximum product subarray.
79. 79. Find maximum sum subarray (Kadane’s algorithm).
80. 80. Trapping Rain Water Problem.
81. 81. Maximum Consecutive Ones.
82. 82. Find leaders in an array.
83. 83. Find minimum number of platforms required for railway station.
84. 84. Count inversions in an array.
85. 85. Smallest subarray with sum greater than a value.
86. 86. Minimum operations to make an array palindromic.
87. 87. Longest subarray with equal number of 0s and 1s.
88. 88. Largest sum contiguous subarray (Kadane’s).
89. 89. Find minimum moves to equal array elements.
90. 90. Find minimum adjacent swaps to convert a binary array to all 1s.
91. 91. Create an array of integers.
92. 92. Initialize an array with predefined values.
93. 93. Find the length of an array.
94. 94. Access the first and last elements of an array.
95. 95. Modify an element at a given index.
96. 96. Iterate over an array using a for loop.
97. 97. Iterate over an array using an enhanced for loop.
98. 98. Iterate over an array using a while loop.
99. 99. Print an array using [Link]().
100. 100. Sum all elements of an array.
101. 101. Find the maximum element in an array.
102. 102. Find the minimum element in an array.
103. 103. Calculate the average of array elements.
104. 104. Find the index of a specific element.
105. 105. Count even numbers in an array.
106. 106. Count odd numbers in an array.
107. 107. Replace negative numbers with zero.
108. 108. Copy elements to another array.
109. 109. Clone an array.
110. 110. Check if an array is empty.
111. 111. Swap two elements in an array.
112. 112. Find the frequency of a particular element.
113. 113. Check if the array contains a specific value.
114. 114. Print all odd elements.
115. 115. Print all even elements.
116. 116. Find maximum and minimum in a single traversal.
117. 117. Calculate the product of array elements.
118. 118. Separate positive and negative numbers.
119. 119. Move all zeros to the end.
120. 120. Move all zeros to the beginning.
121. 121. Reverse an array.
122. 122. Rotate an array left by one position.
123. 123. Rotate an array right by one position.
124. 124. Rotate an array by k positions.
125. 125. Shift array elements left by one position.
126. 126. Shift array elements right by one position.
127. 127. Merge two arrays.
128. 128. Find the intersection of two arrays.
129. 129. Find the union of two arrays.
130. 130. Find the difference of two arrays.
131. 131. Remove duplicates from an array.
132. 132. Find the second largest element.
133. 133. Find the second smallest element.
134. 134. Find all unique elements.
135. 135. Find frequency of each element.
136. 136. Find the most frequent element.
137. 137. Check if arrays are equal.
138. 138. Check if arrays are permutations.
139. 139. Find subarrays with sum zero.
140. 140. Find all pairs with a given sum.
141. 141. Find triplets with a given sum.
142. 142. Count pairs with given sum.
143. 143. Find subarrays with a given XOR.
144. 144. Find longest subarray with given sum.
145. 145. Find minimum length subarray with sum >= target.
146. 146. Find maximum sum of k consecutive elements.
147. 147. Find minimum swaps required to bring elements <= k together.
148. 148. Minimum operations to equalize array elements.
149. 149. Check if array can become non-decreasing by modifying at most one element.
150. 150. Find equilibrium index of an array.
151. 151. Sort an array using Bubble Sort.
152. 152. Sort an array using Selection Sort.
153. 153. Sort an array using Insertion Sort.
154. 154. Sort an array using Merge Sort.
155. 155. Sort an array using Quick Sort.
156. 156. Sort an array using [Link]().
157. 157. Sort an array using [Link]().
158. 158. Perform Binary Search on a sorted array.
159. 159. Find the first occurrence of a number.
160. 160. Find the last occurrence of a number.
161. 161. Find the number of rotations in a sorted rotated array.
162. 162. Find the pivot element in a rotated sorted array.
163. 163. Find the peak element.
164. 164. Find missing number from 1 to n.
165. 165. Find duplicate number in an array.
166. 166. Find multiple duplicates in an array.
167. 167. Find element appearing once when others appear twice.
168. 168. Find maximum product subarray.
169. 169. Find maximum sum subarray (Kadane’s algorithm).
170. 170. Trapping Rain Water Problem.
171. 171. Maximum Consecutive Ones.
172. 172. Find leaders in an array.
173. 173. Find minimum number of platforms required for railway station.
174. 174. Count inversions in an array.
175. 175. Smallest subarray with sum greater than a value.
176. 176. Minimum operations to make an array palindromic.
177. 177. Longest subarray with equal number of 0s and 1s.
178. 178. Largest sum contiguous subarray (Kadane’s).
179. 179. Find minimum moves to equal array elements.
180. 180. Find minimum adjacent swaps to convert a binary array to all 1s.
181. 181. Create an array of integers.
182. 182. Initialize an array with predefined values.
183. 183. Find the length of an array.
184. 184. Access the first and last elements of an array.
185. 185. Modify an element at a given index.
186. 186. Iterate over an array using a for loop.
187. 187. Iterate over an array using an enhanced for loop.
188. 188. Iterate over an array using a while loop.
189. 189. Print an array using [Link]().
190. 190. Sum all elements of an array.
191. 191. Find the maximum element in an array.
192. 192. Find the minimum element in an array.
193. 193. Calculate the average of array elements.
194. 194. Find the index of a specific element.
195. 195. Count even numbers in an array.
196. 196. Count odd numbers in an array.
197. 197. Replace negative numbers with zero.
198. 198. Copy elements to another array.
199. 199. Clone an array.
200. 200. Check if an array is empty.
201. 201. Swap two elements in an array.
202. 202. Find the frequency of a particular element.
203. 203. Check if the array contains a specific value.
204. 204. Print all odd elements.
205. 205. Print all even elements.
206. 206. Find maximum and minimum in a single traversal.
207. 207. Calculate the product of array elements.
208. 208. Separate positive and negative numbers.
209. 209. Move all zeros to the end.
210. 210. Move all zeros to the beginning.
211. 211. Reverse an array.
212. 212. Rotate an array left by one position.
213. 213. Rotate an array right by one position.
214. 214. Rotate an array by k positions.
215. 215. Shift array elements left by one position.
216. 216. Shift array elements right by one position.
217. 217. Merge two arrays.
218. 218. Find the intersection of two arrays.
219. 219. Find the union of two arrays.
220. 220. Find the difference of two arrays.
221. 221. Remove duplicates from an array.
222. 222. Find the second largest element.
223. 223. Find the second smallest element.
224. 224. Find all unique elements.
225. 225. Find frequency of each element.
226. 226. Find the most frequent element.
227. 227. Check if arrays are equal.
228. 228. Check if arrays are permutations.
229. 229. Find subarrays with sum zero.
230. 230. Find all pairs with a given sum.
231. 231. Find triplets with a given sum.
232. 232. Count pairs with given sum.
233. 233. Find subarrays with a given XOR.
234. 234. Find longest subarray with given sum.
235. 235. Find minimum length subarray with sum >= target.
236. 236. Find maximum sum of k consecutive elements.
237. 237. Find minimum swaps required to bring elements <= k together.
238. 238. Minimum operations to equalize array elements.
239. 239. Check if array can become non-decreasing by modifying at most one element.
240. 240. Find equilibrium index of an array.
241. 241. Sort an array using Bubble Sort.
242. 242. Sort an array using Selection Sort.
243. 243. Sort an array using Insertion Sort.
244. 244. Sort an array using Merge Sort.
245. 245. Sort an array using Quick Sort.
246. 246. Sort an array using [Link]().
247. 247. Sort an array using [Link]().
248. 248. Perform Binary Search on a sorted array.
249. 249. Find the first occurrence of a number.
250. 250. Find the last occurrence of a number.
251. 251. Find the number of rotations in a sorted rotated array.
252. 252. Find the pivot element in a rotated sorted array.
253. 253. Find the peak element.
254. 254. Find missing number from 1 to n.
255. 255. Find duplicate number in an array.
256. 256. Find multiple duplicates in an array.
257. 257. Find element appearing once when others appear twice.
258. 258. Find maximum product subarray.
259. 259. Find maximum sum subarray (Kadane’s algorithm).
260. 260. Trapping Rain Water Problem.
261. 261. Maximum Consecutive Ones.
262. 262. Find leaders in an array.
263. 263. Find minimum number of platforms required for railway station.
264. 264. Count inversions in an array.
265. 265. Smallest subarray with sum greater than a value.
266. 266. Minimum operations to make an array palindromic.
267. 267. Longest subarray with equal number of 0s and 1s.
268. 268. Largest sum contiguous subarray (Kadane’s).
269. 269. Find minimum moves to equal array elements.
270. 270. Find minimum adjacent swaps to convert a binary array to all 1s.
271. 271. Create an array of integers.
272. 272. Initialize an array with predefined values.
273. 273. Find the length of an array.
274. 274. Access the first and last elements of an array.
275. 275. Modify an element at a given index.
276. 276. Iterate over an array using a for loop.
277. 277. Iterate over an array using an enhanced for loop.
278. 278. Iterate over an array using a while loop.
279. 279. Print an array using [Link]().
280. 280. Sum all elements of an array.
281. 281. Find the maximum element in an array.
282. 282. Find the minimum element in an array.
283. 283. Calculate the average of array elements.
284. 284. Find the index of a specific element.
285. 285. Count even numbers in an array.
286. 286. Count odd numbers in an array.
287. 287. Replace negative numbers with zero.
288. 288. Copy elements to another array.
289. 289. Clone an array.
290. 290. Check if an array is empty.
291. 291. Swap two elements in an array.
292. 292. Find the frequency of a particular element.
293. 293. Check if the array contains a specific value.
294. 294. Print all odd elements.
295. 295. Print all even elements.
296. 296. Find maximum and minimum in a single traversal.
297. 297. Calculate the product of array elements.
298. 298. Separate positive and negative numbers.
299. 299. Move all zeros to the end.
300. 300. Move all zeros to the beginning.
301. 301. Reverse an array.
302. 302. Rotate an array left by one position.
303. 303. Rotate an array right by one position.
304. 304. Rotate an array by k positions.
305. 305. Shift array elements left by one position.
306. 306. Shift array elements right by one position.
307. 307. Merge two arrays.
308. 308. Find the intersection of two arrays.
309. 309. Find the union of two arrays.
310. 310. Find the difference of two arrays.
311. 311. Remove duplicates from an array.
312. 312. Find the second largest element.
313. 313. Find the second smallest element.
314. 314. Find all unique elements.
315. 315. Find frequency of each element.
316. 316. Find the most frequent element.
317. 317. Check if arrays are equal.
318. 318. Check if arrays are permutations.
319. 319. Find subarrays with sum zero.
320. 320. Find all pairs with a given sum.
321. 321. Find triplets with a given sum.
322. 322. Count pairs with given sum.
323. 323. Find subarrays with a given XOR.
324. 324. Find longest subarray with given sum.
325. 325. Find minimum length subarray with sum >= target.
326. 326. Find maximum sum of k consecutive elements.
327. 327. Find minimum swaps required to bring elements <= k together.
328. 328. Minimum operations to equalize array elements.
329. 329. Check if array can become non-decreasing by modifying at most one element.
330. 330. Find equilibrium index of an array.
331. 331. Sort an array using Bubble Sort.
332. 332. Sort an array using Selection Sort.
333. 333. Sort an array using Insertion Sort.
334. 334. Sort an array using Merge Sort.
335. 335. Sort an array using Quick Sort.
336. 336. Sort an array using [Link]().
337. 337. Sort an array using [Link]().
338. 338. Perform Binary Search on a sorted array.
339. 339. Find the first occurrence of a number.
340. 340. Find the last occurrence of a number.
341. 341. Find the number of rotations in a sorted rotated array.
342. 342. Find the pivot element in a rotated sorted array.
343. 343. Find the peak element.
344. 344. Find missing number from 1 to n.
345. 345. Find duplicate number in an array.
346. 346. Find multiple duplicates in an array.
347. 347. Find element appearing once when others appear twice.
348. 348. Find maximum product subarray.
349. 349. Find maximum sum subarray (Kadane’s algorithm).
350. 350. Trapping Rain Water Problem.
351. 351. Maximum Consecutive Ones.
352. 352. Find leaders in an array.
353. 353. Find minimum number of platforms required for railway station.
354. 354. Count inversions in an array.
355. 355. Smallest subarray with sum greater than a value.
356. 356. Minimum operations to make an array palindromic.
357. 357. Longest subarray with equal number of 0s and 1s.
358. 358. Largest sum contiguous subarray (Kadane’s).
359. 359. Find minimum moves to equal array elements.
360. 360. Find minimum adjacent swaps to convert a binary array to all 1s.
361. 361. Create an array of integers.
362. 362. Initialize an array with predefined values.
363. 363. Find the length of an array.
364. 364. Access the first and last elements of an array.
365. 365. Modify an element at a given index.
366. 366. Iterate over an array using a for loop.
367. 367. Iterate over an array using an enhanced for loop.
368. 368. Iterate over an array using a while loop.
369. 369. Print an array using [Link]().
370. 370. Sum all elements of an array.
371. 371. Find the maximum element in an array.
372. 372. Find the minimum element in an array.
373. 373. Calculate the average of array elements.
374. 374. Find the index of a specific element.
375. 375. Count even numbers in an array.
376. 376. Count odd numbers in an array.
377. 377. Replace negative numbers with zero.
378. 378. Copy elements to another array.
379. 379. Clone an array.
380. 380. Check if an array is empty.
381. 381. Swap two elements in an array.
382. 382. Find the frequency of a particular element.
383. 383. Check if the array contains a specific value.
384. 384. Print all odd elements.
385. 385. Print all even elements.
386. 386. Find maximum and minimum in a single traversal.
387. 387. Calculate the product of array elements.
388. 388. Separate positive and negative numbers.
389. 389. Move all zeros to the end.
390. 390. Move all zeros to the beginning.
391. 391. Reverse an array.
392. 392. Rotate an array left by one position.
393. 393. Rotate an array right by one position.
394. 394. Rotate an array by k positions.
395. 395. Shift array elements left by one position.
396. 396. Shift array elements right by one position.
397. 397. Merge two arrays.
398. 398. Find the intersection of two arrays.
399. 399. Find the union of two arrays.
400. 400. Find the difference of two arrays.