0% found this document useful (0 votes)
2K views2 pages

HackWithInfy Coding Questions Guide

The document lists important coding questions categorized by topics such as Arrays & Strings, Sorting + Greedy, Sliding Window, HashMap/Frequency Map, and Two Pointers. Each category contains specific problems that are essential for preparation for HackWithInfy. The questions cover various algorithms and data structures, providing a comprehensive guide for coding practice.

Uploaded by

Harish S
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)
2K views2 pages

HackWithInfy Coding Questions Guide

The document lists important coding questions categorized by topics such as Arrays & Strings, Sorting + Greedy, Sliding Window, HashMap/Frequency Map, and Two Pointers. Each category contains specific problems that are essential for preparation for HackWithInfy. The questions cover various algorithms and data structures, providing a comprehensive guide for coding practice.

Uploaded by

Harish S
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

HackWithInfy Preparation - Important Coding Questions (Topic-wise)

Arrays & Strings


1. Maximum Subarray Sum (Kadane's Algorithm)
2. Rearrange Array Alternately (high-low pattern)
3. Move All Zeros to End
4. Trapping Rain Water
5. Longest Substring Without Repeating Characters
6. Merge Intervals
7. Set Matrix Zeroes
8. Sort Colors (Dutch National Flag)
9. Rotate Array (left/right)
10. Next Permutation

Sorting + Greedy
1. Minimum Number of Platforms
2. Activity Selection Problem
3. Job Scheduling Problem with Deadlines
4. Meeting Rooms / Maximum Overlapping Intervals
5. Fractional Knapsack
6. Gas Station (circular travel)
7. Candy Distribution
8. Minimum Number of Coins to Reach Sum
9. Non-overlapping Intervals
10. Buy and Sell Stock (Single & Multiple Transactions)

Sliding Window
1. Maximum Sum Subarray of Size K
2. Longest Substring with K Distinct Characters
3. Count Occurrences of Anagrams
4. Minimum Window Substring
5. First Negative Number in Every Window of Size K
6. Subarrays with Sum Divisible by K
7. Max of All Subarrays (Sliding Window Max using Deque)

HashMap / Frequency Map


1. Two Sum
2. Subarray with Given Sum
3. Longest Substring with All Unique Characters
4. Count Distinct Elements in Every Window
5. Group Anagrams
6. Longest Consecutive Sequence
7. Frequency of Most Frequent Element
8. Find All Duplicates in an Array
9. Top K Frequent Elements
10. Intersection of Two Arrays

Two Pointers
1. Pair Sum / Two Sum using Two Pointers
2. Container With Most Water
3. 3Sum / 4Sum
4. Remove Duplicates from Sorted Array
5. Merge Two Sorted Arrays
6. Minimum Difference Pair
7. Partition Array
8. Move Even Numbers to Front
9. Check if Palindrome
10. Compare Version Numbers

You might also like