# Infosys Coding Interview Questions

> 158 DSA problems asked in Infosys coding interviews and online assessments, sorted easiest first with hints. Free practice for placements on InternHack.

Canonical: https://www.internhack.in/learn/dsa/companies/infosys
Last updated: 2026-11-28

158 DSA problems tagged as asked in Infosys coding interviews and online assessments. Below are the first 100 of 158: 42 easy, 24 medium and 34 hard. Start with the easy ones, then move to medium. Practise free on InternHack and track your progress.

## Infosys DSA problems, easiest first

1. [Add Digits](https://www.internhack.in/learn/dsa/problem/add-digits) (Easy)
2. [Average Time of Process per Machine](https://www.internhack.in/learn/dsa/problem/average-time-of-process-per-machine) (Easy)
3. [Best Time to Buy and Sell Stock](https://www.internhack.in/learn/dsa/problem/best-time-to-buy-and-sell-stock) (Easy)
4. [Binary Search](https://www.internhack.in/learn/dsa/problem/binary-search) (Easy)
5. [Climbing Stairs](https://www.internhack.in/learn/dsa/problem/climbing-stairs) (Easy)
6. [Concatenation of Array](https://www.internhack.in/learn/dsa/problem/concatenation-of-array) (Easy)
7. [Count Pairs That Form a Complete Day I](https://www.internhack.in/learn/dsa/problem/count-pairs-that-form-a-complete-day-i) (Easy)
8. [Delete Duplicate Emails](https://www.internhack.in/learn/dsa/problem/delete-duplicate-emails) (Easy)
9. [Fibonacci Number](https://www.internhack.in/learn/dsa/problem/fibonacci-number) (Easy)
10. [Find the Index of the First Occurrence in a String](https://www.internhack.in/learn/dsa/problem/find-the-index-of-the-first-occurrence-in-a-string) (Easy)
11. [Implement Queue using Stacks](https://www.internhack.in/learn/dsa/problem/implement-queue-using-stacks) (Easy)
12. [Intersection of Two Arrays](https://www.internhack.in/learn/dsa/problem/intersection-of-two-arrays) (Easy)
13. [Is Subsequence](https://www.internhack.in/learn/dsa/problem/is-subsequence) (Easy)
14. [Kids With the Greatest Number of Candies](https://www.internhack.in/learn/dsa/problem/kids-with-the-greatest-number-of-candies) (Easy)
15. [Linked List Cycle](https://www.internhack.in/learn/dsa/problem/linked-list-cycle) (Easy)
16. [Longest Common Prefix](https://www.internhack.in/learn/dsa/problem/longest-common-prefix) (Easy)
17. [Maximum Depth of Binary Tree](https://www.internhack.in/learn/dsa/problem/maximum-depth-of-binary-tree) (Easy)
18. [Maximum Product of Three Numbers](https://www.internhack.in/learn/dsa/problem/maximum-product-of-three-numbers) (Easy)
19. [Merge Sorted Array](https://www.internhack.in/learn/dsa/problem/merge-sorted-array) (Easy)
20. [Merge Two Sorted Lists](https://www.internhack.in/learn/dsa/problem/merge-two-sorted-lists) (Easy)
21. [Missing Number](https://www.internhack.in/learn/dsa/problem/missing-number) (Easy)
22. [Move Zeroes](https://www.internhack.in/learn/dsa/problem/move-zeroes) (Easy)
23. [Palindrome Linked List](https://www.internhack.in/learn/dsa/problem/palindrome-linked-list) (Easy)
24. [Palindrome Number](https://www.internhack.in/learn/dsa/problem/palindrome-number) (Easy)
25. [Pascal's Triangle](https://www.internhack.in/learn/dsa/problem/pascals-triangle) (Easy)
26. [Power of Two](https://www.internhack.in/learn/dsa/problem/power-of-two) (Easy)
27. [Range Sum Query - Immutable](https://www.internhack.in/learn/dsa/problem/range-sum-query-immutable) (Easy)
28. [Remove Digit From Number to Maximize Result](https://www.internhack.in/learn/dsa/problem/remove-digit-from-number-to-maximize-result) (Easy)
29. [Remove Duplicates from Sorted Array](https://www.internhack.in/learn/dsa/problem/remove-duplicates-from-sorted-array) (Easy)
30. [Replace Employee ID With The Unique Identifier](https://www.internhack.in/learn/dsa/problem/replace-employee-id-with-the-unique-identifier) (Easy)
31. [Reverse String](https://www.internhack.in/learn/dsa/problem/reverse-string) (Easy)
32. [Reverse String II](https://www.internhack.in/learn/dsa/problem/reverse-string-ii) (Easy)
33. [Roman to Integer](https://www.internhack.in/learn/dsa/problem/roman-to-integer) (Easy)
34. [Sort the People](https://www.internhack.in/learn/dsa/problem/sort-the-people) (Easy)
35. [Sqrt(x)](https://www.internhack.in/learn/dsa/problem/sqrtx) (Easy)
36. [Squares of a Sorted Array](https://www.internhack.in/learn/dsa/problem/squares-of-a-sorted-array) (Easy)
37. [Transform Array by Parity](https://www.internhack.in/learn/dsa/problem/transform-array-by-parity) (Easy)
38. [Trionic Array I](https://www.internhack.in/learn/dsa/problem/trionic-array-i) (Easy)
39. [Two Sum](https://www.internhack.in/learn/dsa/problem/two-sum) (Easy)
40. [Valid Anagram](https://www.internhack.in/learn/dsa/problem/valid-anagram) (Easy)
41. [Valid Palindrome](https://www.internhack.in/learn/dsa/problem/valid-palindrome) (Easy)
42. [Valid Parentheses](https://www.internhack.in/learn/dsa/problem/valid-parentheses) (Easy)
43. [Bulb Switcher](https://www.internhack.in/learn/dsa/problem/bulb-switcher) (Medium)
44. [Coin Change](https://www.internhack.in/learn/dsa/problem/coin-change) (Medium)
45. [Combination Sum](https://www.internhack.in/learn/dsa/problem/combination-sum) (Medium)
46. [Combination Sum II](https://www.internhack.in/learn/dsa/problem/combination-sum-ii) (Medium)
47. [Contiguous Array](https://www.internhack.in/learn/dsa/problem/contiguous-array) (Medium)
48. [Delete Node in a BST](https://www.internhack.in/learn/dsa/problem/delete-node-in-a-bst) (Medium)
49. [Delete Operation for Two Strings](https://www.internhack.in/learn/dsa/problem/delete-operation-for-two-strings) (Medium)
50. [Edit Distance](https://www.internhack.in/learn/dsa/problem/edit-distance) (Medium)
51. [Find First and Last Position of Element in Sorted Array](https://www.internhack.in/learn/dsa/problem/find-first-and-last-position-of-element-in-sorted-array) (Medium)
52. [Group Anagrams](https://www.internhack.in/learn/dsa/problem/group-anagrams) (Medium)
53. [Longest Increasing Subsequence](https://www.internhack.in/learn/dsa/problem/longest-increasing-subsequence) (Medium)
54. [Longest Palindromic Subsequence](https://www.internhack.in/learn/dsa/problem/longest-palindromic-subsequence) (Medium)
55. [Maximum Subarray](https://www.internhack.in/learn/dsa/problem/maximum-subarray) (Medium)
56. [Merge Intervals](https://www.internhack.in/learn/dsa/problem/merge-intervals) (Medium)
57. [Minimum Addition to Make Integer Beautiful](https://www.internhack.in/learn/dsa/problem/minimum-addition-to-make-integer-beautiful) (Medium)
58. [Next Greater Element III](https://www.internhack.in/learn/dsa/problem/next-greater-element-iii) (Medium)
59. [Pow(x, n)](https://www.internhack.in/learn/dsa/problem/powx-n) (Medium)
60. [Product of Array Except Self](https://www.internhack.in/learn/dsa/problem/product-of-array-except-self) (Medium)
61. [Reverse Integer](https://www.internhack.in/learn/dsa/problem/reverse-integer) (Medium)
62. [Rotate Image](https://www.internhack.in/learn/dsa/problem/rotate-image) (Medium)
63. [Search in Rotated Sorted Array](https://www.internhack.in/learn/dsa/problem/search-in-rotated-sorted-array) (Medium)
64. [Spiral Matrix](https://www.internhack.in/learn/dsa/problem/spiral-matrix) (Medium)
65. [Subarray Sum Equals K](https://www.internhack.in/learn/dsa/problem/subarray-sum-equals-k) (Medium)
66. [Top K Frequent Elements](https://www.internhack.in/learn/dsa/problem/top-k-frequent-elements) (Medium)
67. [Candy](https://www.internhack.in/learn/dsa/problem/candy) (Hard)
68. [Count the Number of Ideal Arrays](https://www.internhack.in/learn/dsa/problem/count-the-number-of-ideal-arrays) (Hard)
69. [Find Building Where Alice and Bob Can Meet](https://www.internhack.in/learn/dsa/problem/find-building-where-alice-and-bob-can-meet) (Hard)
70. [Find Sum of Array Product of Magical Sequences](https://www.internhack.in/learn/dsa/problem/find-sum-of-array-product-of-magical-sequences) (Hard)
71. [Find the Number of Subsequences With Equal GCD](https://www.internhack.in/learn/dsa/problem/find-the-number-of-subsequences-with-equal-gcd) (Hard)
72. [Largest Rectangle in Histogram](https://www.internhack.in/learn/dsa/problem/largest-rectangle-in-histogram) (Hard)
73. [Maximize the Minimum Game Score](https://www.internhack.in/learn/dsa/problem/maximize-the-minimum-game-score) (Hard)
74. [Maximum Good Subtree Score](https://www.internhack.in/learn/dsa/problem/maximum-good-subtree-score) (Hard)
75. [Maximum Number of K-Divisible Components](https://www.internhack.in/learn/dsa/problem/maximum-number-of-k-divisible-components) (Hard)
76. [Maximum Profit in Job Scheduling](https://www.internhack.in/learn/dsa/problem/maximum-profit-in-job-scheduling) (Hard)
77. [Maximum Score Words Formed by Letters](https://www.internhack.in/learn/dsa/problem/maximum-score-words-formed-by-letters) (Hard)
78. [Maximum Segment Sum After Removals](https://www.internhack.in/learn/dsa/problem/maximum-segment-sum-after-removals) (Hard)
79. [Maximum Sum of Subsequence With Non-adjacent Elements](https://www.internhack.in/learn/dsa/problem/maximum-sum-of-subsequence-with-non-adjacent-elements) (Hard)
80. [Maximum Walls Destroyed by Robots](https://www.internhack.in/learn/dsa/problem/maximum-walls-destroyed-by-robots) (Hard)
81. [Median of Two Sorted Arrays](https://www.internhack.in/learn/dsa/problem/median-of-two-sorted-arrays) (Hard)
82. [Minimum Difference in Sums After Removal of Elements](https://www.internhack.in/learn/dsa/problem/minimum-difference-in-sums-after-removal-of-elements) (Hard)
83. [Minimum Reverse Operations](https://www.internhack.in/learn/dsa/problem/minimum-reverse-operations) (Hard)
84. [Minimum Total Distance Traveled](https://www.internhack.in/learn/dsa/problem/minimum-total-distance-traveled) (Hard)
85. [Minimum Window Substring](https://www.internhack.in/learn/dsa/problem/minimum-window-substring) (Hard)
86. [Number of Beautiful Integers in the Range](https://www.internhack.in/learn/dsa/problem/number-of-beautiful-integers-in-the-range) (Hard)
87. [Number of Different Subsequences GCDs](https://www.internhack.in/learn/dsa/problem/number-of-different-subsequences-gcds) (Hard)
88. [Partition Array Into Two Arrays to Minimize Sum Difference](https://www.internhack.in/learn/dsa/problem/partition-array-into-two-arrays-to-minimize-sum-difference) (Hard)
89. [Regular Expression Matching](https://www.internhack.in/learn/dsa/problem/regular-expression-matching) (Hard)
90. [Reverse Nodes in k-Group](https://www.internhack.in/learn/dsa/problem/reverse-nodes-in-k-group) (Hard)
91. [Sliding Window Maximum](https://www.internhack.in/learn/dsa/problem/sliding-window-maximum) (Hard)
92. [Split Array Largest Sum](https://www.internhack.in/learn/dsa/problem/split-array-largest-sum) (Hard)
93. [Stone Game VIII](https://www.internhack.in/learn/dsa/problem/stone-game-viii) (Hard)
94. [Subarrays with K Different Integers](https://www.internhack.in/learn/dsa/problem/subarrays-with-k-different-integers) (Hard)
95. [Substring with Concatenation of All Words](https://www.internhack.in/learn/dsa/problem/substring-with-concatenation-of-all-words) (Hard)
96. [Sum of Beautiful Subsequences](https://www.internhack.in/learn/dsa/problem/sum-of-beautiful-subsequences) (Hard)
97. [Trapping Rain Water](https://www.internhack.in/learn/dsa/problem/trapping-rain-water) (Hard)
98. [Trionic Array II](https://www.internhack.in/learn/dsa/problem/trionic-array-ii) (Hard)
99. [Wildcard Matching](https://www.internhack.in/learn/dsa/problem/wildcard-matching) (Hard)
100. [XOR After Range Multiplication Queries II](https://www.internhack.in/learn/dsa/problem/xor-after-range-multiplication-queries-ii) (Hard)

## Prepare for the rest of the Infosys process

- [Aptitude questions by company](https://www.internhack.in/learn/aptitude/companies)
- [Technical interview questions](https://www.internhack.in/learn/interview)
- [Free ATS resume check](https://www.internhack.in/ats-score/try), no signup

## Other companies

- [Google](https://www.internhack.in/learn/dsa/companies/google) (2217)
- [Amazon](https://www.internhack.in/learn/dsa/companies/amazon) (1938)
- [Meta](https://www.internhack.in/learn/dsa/companies/meta) (1387)
- [Microsoft](https://www.internhack.in/learn/dsa/companies/microsoft) (1352)
- [Bloomberg](https://www.internhack.in/learn/dsa/companies/bloomberg) (1173)
- [Tiktok](https://www.internhack.in/learn/dsa/companies/tiktok) (383)
- [Uber](https://www.internhack.in/learn/dsa/companies/uber) (381)
- [Apple](https://www.internhack.in/learn/dsa/companies/apple) (356)
- [Oracle](https://www.internhack.in/learn/dsa/companies/oracle) (340)
- [Goldman Sachs](https://www.internhack.in/learn/dsa/companies/goldman-sachs) (270)
- [Adobe](https://www.internhack.in/learn/dsa/companies/adobe) (227)
- [TCS](https://www.internhack.in/learn/dsa/companies/tcs) (217)
- [Salesforce](https://www.internhack.in/learn/dsa/companies/salesforce) (189)
- [Linkedin](https://www.internhack.in/learn/dsa/companies/linkedin) (180)
- [Zoho](https://www.internhack.in/learn/dsa/companies/zoho) (179)
- [IBM](https://www.internhack.in/learn/dsa/companies/ibm) (170)
- [Walmart Labs](https://www.internhack.in/learn/dsa/companies/walmart-labs) (152)
- [Accenture](https://www.internhack.in/learn/dsa/companies/accenture) (144)
- [Nvidia](https://www.internhack.in/learn/dsa/companies/nvidia) (137)
- [Yandex](https://www.internhack.in/learn/dsa/companies/yandex) (134)
- [DE Shaw](https://www.internhack.in/learn/dsa/companies/de-shaw) (124)
- [Visa](https://www.internhack.in/learn/dsa/companies/visa) (124)
- [Flipkart](https://www.internhack.in/learn/dsa/companies/flipkart) (117)
- [Paypal](https://www.internhack.in/learn/dsa/companies/paypal) (106)

## Related

- [Home](https://www.internhack.in/)
- [Learn](https://www.internhack.in/learn)
- [DSA by company](https://www.internhack.in/learn/dsa/companies)
