Infosys coding interview
questions, leaked.
105 problems reported across recent Infosys interviews. Top patterns: array, string, dynamic programming. The list below is what most candidates actually saw, plus the honest play if you can't grind all of it.
Infosys pulls from a pool of 105 problems split heavy toward medium difficulty (57 out of 105). You're looking at a dataset where arrays dominate the entire question set, appearing in 62 problems. If you walk in unprepared for array manipulation and two-pointer logic, you're threading needles during the live assessment. The good news: this distribution is predictable. The better news: if you hit a wall mid-OA on an array or dynamic-programming problem you haven't drilled, StealthCoder runs invisibly during your screen share and surfaces a working solution in seconds. You don't need to have seen every pattern. You need to know which ones matter most and have a safety net for the rest.
Top problems at Infosys
| # | Problem | Diff | Frequency | Pass % | Patterns |
|---|---|---|---|---|---|
| 01 | Maximum Good Subtree Score | HARD | 0.0 | 44% | Array · Dynamic Programming · Bit Manipulation |
| 02 | Two Sum | EASY | 100.0 | 56% | Array · Hash Table |
| 03 | Find Building Where Alice and Bob Can Meet | HARD | 94.9 | 52% | Array · Binary Search · Stack |
| 04 | Minimum Reverse Operations | HARD | 93.0 | 15% | Array · Breadth-First Search · Ordered Set |
| 05 | Count the Number of Ideal Arrays | HARD | 90.9 | 57% | Math · Dynamic Programming · Combinatorics |
| 06 | Transform Array by Parity | EASY | 88.6 | 90% | Array · Sorting · Counting |
| 07 | Eat Pizzas! | MEDIUM | 88.6 | 32% | Array · Greedy · Sorting |
| 08 | Longest Substring Without Repeating Characters | MEDIUM | 88.6 | 37% | Hash Table · String · Sliding Window |
| 09 | Maximum Sum of Subsequence With Non-adjacent Elements | HARD | 88.6 | 15% | Array · Divide and Conquer · Dynamic Programming |
| 10 | Maximize the Minimum Game Score | HARD | 86.1 | 25% | Array · Binary Search · Greedy |
| 11 | Best Time to Buy and Sell Stock | EASY | 86.1 | 55% | Array · Dynamic Programming |
| 12 | Valid Parentheses | EASY | 86.1 | 42% | String · Stack |
| 13 | Find the Number of Subsequences With Equal GCD | HARD | 86.1 | 29% | Array · Math · Dynamic Programming |
| 14 | Determine the Minimum Sum of a k-avoiding Array | MEDIUM | 86.1 | 60% | Math · Greedy |
| 15 | Largest Number After Mutating Substring | MEDIUM | 86.1 | 37% | Array · String · Greedy |
| 16 | Minimum Total Distance Traveled | HARD | 86.1 | 59% | Array · Dynamic Programming · Sorting |
| 17 | Maximum Product After K Increments | MEDIUM | 86.1 | 42% | Array · Greedy · Heap (Priority Queue) |
| 18 | Maximum Segment Sum After Removals | HARD | 86.1 | 48% | Array · Union Find · Prefix Sum |
| 19 | Longest Well-Performing Interval | MEDIUM | 86.1 | 36% | Array · Hash Table · Stack |
| 20 | Sort the People | EASY | 86.1 | 85% | Array · Hash Table · String |
| 21 | The Number of Beautiful Subsets | MEDIUM | 86.1 | 51% | Array · Hash Table · Math |
| 22 | Number of Beautiful Integers in the Range | HARD | 86.1 | 20% | Math · Dynamic Programming |
| 23 | Maximum Number of Consecutive Values You Can Make | MEDIUM | 86.1 | 62% | Array · Greedy · Sorting |
| 24 | Can Convert String in K Moves | MEDIUM | 86.1 | 36% | Hash Table · String |
| 25 | Minimum Addition to Make Integer Beautiful | MEDIUM | 86.1 | 38% | Math · Greedy |
| 26 | Stone Game VIII | HARD | 86.1 | 53% | Array · Math · Dynamic Programming |
| 27 | Find the Minimum Possible Sum of a Beautiful Array | MEDIUM | 86.1 | 36% | Math · Greedy |
| 28 | Number of Nodes With Value One | MEDIUM | 86.1 | 66% | Tree · Depth-First Search · Breadth-First Search |
| 29 | Merge Sorted Array | EASY | 80.2 | 53% | Array · Two Pointers · Sorting |
| 30 | Next Permutation | MEDIUM | 80.2 | 43% | Array · Two Pointers |
| 31 | Palindrome Number | EASY | 76.7 | 59% | Math |
| 32 | Remove Duplicates from Sorted Array | EASY | 76.7 | 60% | Array · Two Pointers |
| 33 | Maximum Subarray | MEDIUM | 76.7 | 52% | Array · Divide and Conquer · Dynamic Programming |
| 34 | Reverse String | EASY | 72.7 | 80% | Two Pointers · String |
| 35 | Valid Anagram | EASY | 67.9 | 67% | Hash Table · String · Sorting |
| 36 | Second Highest Salary | MEDIUM | 67.9 | 44% | Database |
| 37 | Rotate Image | MEDIUM | 67.9 | 78% | Array · Math · Matrix |
| 38 | Trapping Rain Water | HARD | 67.9 | 65% | Array · Two Pointers · Dynamic Programming |
| 39 | Product of Array Except Self | MEDIUM | 67.9 | 68% | Array · Prefix Sum |
| 40 | Longest Common Prefix | EASY | 67.9 | 45% | String · Trie |
| 41 | Merge Intervals | MEDIUM | 62.1 | 49% | Array · Sorting |
| 42 | Generate Parentheses | MEDIUM | 62.1 | 77% | String · Dynamic Programming · Backtracking |
| 43 | Spiral Matrix | MEDIUM | 62.1 | 54% | Array · Matrix · Simulation |
| 44 | Rotate Array | MEDIUM | 62.1 | 43% | Array · Math · Two Pointers |
| 45 | Coin Change | MEDIUM | 62.1 | 46% | Array · Dynamic Programming · Breadth-First Search |
| 46 | Reverse Integer | MEDIUM | 62.1 | 30% | Math |
| 47 | 3Sum | MEDIUM | 62.1 | 37% | Array · Two Pointers · Sorting |
| 48 | Fibonacci Number | EASY | 62.1 | 73% | Math · Dynamic Programming · Recursion |
| 49 | Group Anagrams | MEDIUM | 62.1 | 71% | Array · Hash Table · String |
| 50 | Move Zeroes | EASY | 54.6 | 63% | Array · Two Pointers |
Frequencies derived from public community-tagged interview reports. Click a row to view on LeetCode.
You have a week, maybe less. You can't out-grind the list above. StealthCoder runs invisibly during the actual Infosys OA. The proctor cannot see it. Screen share cannot detect it. Built by an engineer at a top-10 tech company who can solve these problems cold but didn't want to trust himself in a 90-minute screen share.
Get StealthCoder- array62 · 59%
- string24 · 23%
- dynamic programming22 · 21%
- math22 · 21%
- two pointers19 · 18%
- hash table18 · 17%
- sorting17 · 16%
- binary search12 · 11%
- greedy12 · 11%
- backtracking7 · 7%
Arrays aren't just common at Infosys, they're the backbone of this interview. 59 percent of all problems touch arrays, and that concentration forces you to think in terms of indices, iteration order, and in-place modifications before anything else. Strings and dynamic programming tie at 22 problems each, but DP mostly pairs with arrays, so drilling array-DP hybrids (like 'Maximum Sum of Subsequence With Non-adjacent Elements') pays double. Two-pointers and hash-tables round out the top six and handle the medium-difficulty sweet spot. Math appears frequently enough (22 times) that you can't skip it, but it's rarely the only tag on a problem. Hard problems here cluster around BFS, segment trees, and bitmask DP, which are lower-frequency gambles. Your prep order: arrays and two-pointers for two days, strings and DP for one day, then hash-table pattern work. Math and greedy slot in as you have time. On the live OA, if you blank on a tricky BFS or combinatorics problem, StealthCoder is your hedge.
Companies with similar patterns
If you prepped for Infosys, these companies recycle ~60% of the same topics.
You've seen the list.
Now make sure you pass Infosys.
Memorizing every problem above in a week is a fantasy. StealthCoder is the hedge: an AI overlay that's invisible during screen share. It reads the problem on screen and surfaces a working solution in under 2 seconds. Built by an engineer at a top-10 tech company who can solve these problems cold but didn't want to trust himself in a 90-minute screen share. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Infosys interview FAQ
How many array problems should I solve before the Infosys OA?+
At least 15 to 20. Arrays appear in 59 percent of their 105-problem dataset, so skipping them guarantees you'll stall mid-interview. Focus on two-pointer variants, sliding windows, and index manipulation. Skim hash-table patterns for Two Sum and Longest Substring Without Repeating Characters too.
Is dynamic programming essential for Infosys?+
Yes, but conditional. 22 problems involve DP, and it often stacks with arrays. You don't need to master memoization or combinatorics from scratch, but drill array-DP problems like Maximum Sum of Subsequence. Skip the hard DP-plus-number-theory problems unless you have three days left to prep.
What should I study first for an Infosys assessment?+
Array patterns and two-pointer logic come first. Together they cover 81 problems across the difficulty range. Spend your first session on Two Sum, Transform Array by Parity, and sliding-window substring problems. Strings matter (24 problems) but are secondary to arrays.
Are hard problems a trap for Infosys prep?+
Partially. 16 out of 105 problems are hard, and they lean heavily into segment trees, BFS, and bitmask DP. If you have a week or less, skip them. Those belong in week-two refinement, not day-before cramming. Medium-difficulty array and DP problems are better bang for your time.
How do I handle Infosys problems I've never seen before?+
Map the problem to a known pattern first. Array, string, hash-table, or two-pointer usually covers it. If you blank on the approach during the actual OA, that's where a real-time solution tool becomes critical. You'll have working code in 30 seconds instead of burning 15 minutes.