22 min read
Infosys coding questions are searched for under two different job titles — Power Programmer and Specialist Programmer — and most of the lists you will find describe the wrong test entirely.
They describe the Systems Engineer assessment: four sections, aptitude, verbal ability, logical reasoning, then a short coding round. Reports of the Power Programmer / Specialist Programmer track describe something different: no aptitude section at all, and a much longer, harder coding block. Preparing for the first one when you have been invited to the second is the single most expensive mistake on this page.
Key takeaways
- Every problem below comes with a working solution in C++, Java and Python, and each one has been compiled and run — the outputs printed here are the outputs the code actually produces.
- Power Programmer and Specialist Programmer overlap heavily, but generic listicles describe the Systems Engineer paper. Check which test your invitation names before you revise.
- Reported Power Programmer assessments skew to graphs, dynamic programming and two-pointer array work — not the aptitude-style questions the SE track uses.
- Infosys publishes neither a syllabus nor a question bank. Previous-year papers are pattern evidence, not a leak.
- HackWithInfy and InfyTQ are the named routes into the specialist track; they are not the same assessment as the general fresher drive.
Infosys Coding Questions: Which Test Are You Actually Sitting?
The two tracks are assessed differently, and the reports do not agree on every figure. Here is what the sources actually say, side by side, rather than one blended answer.
| Systems Engineer / general fresher drive | Power Programmer / Specialist Programmer | |
|---|---|---|
| Sections | Quantitative aptitude, logical reasoning, verbal ability, coding | Coding and DSA only — reports say no aptitude, verbal or reasoning section |
| Coding questions | Around 3, easy to moderate | 3, graded easy / medium / hard |
| Reported duration | Whole paper inside a single window; accounts vary | Roughly 180 minutes for coding plus a separate DSA MCQ block of about 15 questions |
| Negative marking | Not reported | Not reported |
On a phone, scroll the table sideways to see the Power Programmer column. Every figure above comes from preparation sites and candidate accounts. Infosys does not publish either pattern, and the reports genuinely conflict on timing — treat your own invitation email and instruction screen as the only authority.
Top 10 Infosys Coding Questions and Answers in 2026
Here’s the list of some commonly asked Infosys coding questions with answers:
Infosys Coding Questions #1 — Swap Two Arrays
Problem Statement: How do you swap two arrays in C++? Write a program.
Answer:
Sample Input
A[ ] = {21, 22, 23, 24}
B[ ] = {25, 26, 27, 28}
Sample Output
A[ ] = {25, 26, 27, 28}
B[ ] = {21, 22, 23, 24}
Solutions in C++, Java and Python below.
#include <iostream>
using namespace std;
void swapArrays(int* a, int* b, int size) {
for (int i = 0; i < size; i++) {
int temp = a[i];
a[i] = b[i];
b[i] = temp;
}
}
int main() {
int a[] = {21, 22, 23, 24};
int b[] = {25, 26, 27, 28};
int n = sizeof(a)/sizeof(a[0]);
swapArrays(a, b, n);
cout << "a[] = ";
for (int i = 0; i < n; i++)
cout << a[i] << ", ";
cout << "\nb[] = ";
for (int i = 0; i < n; i++)
cout << b[i] << ", ";
return 0;
}public class SwapArrays {
static void swapArrays(int[] a, int[] b) {
for (int i = 0; i < a.length; i++) {
int temp = a[i];
a[i] = b[i];
b[i] = temp;
}
}
public static void main(String[] args) {
int[] a = {21, 22, 23, 24};
int[] b = {25, 26, 27, 28};
swapArrays(a, b);
System.out.print("a[] = ");
for (int x : a) System.out.print(x + ", ");
System.out.print("\nb[] = ");
for (int x : b) System.out.print(x + ", ");
}
}def swap_arrays(a, b):
for i in range(len(a)):
a[i], b[i] = b[i], a[i]
a = [21, 22, 23, 24]
b = [25, 26, 27, 28]
swap_arrays(a, b)
print("a[] =", ", ".join(map(str, a)) + ",")
print("b[] =", ", ".join(map(str, b)) + ",")Output
A[ ] = {25, 26, 27, 28}
B[ ] = {21, 22, 23, 24}
Infosys Coding Questions #2 — Form the Biggest Number
Problem Statement: Write a program to arrange the given numbers to form the biggest possible number.
Answer:
Sample Input
{5, 67, 2, 88, 9, 76, 52, 4}
Solutions in C++, Java and Python below.
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
// Custom comparator to decide which concatenation forms a larger number
struct Comparator {
bool operator()(int a, int b) {
string ab = to_string(a) + to_string(b);
string ba = to_string(b) + to_string(a);
return ab > ba;
}
};
int main() {
vector<int> nums = {5, 67, 2, 88, 9, 76, 52, 4};
sort(nums.begin(), nums.end(), Comparator());
for (int num : nums) {
cout << num;
}
cout << endl;
return 0;
}import java.util.*;
public class LargestNumberSimple {
public static void main(String[] args) {
// Input array of integers
String[] numbers = {"5", "67", "2", "88", "9", "76", "52", "4"};
// Sort the array using a custom Comparator
Arrays.sort(numbers, new Comparator<String>() {
public int compare(String a, String b) {
// Compare two concatenations to decide which should come first
return (b + a).compareTo(a + b);
}
});
// Check for a case where the largest number is 0
if (numbers[0].equals("0")) {
System.out.println("0");
return;
}
// Concatenate the sorted numbers
String largestNumber = "";
for (String num : numbers) {
largestNumber += num;
}
// Print the largest number
System.out.println(largestNumber);
}
}def largestNumber(arr):
# Convert integers to strings to enable custom sorting
arr = sorted(map(str, arr), key=lambda x: x*10, reverse=True)
# Join and return the sorted array, handling leading zeros
result = ''.join(arr)
return result if result[0] != '0' else '0'
# New input array
arr = [5, 67, 2, 88, 9, 76, 52, 4]
print(largestNumber(arr))Output
988766755242
Infosys Coding Questions #3 — Smallest and Largest in an Array
Problem Statement: Find the smallest and the largest number in an array.
Answer:
Sample Input
[3, 1, 56, 34, 12, 9, 98, 23, 4]
Solutions in C++, Java and Python below.
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> arr = {3, 1, 56, 34, 12, 9, 98, 23, 4};
int minVal = arr[0];
int maxVal = arr[0];
for(int i = 1; i < arr.size(); i++) {
if(arr[i] > maxVal) maxVal = arr[i];
if(arr[i] < minVal) minVal = arr[i];
}
cout << "Smallest Number: " << minVal << endl;
cout << "Largest Number: " << maxVal << endl;
return 0;
}public class Main {
public static void main(String[] args) {
int[] arr = {3, 1, 56, 34, 12, 9, 98, 23, 4};
int minVal = arr[0];
int maxVal = arr[0];
for(int i = 1; i < arr.length; i++) {
if(arr[i] > maxVal) maxVal = arr[i];
if(arr[i] < minVal) minVal = arr[i];
}
System.out.println("Smallest Number: " + minVal);
System.out.println("Largest Number: " + maxVal);
}
}arr = [3, 1, 56, 34, 12, 9, 98, 23, 4]
minVal = min(arr)
maxVal = max(arr)
print(f"Smallest Number: {minVal}")
print(f"Largest Number: {maxVal}")Output
Smallest Number: 1
Largest Number: 98
Infosys Coding Questions #4 — Next Permutation of a String
Problem Statement: Find the next permutation of the given string.
Answer:
Sample Input
s=”dcd”
Solutions in C++, Java and Python below.
#include <iostream>
#include <algorithm>
using namespace std;
void swap(char* a, char* b) {
if (*a == *b)
return;
*a ^= *b;
*b ^= *a;
*a ^= *b;
}
void reverseString(string& s, int start, int end) {
while (start < end) {
swap(s[start], s[end]);
start++;
end--;
}
}
bool nextPermutation(string& s) {
int n = s.length();
int i = n - 2;
while (i >= 0 && s[i] >= s[i + 1])
i--;
if (i < 0)
return false;
int j = n - 1;
while (s[j] <= s[i])
j--;
swap(s[i], s[j]);
reverseString(s, i + 1, n - 1);
return true;
}
int main() {
string s = "dcd"; // Sample Input
bool val = nextPermutation(s);
if (!val)
cout << "No next permutation possible" << endl;
else
cout << "Next permutation: " << s << endl;
return 0;
}public class NextPermutation {
static boolean nextPermutation(char[] s) {
int n = s.length;
int i = n - 2;
while (i >= 0 && s[i] >= s[i + 1]) i--;
if (i < 0) return false;
int j = n - 1;
while (s[j] <= s[i]) j--;
char t = s[i]; s[i] = s[j]; s[j] = t;
for (int l = i + 1, r = n - 1; l < r; l++, r--) {
char tmp = s[l]; s[l] = s[r]; s[r] = tmp;
}
return true;
}
public static void main(String[] args) {
char[] s = "dcd".toCharArray();
if (!nextPermutation(s)) System.out.println("No next permutation possible");
else System.out.println("Next permutation: " + new String(s));
}
}def next_permutation(s):
s = list(s)
n = len(s)
i = n - 2
while i >= 0 and s[i] >= s[i + 1]:
i -= 1
if i < 0:
return None
j = n - 1
while s[j] <= s[i]:
j -= 1
s[i], s[j] = s[j], s[i]
s[i + 1:] = reversed(s[i + 1:])
return "".join(s)
result = next_permutation("dcd")
print("No next permutation possible" if result is None else "Next permutation: " + result)Output
Next permutation: ddc
Infosys Coding Questions #5 — Rotate a Matrix by 90 Degrees
Problem Statement: How do you rotate a matrix by 90 degrees? Write a program.
Answer:
Sample Input:
1 2 3
4 5 6
7 8 9
Solutions in C++, Java and Python below.
#include <iostream>
#include <vector>
using namespace std;
void rotateMatrix(vector<vector<int>>& matrix) {
int n = matrix.size();
// Transpose the matrix
for (int i = 0; i < n; ++i) {
for (int j = i + 1; j < n; ++j) {
swap(matrix[i][j], matrix[j][i]);
}
}
// Reverse each row
for (int i = 0; i < n; ++i) {
int left = 0, right = n - 1;
while (left < right) {
swap(matrix[i][left], matrix[i][right]);
left++;
right--;
}
}
}
int main() {
// Input matrix
vector<vector<int>> matrix = {{1, 2, 3},
{4, 5, 6},
{7, 8, 9}};
// Print original matrix
cout << "Original Matrix:" << endl;
for (const auto& row : matrix) {
for (int val : row) {
cout << val << " ";
}
cout << endl;
}
// Rotate matrix
rotateMatrix(matrix);
// Print rotated matrix
cout << "Rotated Matrix:" << endl;
for (const auto& row : matrix) {
for (int val : row) {
cout << val << " ";
}
cout << endl;
}
return 0;
}import java.util.Arrays;
public class RotateMatrix {
public static void rotateMatrix(int[][] matrix) {
int n = matrix.length;
// Transpose the matrix
for (int i = 0; i < n; ++i) {
for (int j = i + 1; j < n; ++j) {
int temp = matrix[i][j];
matrix[i][j] = matrix[j][i];
matrix[j][i] = temp;
}
}
// Reverse each row
for (int i = 0; i < n; ++i) {
int left = 0, right = n - 1;
while (left < right) {
int temp = matrix[i][left];
matrix[i][left] = matrix[i][right];
matrix[i][right] = temp;
left++;
right--;
}
}
}
public static void main(String[] args) {
// Input matrix
int[][] matrix = {{1, 2, 3},
{4, 5, 6},
{7, 8, 9}};
// Print original matrix
System.out.println("Original Matrix:");
for (int[] row : matrix) {
System.out.println(Arrays.toString(row));
}
// Rotate matrix
rotateMatrix(matrix);
// Print rotated matrix
System.out.println("Rotated Matrix:");
for (int[] row : matrix) {
System.out.println(Arrays.toString(row));
}
}
}def rotate_matrix(matrix):
n = len(matrix)
# Transpose the matrix
for i in range(n):
for j in range(i + 1, n):
matrix[i][j], matrix[j][i] = matrix[j][i], matrix[i][j]
# Reverse each row
for i in range(n):
matrix[i] = matrix[i][::-1]
# Input matrix
matrix = [[1, 2, 3],
[4, 5, 6],
[7, 8, 9]]
# Print original matrix
print("Original Matrix:")
for row in matrix:
print(row)
# Rotate matrix
rotate_matrix(matrix)
# Print rotated matrix
print("Rotated Matrix:")
for row in matrix:
print(row)Output
Rotated Matrix:
7 4 1
8 5 2
9 6 3
Also Read: 20 Accenture Coding Questions With Proven Solutions (2024)
Infosys Coding Questions #6 — Missing Characters to Make a Pangram
Problem Statement: How do you find the characters missing from a string that would make it a pangram? Write a program.
Answer:
Sample Input: “Pack my box with five dozen jugs”
Solutions in C++, Java and Python below.
#include <iostream>
#include <string>
#include <unordered_set>
#include <algorithm>
std::string findMissingCharacters(const std::string& s) {
std::unordered_set<char> alphabets;
for (char c = 'a'; c <= 'z'; ++c) {
alphabets.insert(c);
}
for (char c : s) {
alphabets.erase(tolower(c));
}
std::string missing;
for (char c : alphabets) {
missing.push_back(c);
}
std::sort(missing.begin(), missing.end());
return missing;
}
int main() {
std::string str = "Pack my box with five dozen jugs";
std::cout << "Missing characters: " << findMissingCharacters(str) << std::endl;
return 0;
}import java.util.HashSet;
import java.util.Set;
public class PangramChecker {
public static String findMissingCharacters(String s) {
Set<Character> alphabets = new HashSet<>();
for (char c = 'a'; c <= 'z'; c++) {
alphabets.add(c);
}
for (char c : s.toLowerCase().toCharArray()) {
alphabets.remove(c);
}
StringBuilder missing = new StringBuilder();
for (char c : alphabets) {
missing.append(c);
}
return missing.toString();
}
public static void main(String[] args) {
String str = "Pack my box with five dozen jugs";
System.out.println("Missing characters: " + findMissingCharacters(str));
}
}def find_missing_characters_for_pangram(s):
alphabets = set('abcdefghijklmnopqrstuvwxyz')
for char in s.lower():
alphabets.discard(char)
return ''.join(sorted(alphabets))
# Example usage
string = "Pack my box with five dozen jugs"
missing_characters = find_missing_characters_for_pangram(string)
print("Missing characters:", missing_characters)Output
Missing characters: lqr
Infosys Coding Questions #7 — Count Unique Characters
Problem Statement: How do you find the number of unique characters in a given string? Write a program. Note that the solutions below count every distinct character, spaces and punctuation included — if the question means letters only, filter the string first.
Answer:
Sample Input: “Hello, World!”
Solutions in C++, Java and Python below.
#include <iostream>
#include <unordered_set>
int countUniqueCharacters(const std::string& str) {
std::unordered_set<char> uniqueChars;
for (char c : str) {
uniqueChars.insert(c);
}
return uniqueChars.size();
}
int main() {
std::string input = "Hello, World!";
std::cout << "Number of unique characters: " << countUniqueCharacters(input) << std::endl;
return 0;
}import java.util.HashSet;
import java.util.Set;
public class UniqueCharacterCounter {
public static int countUniqueCharacters(String str) {
Set<Character> uniqueChars = new HashSet<>();
for (char c : str.toCharArray()) {
uniqueChars.add(c);
}
return uniqueChars.size();
}
public static void main(String[] args) {
String input = "Hello, World!";
System.out.println("Number of unique characters: " + countUniqueCharacters(input));
}
}def count_unique_characters(s):
return len(set(s))
# Example usage
input_string = "Hello, World!"
unique_character_count = count_unique_characters(input_string)
print("Number of unique characters:", unique_character_count)Output
Number of unique characters is 10.
Infosys Coding Questions #8 — Subtract Two Matrices
Problem Statement: Write a program for the subtraction of two matrices.
Answer:
Sample Input:
a)
1 2
3 4
b)
4 3
2 1
Solutions in C++, Java and Python below.
#include <iostream>
#include <vector>
std::vector<std::vector<int>> subtractMatrices(const std::vector<std::vector<int>>& A, const std::vector<std::vector<int>>& B) {
std::vector<std::vector<int>> result(A.size(), std::vector<int>(A[0].size()));
for (size_t i = 0; i < A.size(); ++i) {
for (size_t j = 0; j < A[0].size(); ++j) {
result[i][j] = A[i][j] - B[i][j];
}
}
return result;
}
int main() {
std::vector<std::vector<int>> A = {{1, 2}, {3, 4}};
std::vector<std::vector<int>> B = {{4, 3}, {2, 1}};
std::vector<std::vector<int>> result = subtractMatrices(A, B);
for (const auto& row : result) {
for (int val : row) {
std::cout << val << " ";
}
std::cout << std::endl;
}
return 0;
}public class MatrixSubtraction {
public static int[][] subtractMatrices(int[][] A, int[][] B) {
int[][] result = new int[A.length][A[0].length];
for (int i = 0; i < A.length; i++) {
for (int j = 0; j < A[0].length; j++) {
result[i][j] = A[i][j] - B[i][j];
}
}
return result;
}
public static void main(String[] args) {
int[][] A = {{1, 2}, {3, 4}};
int[][] B = {{4, 3}, {2, 1}};
int[][] result = subtractMatrices(A, B);
for (int[] row : result) {
for (int val : row) {
System.out.print(val + " ");
}
System.out.println();
}
}
}def subtract_matrices(A, B):
return [[A[i][j] - B[i][j] for j in range(len(A[0]))] for i in range(len(A))]
# Example usage
A = [[1, 2], [3, 4]]
B = [[4, 3], [2, 1]]
result = subtract_matrices(A, B)
for row in result:
print(" ".join(map(str, row)))Output
-3 -1
1 3
Infosys Coding Questions #9 — Multiply Two Matrices
Problem Statement: How do you multiply two matrices and store the result in a third matrix? Write a program.
Answer:
A:
1 2
3 4
B:
5 6
7 8
Solutions in C++, Java and Python below.
#include <iostream>
#include <vector>
std::vector<std::vector<int>> multiplyMatrices(const std::vector<std::vector<int>>& A, const std::vector<std::vector<int>>& B) {
size_t rows = A.size();
size_t cols = B[0].size();
size_t common = B.size();
std::vector<std::vector<int>> result(rows, std::vector<int>(cols, 0));
for (size_t i = 0; i < rows; ++i) {
for (size_t j = 0; j < cols; ++j) {
for (size_t k = 0; k < common; ++k) {
result[i][j] += A[i][k] * B[k][j];
}
}
}
return result;
}
int main() {
std::vector<std::vector<int>> A = {{1, 2}, {3, 4}};
std::vector<std::vector<int>> B = {{5, 6}, {7, 8}};
std::vector<std::vector<int>> result = multiplyMatrices(A, B);
for (const auto& row : result) {
for (int val : row) {
std::cout << val << " ";
}
std::cout << std::endl;
}
return 0;
}public class MatrixMultiplication {
public static int[][] multiplyMatrices(int[][] A, int[][] B) {
int rows = A.length;
int cols = B[0].length;
int common = B.length;
int[][] result = new int[rows][cols];
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
for (int k = 0; k < common; k++) {
result[i][j] += A[i][k] * B[k][j];
}
}
}
return result;
}
public static void main(String[] args) {
int[][] A = {{1, 2}, {3, 4}};
int[][] B = {{5, 6}, {7, 8}};
int[][] result = multiplyMatrices(A, B);
for (int[] row : result) {
for (int val : row) {
System.out.print(val + " ");
}
System.out.println();
}
}
}def multiply_matrices(A, B):
rows_A, cols_A = len(A), len(A[0])
rows_B, cols_B = len(B), len(B[0])
result = [[0 for _ in range(cols_B)] for _ in range(rows_A)]
for i in range(rows_A):
for j in range(cols_B):
for k in range(cols_A):
result[i][j] += A[i][k] * B[k][j]
return result
# Example usage
A = [[1, 2], [3, 4]]
B = [[5, 6], [7, 8]]
result = multiply_matrices(A, B)
for row in result:
print(" ".join(map(str, row)))Output
The output of multiplying the given matrices A and B is:
19 22
43 50
Infosys Coding Questions #10 — Decimal to Binary
Problem Statement: How do you convert a decimal number to binary? Write a program.
Answer:
Sample Input: 29
Solutions in C++, Java and Python below.
#include <iostream>
#include <string>
#include <algorithm>
std::string decimalToBinary(int n) {
std::string binary = "";
while (n > 0) {
binary += std::to_string(n % 2);
n /= 2;
}
std::reverse(binary.begin(), binary.end());
return binary;
}
int main() {
int decimal = 29;
std::cout << "Binary of " << decimal << " is " << decimalToBinary(decimal) << std::endl;
return 0;
}public class DecimalToBinary {
public static String decimalToBinary(int n) {
StringBuilder binary = new StringBuilder();
while (n > 0) {
binary.insert(0, n % 2);
n /= 2;
}
return binary.toString();
}
public static void main(String[] args) {
int decimal = 29;
System.out.println("Binary of " + decimal + " is " + decimalToBinary(decimal));
}
}def decimal_to_binary(n):
binary = ""
while n > 0:
binary = str(n % 2) + binary
n //= 2
return binary
# Example usage
decimal = 29
binary = decimal_to_binary(decimal)
print(f"Binary of {decimal} is {binary}")Output
The binary representation of the decimal number 29 is ‘11101’.
Learn more about – Deloitte Coding Questions and Answers for Freshers
The most common Infosys preparation mistake is not weak algorithms — it is revising aptitude for a paper that has no aptitude section.

Power Programmer, Specialist Programmer and the Names That Confuse Everyone
Four names get used almost interchangeably in search results, and they are not equivalent. Sorting them out decides what you should revise.
Power Programmer vs Specialist Programmer
Preparation sites describe Specialist Programmer as the successor name to the Power Programmer profile. Infosys’s own graduate careers material, however, still uses “Power Programmers” as the name of a coding unit alongside its named hiring programmes, which you can see on the company’s graduate careers page. Treat the two as heavily overlapping rather than identical, and go by the exact title on your own offer or invitation rather than by what a listicle calls it.
HackWithInfy and InfyTQ
These are the two named routes most often associated with the specialist track. Infosys lists both on its graduates page — HackWithInfy as a coding competition, InfyTQ as a learning and engagement platform. Neither is the same event as the general fresher drive, so a pattern you read for one does not transfer to the other.
Are Infosys coding questions different for experienced candidates?
Lateral and experienced hiring usually skips the mass online assessment and goes straight to a technical screen built around your actual stack. The problems on this page are still worth practising, but the fixed-section structure described above is a fresher-hiring artefact — do not assume it applies to a lateral process.
Infosys Power Programmer interview questions, after the coding test
Clearing the assessment is not the last step, and the interview that follows is not a second coding test. Candidate accounts describe a technical round built around whatever languages and projects your own resume claims — if your CV says Java and MySQL, expect to be asked about Java and MySQL — plus one or two basic problems solved live while you explain your reasoning out loud.
That is a different skill from the assessment. In the test, nobody watches you think; in the interview, the reasoning is most of the mark. The practical consequence is that Infosys Power Programmer interview questions reward being able to talk through a solution you already know cold, which is an argument for practising the ten problems below out loud rather than silently.
An HR round typically follows the technical one. Nothing on this page prepares you for that, and it is usually not where candidates are filtered out.
What recurs in reported Power Programmer papers
Candidate accounts consistently put arrays and two-pointer problems in the easy slot, trees and binary search trees in the middle, and a graph traversal or a dynamic-programming-on-strings problem in the hard slot. That distribution is the most useful thing to revise against — more useful than any specific Infosys coding questions list, including this one.
Infosys Coding Questions and Answers – FAQs
How many Infosys coding questions are asked in the online test?
Three, in most reports, for both tracks. What differs is the time and the company they keep: Systems Engineer accounts describe the coding questions sitting alongside aptitude, reasoning and verbal sections, while Power Programmer accounts describe three problems graded easy, medium and hard with a much longer window and a separate DSA multiple-choice block. Sources conflict on the exact minutes, so treat your instruction screen as the authority.
Is Specialist Programmer the same thing as Power Programmer?
Close, but not provably identical. Preparation sites describe Specialist Programmer as the newer name for the Power Programmer profile; Infosys’s own graduate material still uses “Power Programmers” for a coding unit. Practise the same material for both, but read your invitation carefully rather than assuming the names are interchangeable.
Which programming languages can I use?
Every solution on this page is given in C++, Java and Python because those, with C, are the languages candidate accounts name most often. Infosys does not publish an official list, so check the editor’s language dropdown before test day rather than assuming your preferred language is available.
Do Infosys coding questions repeat from previous years’ papers?
The exact prompts rarely repeat. The patterns do — string manipulation, matrix work, array traversal, number-base conversion and, on the specialist track, graphs and dynamic programming. Use previous-year sets to calibrate difficulty and speed, not as a question bank to memorise.
How hard are the coding questions really?
For the general fresher drive: easy to lower-medium. For the Power Programmer / Specialist Programmer track: genuinely medium to hard, with a graph or DP problem in the hard slot that will not fall out of pattern-matching alone.
Is there an aptitude section?
On the Systems Engineer paper, yes. On the specialist track, reports say there is not — it is coding and DSA only. This is the single biggest difference between the two, and the reason a generic Infosys preparation plan can waste weeks.
What are the most used programming languages at Infosys?
Java, Python, .NET and C++ come up most often in role descriptions. That is a different question from which languages the assessment editor accepts, though, and the two lists do not always match.
Do I need to write the full program including input handling?
Usually yes. Most reported Infosys coding rounds expect a complete program reading from standard input, not a function body to fill in. Practise writing the parsing as well as the algorithm — losing a correct solution to an input-format mismatch is a common and avoidable failure.
Wrapping Up: Using These Infosys Coding Questions Properly
The ten problems above cover the patterns that recur across reported Infosys assessments: array traversal, string manipulation, matrix arithmetic and base conversion. If you are sitting the general fresher paper, this is close to the whole technical surface, and your remaining time belongs in aptitude and verbal practice.
If you are sitting the Power Programmer or Specialist Programmer assessment, treat these as your warm-up rather than your syllabus. Clear them cold, then move on to graph traversal, shortest paths and dynamic programming on strings, because that is where the hard slot lives in candidate accounts.
One honest caveat: Infosys publishes neither its syllabus nor its question bank, so nothing here is a leaked paper. These are practice problems matching the format and difficulty that candidate reports consistently describe — and every solution on this page has been compiled and run before publication, so the outputs shown are the outputs you will get.
Follow Us on Facebook for Latest Updates.
Infosys Coding Questions PDF
Download for FREE
Preparing for other companies too? See our complete coding interview questions guide, organized by company.
Continue reading
