Infosys coding interview questions
Ranked by how often candidates report them. Each opens in the editor with hidden tests, an animated walkthrough and solutions in four languages; a question you solve once counts for every company that asks it.
| Progress | Title | Difficulty | Next step |
|---|---|---|---|
| Two SumTwo Sum | Easy | Solve | |
| Longest Substring Without Repeating CharactersSliding Window · Variable | Medium | Solve | |
| Best Time to Buy and Sell StockState Machine DP - Stock Problems | Easy | Solve | |
| Subarray Sum Equals KPrefix Sum Strategy | Medium | Solve | |
| Kadane's Algorithm - SimpleKadane's Algorithm | Medium | Solve | |
| Gas StationKadane's Algorithm | Medium | Solve | |
| Palindrome NumberMath / Number Theory | Easy | Solve | |
| Longest Palindromic SubstringStrings | Medium | Solve | |
| House RobberAlternate Selection / Pick / Not pick | Medium | Solve | |
| Container With Most WaterTwo Pointer | Medium | Solve | |
| Valid ParenthesesStack Basics | Easy | Solve | |
| Climbing Stairs1D DP | Easy | Solve | |
| Valid AnagramHashing | Easy | Solve | |
| Move ZeroesTwo Pointer | Easy | Solve | |
| 3SumTwo Sum | Medium | Solve | |
| Trapping Rain WaterTwo Pointer | Hard | Solve | |
| Group AnagramsHashing | Medium | Solve | |
| Longest Common PrefixString Basics | Easy | Solve | |
| Next PermutationRight to Left Traversal | Medium | Solve | |
| Merge IntervalsBasics | Medium | Solve | |
| Generate ParenthesesPick / Not-Pick | Medium | Solve | |
| Edit DistanceStrings | Medium | Solve | |
| Number of IslandsConnected Components | Medium | Solve | |
| Rotting OrangesMulti source BFS | Medium | Solve | |
| Max Consecutive Ones IIISliding Window · Variable | Medium | Solve | |
| Koko Eating BananasBinary Search on Answer Space | Medium | Solve | |
| Coin ChangeKnapsack | Medium | Solve | |
| Product of Array Except SelfRight to Left Traversal | Medium | Solve | |
| Rotate ImageIn-place Transformations | Medium | Solve | |
| Spiral MatrixMatrix Traversal | Medium | Solve | |
| Remove Duplicates from Sorted ArrayTwo Pointer | Easy | Solve | |
| Fibonacci Number1D DP | Easy | Solve | |
| Longest Increasing Subsequence1D DP | Medium | Solve | |
| Longest Common SubsequenceStrings | Medium | Solve | |
| Find Pivot IndexPrefix Sum Strategy | Easy | Solve |
No questions match these filters.
Also reported, being added to AlgoRung (9)
Lemonade Change · Transpose Matrix · Find the Number of Subsequences With Equal GCD · Maximum Sum of Subsequence With Non-adjacent Elements · Stone Game VIII · Count the Number of Ideal Arrays · Longest Well-Performing Interval · Maximum Product After K Increments · The Number of Beautiful Subsets
Questions people ask
What coding questions does Infosys ask most?
Two Sum, Longest Substring Without Repeating Characters, Best Time to Buy and Sell Stock, Subarray Sum Equals K, Kadane's Algorithm - Simple, Gas Station, Palindrome Number, Longest Palindromic Substring.
Which topics come up in Infosys coding rounds?
dynamic programming, greedy, strings, arrays, graphs, sliding window.
How hard are Infosys coding questions?
Of the reported questions, 11 are easy, 23 medium and 1 hard. A 45 to 60 minute live interview where you solve one or two data-structures-and-algorithms problems while explaining your thinking. Interviewers score problem solving, code quality, testing and communication.