0 day streak

Infosys coding interview questions

Service and IT India

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.

0%ready
ProgressTitleDifficultyTopicHow often hereAlso asked atNext step
Two SumTwo Sum Easy Arrays & Hashing Google, Amazon, Microsoft +46 Solve
Longest Substring Without Repeating CharactersSliding Window · Variable Medium Arrays & Hashing Google, Amazon, Microsoft +50 Solve
Best Time to Buy and Sell StockState Machine DP - Stock Problems Easy Dynamic Programming Amazon, Microsoft, Apple +38 Solve
Subarray Sum Equals KPrefix Sum Strategy Medium Arrays & Hashing Google, Microsoft, Meta +15 Solve
Kadane's Algorithm - SimpleKadane's Algorithm Medium Arrays & Hashing Microsoft, Apple, LinkedIn +29 Solve
Gas StationKadane's Algorithm Medium Arrays & Hashing Amazon, Microsoft, Adobe +4 Solve
Palindrome NumberMath / Number Theory Easy Arrays & Hashing Bloomberg, Morgan Stanley, Qualcomm +10 Solve
Longest Palindromic SubstringStrings Medium Dynamic Programming Amazon, Microsoft, Apple +22 Solve
House RobberAlternate Selection / Pick / Not pick Medium Dynamic Programming Airbnb, Nvidia, Databricks +13 Solve
Container With Most WaterTwo Pointer Medium Arrays & Hashing Google, Microsoft, Apple +31 Solve
Valid ParenthesesStack Basics Easy Stack Google, Microsoft, Meta +39 Solve
Climbing Stairs1D DP Easy Dynamic Programming Bloomberg, Intuit, Qualcomm +8 Solve
Valid AnagramHashing Easy Arrays & Hashing Netflix, Databricks, Bloomberg +13 Solve
Move ZeroesTwo Pointer Easy Arrays & Hashing Meta, Nvidia, Bloomberg +11 Solve
3SumTwo Sum Medium Arrays & Hashing Google, Microsoft, Meta +31 Solve
Trapping Rain WaterTwo Pointer Hard Arrays & Hashing Google, Amazon, Microsoft +38 Solve
Group AnagramsHashing Medium Arrays & Hashing Amazon, Microsoft, Meta +31 Solve
Longest Common PrefixString Basics Easy Arrays & Hashing Bloomberg, Adobe, Visa +12 Solve
Next PermutationRight to Left Traversal Medium Arrays & Hashing Google, Amazon, Meta +15 Solve
Merge IntervalsBasics Medium Intervals Google, Amazon, Microsoft +45 Solve
Generate ParenthesesPick / Not-Pick Medium Recursion & Backtracking Google, Microsoft, Bloomberg +13 Solve
Edit DistanceStrings Medium Dynamic Programming Google, Intuit, Cisco +6 Solve
Number of IslandsConnected Components Medium Graphs Google, Amazon, Microsoft +41 Solve
Rotting OrangesMulti source BFS Medium Graphs Amazon, Microsoft, Databricks +17 Solve
Max Consecutive Ones IIISliding Window · Variable Medium Arrays & Hashing Amazon, LinkedIn, IBM +2 Solve
Koko Eating BananasBinary Search on Answer Space Medium Binary Search Amazon, Netflix, DoorDash +12 Solve
Coin ChangeKnapsack Medium Dynamic Programming Google, Microsoft, Apple +18 Solve
Product of Array Except SelfRight to Left Traversal Medium Arrays & Hashing Microsoft, Meta, Apple +13 Solve
Rotate ImageIn-place Transformations Medium Arrays & Hashing Amazon, Apple, Nvidia +14 Solve
Spiral MatrixMatrix Traversal Medium Arrays & Hashing Microsoft, Apple, Databricks +15 Solve
Remove Duplicates from Sorted ArrayTwo Pointer Easy Arrays & Hashing Microsoft, Bloomberg, Cisco +8 Solve
Fibonacci Number1D DP Easy Dynamic Programming Spotify, Intel, Deloitte +7 Solve
Longest Increasing Subsequence1D DP Medium Dynamic Programming Google, Atlassian, Goldman Sachs +9 Solve
Longest Common SubsequenceStrings Medium Dynamic Programming Google, Amazon, Apple +5 Solve
Find Pivot IndexPrefix Sum Strategy Easy Arrays & Hashing Tesla, IBM, Myntra +1 Solve
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.