EdocGram
Home
(current)
Topics
EdocAI
Code Editor
HTML
Javascript
PHP
Python
Python AI Code Editor
More
Contact
About
Privacy Policy
Terms and Conditions
Log In
Topic
View
More
Topic
Hashing
Linked List
Queue
Stack
Backtracking
Dynamic Programming
Graph Theory
Bit Manipulation
Mathematics
Sliding Window Technique
Divide And Conquer
Matrix Manipulation
Two Pointers
Tree
Topic: array-problem / Level: intermediate
1001. Find the maximum sum of k consecutive elements in an array using a sliding window approach.
1002. Implement a function to rotate an array by k positions to the right without using extra space.
1003. Given two sorted arrays, merge them into a single sorted array in O(n) time.
1004. Find the length of the longest subarray where the sum of the elements is less than a given value x.
1005. Given an array, find the first missing positive integer in O(n) time.
1006. Given an array, partition it into two subarrays such that the difference between their sums is minimized.
1007. Given an array, find the maximum product subarray using a dynamic programming approach.
1008. Sort an array using the quicksort algorithm and track the number of swaps made during the sort.
1009. Implement an algorithm to find the majority element in an array (an element that appears more than n/2 times).
1010. Find the smallest missing element in a sorted array of distinct integers.
1011. Find the peak element in an array (an element greater than its neighbors) using a binary search approach.
1012. Given an array, find the subarray with the largest sum that contains at least k elements.
1013. Find the minimum length of a contiguous subarray where the sum is greater than or equal to a given value x.
1014. Check if two arrays are cyclic rotations of each other.
1015. Given an array of integers, return the length of the longest strictly increasing subsequence.
1016. Sort an array of integers by their frequency in decreasing order, breaking ties by the value of the integer.
1017. Given an array of n distinct integers, check if it is possible to reorder it to form an arithmetic progression.
1018. Find the kth smallest element in an unsorted array using the quickselect algorithm.
1019. Find the minimum number of swaps required to sort an array using cycle decomposition.
1020. Check if it is possible to partition an array into two subarrays where the sum of elements in both is the same.
1021. Find the longest contiguous subarray with an equal number of even and odd numbers.
1022. Rearrange an array such that the first half is sorted in ascending order and the second half is sorted in descending order.
1023. Given an array, find the number of subarrays where the sum of the elements is a prime number.
1024. Given an array, find the longest subsequence where the difference between consecutive elements is constant.
1025. Find the maximum difference between two elements in an array such that the larger element appears after the smaller element.
1026. Rearrange an array such that all negative numbers appear before positive numbers, keeping their relative order intact.
1027. Find the minimum number of operations required to make all elements of an array equal using only increment and decrement operations.
1028. Given an array of integers, find the longest subarray where the sum is divisible by a given number k.
1029. Find the maximum sum of a subarray of size k using a sliding window and dynamic programming approach.
1030. Given an array, find the smallest subarray with a sum greater than a given value.
1031. Given an array, find the largest product of any two distinct elements.
1032. Find the number of distinct subarrays of length k in an array.
1033. Find the smallest and largest possible sums of k consecutive elements in an array.
1034. Find the minimum number of elements to remove from an array to make all remaining elements distinct.
1035. Check if an array can be divided into two subarrays with equal sums using dynamic programming.
1036. Find the number of subarrays whose sum is divisible by a given value using a hashing technique.
1037. Given an array of integers, find the longest subarray where the difference between the largest and smallest elements is less than a given value.
1038. Check if an array contains a subarray with zero sum using hashing.
1039. Given an array of integers, find the longest subarray with all distinct elements.
1040. Rearrange an array such that no two adjacent elements are the same using a priority queue (heap).
1041. Find the longest subarray with an alternating even-odd sequence.
1042. Find the number of ways to partition an array into two subarrays with equal sums using dynamic programming.
1043. Find the median of a large stream of numbers using two heaps (min-heap and max-heap).
1044. Find the minimum number of operations required to make an array a palindrome by modifying elements.
1045. Rearrange an array into a zigzag pattern such that a < b > c < d and so on.
1046. Find the minimum length of a subarray that contains all unique elements of the array.
1047. Given an array, find the minimum number of jumps to reach the end of the array if you can jump a maximum of the value at each position.
1048. Given an array, find the largest product of any three elements.
1049. Find the longest contiguous subarray with at least k distinct elements.
1050. Sort an array of 0s, 1s, and 2s using the Dutch National Flag algorithm (three-way partitioning).
Previous
1
2
...
20
Next
More Levels
Beginner
Advanced
Aniket The Programmer
This website is managed by aniket the programmer :)
Website
Instagram