Infosys Software Engineer Onsite Coding Questions
37+ questions from real Infosys Software Engineer Onsite Coding rounds, reported by candidates who interviewed there.
What does the Infosys Onsite Coding round test?
The Infosys onsite coding round is the core technical evaluation. Software Engineer candidates typically see 2-3 algorithm and data structure problems. Problems range from medium to hard difficulty, and interviewers evaluate both correctness and code quality.
Top Topics in This Round
Infosys Software Engineer Onsite Coding Questions
InfyTQ Interview Experience batch (2021)
Well getting a job before graduation is still a dream for many of the students. so infytq is a platform where you can get a job even before the placement, doesn't it sound...
#3 Longest Substring Without Repeating Characters
LeetCode #3: Longest Substring Without Repeating Characters. Difficulty: Medium. Topics: Hash Table, String, Sliding Window. Asked at Infosys in the last 6 months.
#1 Two Sum
LeetCode #1: Two Sum. Difficulty: Easy. Topics: Array, Hash Table. Asked at Infosys in the last 6 months.
#560 Subarray Sum Equals K
LeetCode #560: Subarray Sum Equals K. Difficulty: Medium. Topics: Array, Hash Table, Prefix Sum. Asked at Infosys in the last 6 months.
LeetCode #2259: Remove Digit From Number to Maximize Result. Difficulty: Easy. Topics: String, Greedy, Enumeration. Asked at Infosys in the last 6 months.
#134 Gas Station
LeetCode #134: Gas Station. Difficulty: Medium. Topics: Array, Greedy. Asked at Infosys in the last 6 months.
LeetCode #176: Second Highest Salary. Difficulty: Medium. Topics: Database. Asked at Infosys in the last 6 months.
#53 Maximum Subarray
LeetCode #53: Maximum Subarray. Difficulty: Medium. Topics: Array, Divide and Conquer, Dynamic Programming. Asked at Infosys in the last 6 months.
#5 Longest Palindromic Substring
LeetCode #5: Longest Palindromic Substring. Difficulty: Medium. Topics: Two Pointers, String, Dynamic Programming. Asked at Infosys in the last 6 months.
#20 Valid Parentheses
LeetCode #20: Valid Parentheses. Difficulty: Easy. Topics: String, Stack. Asked at Infosys in the last 6 months.
#300 Longest Increasing Subsequence
LeetCode #300: Longest Increasing Subsequence. Difficulty: Medium. Topics: Array, Binary Search, Dynamic Programming. Asked at Infosys in the last 6 months.
#121 Best Time to Buy and Sell Stock
LeetCode #121: Best Time to Buy and Sell Stock. Difficulty: Easy. Topics: Array, Dynamic Programming. Asked at Infosys in the last 6 months.
#322 Coin Change
LeetCode #322: Coin Change. Difficulty: Medium. Topics: Array, Dynamic Programming, Breadth-First Search. Asked at Infosys in the last 6 months.
#198 House Robber
LeetCode #198: House Robber. Difficulty: Medium. Topics: Array, Dynamic Programming. Asked at Infosys in the last 6 months.
#49 Group Anagrams
LeetCode #49: Group Anagrams. Difficulty: Medium. Topics: Array, Hash Table, String, Sorting. Asked at Infosys in the last 6 months.
#14 Longest Common Prefix
LeetCode #14: Longest Common Prefix. Difficulty: Easy. Topics: Array, String, Trie. Asked at Infosys in the last 6 months.
LeetCode #347: Top K Frequent Elements. Difficulty: Medium. Topics: Array, Hash Table, Divide and Conquer, Sorting, Heap (Priority Queue), Bucket Sort, Counting, Quickselect. Asked at Infosys in the last 6 months.
#9 Palindrome Number
LeetCode #9: Palindrome Number. Difficulty: Easy. Topics: Math. Asked at Infosys in the last 6 months.
#516 Longest Palindromic Subsequence
LeetCode #516: Longest Palindromic Subsequence. Difficulty: Medium. Topics: String, Dynamic Programming. Asked at Infosys in the last 6 months.
#2872 Maximum Number of K-Divisible Components
LeetCode #2872: Maximum Number of K-Divisible Components. Difficulty: Hard. Topics: Tree, Depth-First Search. Asked at Infosys in the last 6 months.
What to Expect in the Infosys Onsite Coding Round
The Infosys Software Engineer Onsite Coding round has a specific calibration purpose distinct from other rounds in the loop. Across 37+ verified reports on LeakCode for this exact round type, the consistent expectations: clear scoping of the problem before diving into a solution, explicit reasoning about complexity, structured handling of edge cases, and the ability to discuss trade-offs between two reasonable approaches.
Reports tagged with the Onsite Coding round at Infosys show recurring patterns in difficulty and topic distribution. The Onsite Coding round is typically 45-60 minutes; the interviewer is calibrated against a specific rubric. The discriminator between candidates who advance and candidates who do not is rarely the final correctness of the answer. It is the path: did you clarify, did you verbalize your approach, did you handle edge cases, and did you communicate throughout.
How To Prepare for This Specific Round
Filter the questions below to the most recent reports (past 6-12 months). Questions tagged for this exact round type from this exact company at this exact role level are the highest-signal data available. Older reports may reference questions that have since rotated out of the company's pool.
Practice 4-6 representative problems from this set under timed conditions. The goal is not memorization (companies rotate questions); the goal is to internalize the patterns the interviewer typically reaches for and the depth of follow-up to expect. Reports on LeakCode also tag the typical follow-up depth at this round type, which is the discriminating signal between hire and no-hire calibration.
Onsite Coding Round Timing and Format
The Onsite Coding round at Infosys typically runs 45-60 minutes. Use the first 2-3 minutes to clarify requirements; you should never start coding or designing without verifying the input/output format, constraints, and edge cases out loud. Use the next 5-7 minutes to verbalize your approach before writing any code. The middle 20-30 minutes are implementation. Reserve the final 10 minutes for testing with concrete examples and discussing optimization or trade-offs.
Time budget discipline is one of the most reliable senior-vs-junior discriminators in this round. Strong candidates verbalize where they are in their budget out loud ("I've used about 20 minutes, I have 15 minutes left for testing and one optimization"). This signals engineering maturity to the interviewer and creates positive feedback they can capture in writing.
Common Failure Modes in This Round
Reports tagged "no hire" at Infosys Software Engineer Onsite Coding commonly cite: coding silently without verbalizing approach, jumping to implementation before clarifying requirements, missing edge cases (empty input, single element, very large input), producing working code that the candidate cannot refactor when asked, and failing to test their solution with concrete examples before declaring done.
The single most predictive failure mode in 2025-2026 reports: not asking clarifying questions. Interviewers at all FAANG companies are explicitly trained to weight this dimension. Strong candidates ask 3-5 clarifying questions even on problems that look obvious; weak candidates dive into code immediately. The clarifying-question check is often the first signal recorded in the interviewer's notes.
See All 37 Questions from This Round
Full question text, answer context, and frequency data for subscribers.
Get Access