13 views
22 Dec 2025
Given an array of integers, find both the maximum and minimum elements using an efficient approach and explain why it reduces comparisons....
17 views
22 Dec 2025
Reverse the elements of an array without using extra space and explain how swapping works step by step....
17 views
22 Dec 2025
Rotate an array to the right by K positions and describe different possible approaches....
13 views
22 Dec 2025
Find the second largest element in an array without sorting the array....
14 views
22 Dec 2025
Check whether a given array is sorted in ascending order and explain the logic used....
10 views
22 Dec 2025
Move all zero elements to the end of the array while maintaining the order of non-zero elements....
14 views
22 Dec 2025
Identify all duplicate elements present in an array using efficient techniques....
19 views
22 Dec 2025
Remove duplicate elements from a sorted array in-place and return the new length....
12 views
22 Dec 2025
Find the missing number in an array containing numbers from 1 to N....
15 views
22 Dec 2025
Find the maximum sum of a contiguous subarray and explain Kadane’s Algorithm....
16 views
22 Dec 2025
Count the frequency of each element in an array and store the result efficiently....
13 views
22 Dec 2025
Merge two sorted arrays into a single sorted array without using extra space if possible....
13 views
22 Dec 2025
Find the element that appears more than n/2 times in an array using optimized approach....
15 views
22 Dec 2025
Rearrange array elements in max-min alternate order....
11 views
22 Dec 2025
Check whether there exists a subarray with a given sum and explain the sliding window technique....
13 views
22 Dec 2025
Find the intersection of two arrays and return common elements....
16 views
22 Dec 2025
Find the union of two arrays and remove duplicates....
16 views
22 Dec 2025
Given stock prices, find the maximum profit by buying and selling once....
14 views
22 Dec 2025
Calculate how much rain water can be trapped between bars of different heights....
18 views
22 Dec 2025
Distribute chocolates such that the difference between max and min is minimum....