0% found this document useful (0 votes)
3 views2 pages

Array Algorithms Guide

The document outlines a series of algorithmic problems categorized by difficulty levels: Basic, Intermediate, Advanced, and Expert. Each level includes various tasks such as finding maximum and minimum elements, rotating matrices, and working with subarrays using different techniques like two-pointer, sliding window, and binary search. The tasks aim to enhance problem-solving skills in data structures and algorithms.

Uploaded by

Mohit Sonkar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Array Algorithms Guide

The document outlines a series of algorithmic problems categorized by difficulty levels: Basic, Intermediate, Advanced, and Expert. Each level includes various tasks such as finding maximum and minimum elements, rotating matrices, and working with subarrays using different techniques like two-pointer, sliding window, and binary search. The tasks aim to enhance problem-solving skills in data structures and algorithms.

Uploaded by

Mohit Sonkar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Basic Level

• Find maximum element – Iteration


• Find minimum element – Iteration
• Sum of elements – Iteration
• Reverse array – Two-pointer
• Check sorted array – Iteration
• Remove duplicates (sorted) – Two-pointer
• Rotate array by k – Basic manipulation
• Kth largest element – Sorting / Max Heap
• Kth smallest element – Sorting / Min Heap
• Move zeroes to end – Two-pointer

Intermediate Level

• Rotate NxN matrix by 90° – Transpose & reverse


• Find pairs with target sum – Two-pointer / Hashing
• Cyclic rotation – Cyclic Sort
• Celebrity problem – Two-pointer
• Maximum subarray sum – Kadane’s Algorithm
• Merge two sorted arrays – Two-pointer
• Search in rotated array – Binary Search
• Intersection of arrays – Hashing
• Majority element – Boyer-Moore
• Longest increasing subsequence – DP

Advanced Level

• First missing positive – Cyclic Sort


• Sort 0s,1s,2s – Dutch National Flag
• Longest subarray with ≤2 distinct – Sliding Window
• Median of two sorted arrays – Binary Search
• Rotate array without space – Reverse method
• Shortest subarray ≥ K – Sliding Window
• Equilibrium index – Prefix Sum
• Peak element – Binary Search
• Count subarrays with sum – Prefix Sum
• Equal 0s and 1s subarray – Prefix Sum
Expert Level

• Max product of 3 numbers – Sorting


• Longest subarray sum divisible by k – Prefix + Hashing
• Minimum window containing another array – Sliding Window
• Longest subarray with abs diff ≤ k – Sliding Window
• Smallest subarray with sum > value – Sliding Window
• Minimum platforms – Sorting
• Max length subarray ≤ sum – Sliding Window
• Subarray with least average – Sliding Window
• In-place matrix rotation – Transpose & reverse
• Longest subarray with ≤K distinct – Sliding Window

You might also like