[go: up one dir, main page]

0% found this document useful (0 votes)
33 views3 pages

Infosys 50 Coding Patterns

Uploaded by

sohansahu2025
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)
33 views3 pages

Infosys 50 Coding Patterns

Uploaded by

sohansahu2025
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
You are on page 1/ 3

Infosys Coding Preparation - 50 Repeated Patterns

This PDF contains the most common 50 coding problem patterns frequently asked in Infosys
recruitment drives. Each problem belongs to a well-known category, and similar problems often
repeat in exams. Sources where you can practice these problems are also mentioned.

Sliding Window
• Count Anagrams (LeetCode 438)
• Subarray with Sum = K (LeetCode 560)
• Longest Substring without Repeating Characters (LeetCode 3)

Two Pointers
• Pair Sum in Sorted Array (LeetCode 167)
• Move Zeroes (LeetCode 283)
• Trapping Rain Water (LeetCode 42)

Prefix Sum / Kadane


• Maximum Subarray (LeetCode 53)
• Subarray Sums Divisible by K (LeetCode 974)
• Equilibrium Index (GeeksforGeeks)

HashMap / Frequency
• Valid Anagram (LeetCode 242)
• Count Distinct Elements in Window (GFG)
• First Non-repeating Character (LeetCode 387)

Sorting + Greedy
• Activity Selection (GFG)
• Minimum Platforms (GFG)
• Job Sequencing (GFG)

Binary Search Variants


• First and Last Position (LeetCode 34)
• Peak Element (LeetCode 162)
• Search Rotated Sorted Array (LeetCode 33)

Matrix Traversal
• Spiral Matrix (LeetCode 54)
• Rotate Image (LeetCode 48)
• Word Search (LeetCode 79)

String Manipulation
• Reverse Words in String (LeetCode 151)
• Longest Palindrome Substring (LeetCode 5)
• Check Rotation (GFG)

Subarray/Subsequence
• Maximum Product Subarray (LeetCode 152)
• Longest Increasing Subsequence (LeetCode 300)
• Count Subsequences (GFG)

Dynamic Programming
• Coin Change (LeetCode 322)
• Rod Cutting (GFG)
• 0/1 Knapsack (GFG)

Backtracking
• N Queens (LeetCode 51)
• Rat in a Maze (GFG)
• Subsets (LeetCode 78)

Stack Based
• Next Greater Element (LeetCode 496)
• Valid Parentheses (LeetCode 20)
• Stock Span Problem (GFG)

Queue / Deque
• Sliding Window Maximum (LeetCode 239)
• Rotten Oranges (LeetCode 994)
• Circular Petrol Pump Tour (GFG)

Graph Basics
• BFS Traversal (GFG)
• Cycle Detection (GFG)
• Shortest Path in Graph (GFG)

Greedy + Heap
• Huffman Encoding (GFG)
• Connect Ropes Min Cost (LeetCode 1167)
• Top K Frequent Elements (LeetCode 347)

Number Theory
• GCD and LCM (GFG)
• Prime Factorization (GFG)
• Modular Exponentiation (GFG)

Bit Manipulation
• Single Number (LeetCode 136)
• Count Set Bits (LeetCode 191)
• Subsets using Bitmask (LeetCode 78)

Linked List
• Detect Cycle (LeetCode 141)
• Reverse Linked List (LeetCode 206)
• Merge Sorted Lists (LeetCode 21)

Binary Tree
• Level Order Traversal (LeetCode 102)
• Diameter of Binary Tree (LeetCode 543)
• Lowest Common Ancestor (LeetCode 236)

Trie / Advanced String


• Implement Trie (LeetCode 208)
• Word Break (LeetCode 139)
• Auto-complete (GFG)

Special Array Patterns


• Leaders in Array (GFG)
• Majority Element (LeetCode 169)
• Rearrange Pos/Neg Alternately (GFG)

Simulation / Implementation
• Rotate Array (LeetCode 189)
• Pascal Triangle (LeetCode 118)
• Josephus Problem (GFG)

Mathematical Patterns
• Armstrong Number (GFG)
• Digital Root (LeetCode 258)
• Happy Number (LeetCode 202)

Combinatorics
• Balanced Parentheses (LeetCode 22)
• Pascal’s Triangle (LeetCode 118)
• Grid Unique Paths (LeetCode 62)

Miscellaneous
• Minimum Swaps to Sort (GFG)
• Rainwater Trapping (LeetCode 42)
• Candy Distribution (LeetCode 135)

You might also like