# Visa Coding Interview Questions

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

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

124 DSA problems tagged as asked in Visa coding interviews and online assessments. Below are the first 100 of 124: 32 easy, 48 medium and 20 hard. Start with the easy ones, then move to medium. Practise free on InternHack and track your progress.

## Visa DSA problems, easiest first

1. [Add Binary](https://www.internhack.in/learn/dsa/problem/add-binary) (Easy)
2. [Add Digits](https://www.internhack.in/learn/dsa/problem/add-digits) (Easy)
3. [Add Strings](https://www.internhack.in/learn/dsa/problem/add-strings) (Easy)
4. [Alternating Digit Sum](https://www.internhack.in/learn/dsa/problem/alternating-digit-sum) (Easy)
5. [Balanced Binary Tree](https://www.internhack.in/learn/dsa/problem/balanced-binary-tree) (Easy)
6. [Best Time to Buy and Sell Stock](https://www.internhack.in/learn/dsa/problem/best-time-to-buy-and-sell-stock) (Easy)
7. [Check if Array Is Sorted and Rotated](https://www.internhack.in/learn/dsa/problem/check-if-array-is-sorted-and-rotated) (Easy)
8. [Contains Duplicate](https://www.internhack.in/learn/dsa/problem/contains-duplicate) (Easy)
9. [Create Target Array in the Given Order](https://www.internhack.in/learn/dsa/problem/create-target-array-in-the-given-order) (Easy)
10. [Diameter of Binary Tree](https://www.internhack.in/learn/dsa/problem/diameter-of-binary-tree) (Easy)
11. [Divisor Game](https://www.internhack.in/learn/dsa/problem/divisor-game) (Easy)
12. [First Unique Character in a String](https://www.internhack.in/learn/dsa/problem/first-unique-character-in-a-string) (Easy)
13. [Happy Number](https://www.internhack.in/learn/dsa/problem/happy-number) (Easy)
14. [Image Smoother](https://www.internhack.in/learn/dsa/problem/image-smoother) (Easy)
15. [Last Stone Weight](https://www.internhack.in/learn/dsa/problem/last-stone-weight) (Easy)
16. [Longest Common Prefix](https://www.internhack.in/learn/dsa/problem/longest-common-prefix) (Easy)
17. [Merge Sorted Array](https://www.internhack.in/learn/dsa/problem/merge-sorted-array) (Easy)
18. [Merge Two Sorted Lists](https://www.internhack.in/learn/dsa/problem/merge-two-sorted-lists) (Easy)
19. [Number of Changing Keys](https://www.internhack.in/learn/dsa/problem/number-of-changing-keys) (Easy)
20. [Odd String Difference](https://www.internhack.in/learn/dsa/problem/odd-string-difference) (Easy)
21. [Plus One](https://www.internhack.in/learn/dsa/problem/plus-one) (Easy)
22. [Reverse Linked List](https://www.internhack.in/learn/dsa/problem/reverse-linked-list) (Easy)
23. [Reverse Vowels of a String](https://www.internhack.in/learn/dsa/problem/reverse-vowels-of-a-string) (Easy)
24. [Rotate String](https://www.internhack.in/learn/dsa/problem/rotate-string) (Easy)
25. [Split the Array](https://www.internhack.in/learn/dsa/problem/split-the-array) (Easy)
26. [Substrings of Size Three with Distinct Characters](https://www.internhack.in/learn/dsa/problem/substrings-of-size-three-with-distinct-characters) (Easy)
27. [Two Furthest Houses With Different Colors](https://www.internhack.in/learn/dsa/problem/two-furthest-houses-with-different-colors) (Easy)
28. [Two Sum](https://www.internhack.in/learn/dsa/problem/two-sum) (Easy)
29. [Valid Anagram](https://www.internhack.in/learn/dsa/problem/valid-anagram) (Easy)
30. [Valid Palindrome](https://www.internhack.in/learn/dsa/problem/valid-palindrome) (Easy)
31. [Valid Palindrome II](https://www.internhack.in/learn/dsa/problem/valid-palindrome-ii) (Easy)
32. [Valid Parentheses](https://www.internhack.in/learn/dsa/problem/valid-parentheses) (Easy)
33. [3Sum](https://www.internhack.in/learn/dsa/problem/3sum) (Medium)
34. [Best Time to Buy and Sell Stock II](https://www.internhack.in/learn/dsa/problem/best-time-to-buy-and-sell-stock-ii) (Medium)
35. [Best Time to Buy and Sell Stock using Strategy](https://www.internhack.in/learn/dsa/problem/best-time-to-buy-and-sell-stock-using-strategy) (Medium)
36. [Brightest Position on Street](https://www.internhack.in/learn/dsa/problem/brightest-position-on-street) (Medium)
37. [Check If Array Pairs Are Divisible by k](https://www.internhack.in/learn/dsa/problem/check-if-array-pairs-are-divisible-by-k) (Medium)
38. [Container With Most Water](https://www.internhack.in/learn/dsa/problem/container-with-most-water) (Medium)
39. [Count Mentions Per User](https://www.internhack.in/learn/dsa/problem/count-mentions-per-user) (Medium)
40. [Count Nodes With the Highest Score](https://www.internhack.in/learn/dsa/problem/count-nodes-with-the-highest-score) (Medium)
41. [Design Memory Allocator](https://www.internhack.in/learn/dsa/problem/design-memory-allocator) (Medium)
42. [Divide Players Into Teams of Equal Skill](https://www.internhack.in/learn/dsa/problem/divide-players-into-teams-of-equal-skill) (Medium)
43. [Edit Distance](https://www.internhack.in/learn/dsa/problem/edit-distance) (Medium)
44. [Find Peak Element](https://www.internhack.in/learn/dsa/problem/find-peak-element) (Medium)
45. [Find Score of an Array After Marking All Elements](https://www.internhack.in/learn/dsa/problem/find-score-of-an-array-after-marking-all-elements) (Medium)
46. [Find the Length of the Longest Common Prefix](https://www.internhack.in/learn/dsa/problem/find-the-length-of-the-longest-common-prefix) (Medium)
47. [Gas Station](https://www.internhack.in/learn/dsa/problem/gas-station) (Medium)
48. [Grid Teleportation Traversal](https://www.internhack.in/learn/dsa/problem/grid-teleportation-traversal) (Medium)
49. [Group Anagrams](https://www.internhack.in/learn/dsa/problem/group-anagrams) (Medium)
50. [Largest Number](https://www.internhack.in/learn/dsa/problem/largest-number) (Medium)
51. [Letter Combinations of a Phone Number](https://www.internhack.in/learn/dsa/problem/letter-combinations-of-a-phone-number) (Medium)
52. [Longest Consecutive Sequence](https://www.internhack.in/learn/dsa/problem/longest-consecutive-sequence) (Medium)
53. [Longest Palindromic Substring](https://www.internhack.in/learn/dsa/problem/longest-palindromic-substring) (Medium)
54. [Longest Substring Without Repeating Characters](https://www.internhack.in/learn/dsa/problem/longest-substring-without-repeating-characters) (Medium)
55. [LRU Cache](https://www.internhack.in/learn/dsa/problem/lru-cache) (Medium)
56. [Match Alphanumerical Pattern in Matrix I](https://www.internhack.in/learn/dsa/problem/match-alphanumerical-pattern-in-matrix-i) (Medium)
57. [Maximum Subarray](https://www.internhack.in/learn/dsa/problem/maximum-subarray) (Medium)
58. [Merge Intervals](https://www.internhack.in/learn/dsa/problem/merge-intervals) (Medium)
59. [Minimum Absolute Difference Between Elements With Constraint](https://www.internhack.in/learn/dsa/problem/minimum-absolute-difference-between-elements-with-constraint) (Medium)
60. [Minimum Operations to Write the Letter Y on a Grid](https://www.internhack.in/learn/dsa/problem/minimum-operations-to-write-the-letter-y-on-a-grid) (Medium)
61. [Number of Adjacent Elements With the Same Color](https://www.internhack.in/learn/dsa/problem/number-of-adjacent-elements-with-the-same-color) (Medium)
62. [Number of Black Blocks](https://www.internhack.in/learn/dsa/problem/number-of-black-blocks) (Medium)
63. [Number of Divisible Triplet Sums](https://www.internhack.in/learn/dsa/problem/number-of-divisible-triplet-sums) (Medium)
64. [Number of Perfect Pairs](https://www.internhack.in/learn/dsa/problem/number-of-perfect-pairs) (Medium)
65. [Number of Subarrays That Match a Pattern I](https://www.internhack.in/learn/dsa/problem/number-of-subarrays-that-match-a-pattern-i) (Medium)
66. [Restore IP Addresses](https://www.internhack.in/learn/dsa/problem/restore-ip-addresses) (Medium)
67. [Restore the Array From Adjacent Pairs](https://www.internhack.in/learn/dsa/problem/restore-the-array-from-adjacent-pairs) (Medium)
68. [Reverse Words in a String](https://www.internhack.in/learn/dsa/problem/reverse-words-in-a-string) (Medium)
69. [Rotate Array](https://www.internhack.in/learn/dsa/problem/rotate-array) (Medium)
70. [Rotate Image](https://www.internhack.in/learn/dsa/problem/rotate-image) (Medium)
71. [Rotating the Box](https://www.internhack.in/learn/dsa/problem/rotating-the-box) (Medium)
72. [Search in Rotated Sorted Array](https://www.internhack.in/learn/dsa/problem/search-in-rotated-sorted-array) (Medium)
73. [Sell Diminishing-Valued Colored Balls](https://www.internhack.in/learn/dsa/problem/sell-diminishing-valued-colored-balls) (Medium)
74. [Simplify Path](https://www.internhack.in/learn/dsa/problem/simplify-path) (Medium)
75. [Sort Colors](https://www.internhack.in/learn/dsa/problem/sort-colors) (Medium)
76. [Spiral Matrix](https://www.internhack.in/learn/dsa/problem/spiral-matrix) (Medium)
77. [Sum Root to Leaf Numbers](https://www.internhack.in/learn/dsa/problem/sum-root-to-leaf-numbers) (Medium)
78. [Two Sum II - Input Array Is Sorted](https://www.internhack.in/learn/dsa/problem/two-sum-ii-input-array-is-sorted) (Medium)
79. [Unique Paths](https://www.internhack.in/learn/dsa/problem/unique-paths) (Medium)
80. [Word Search](https://www.internhack.in/learn/dsa/problem/word-search) (Medium)
81. [Best Time to Buy and Sell Stock III](https://www.internhack.in/learn/dsa/problem/best-time-to-buy-and-sell-stock-iii) (Hard)
82. [Block Placement Queries](https://www.internhack.in/learn/dsa/problem/block-placement-queries) (Hard)
83. [Candy](https://www.internhack.in/learn/dsa/problem/candy) (Hard)
84. [Earliest Possible Day of Full Bloom](https://www.internhack.in/learn/dsa/problem/earliest-possible-day-of-full-bloom) (Hard)
85. [Find Median from Data Stream](https://www.internhack.in/learn/dsa/problem/find-median-from-data-stream) (Hard)
86. [First Missing Positive](https://www.internhack.in/learn/dsa/problem/first-missing-positive) (Hard)
87. [Largest Rectangle in Histogram](https://www.internhack.in/learn/dsa/problem/largest-rectangle-in-histogram) (Hard)
88. [Length of Longest V-Shaped Diagonal Segment](https://www.internhack.in/learn/dsa/problem/length-of-longest-v-shaped-diagonal-segment) (Hard)
89. [LFU Cache](https://www.internhack.in/learn/dsa/problem/lfu-cache) (Hard)
90. [Longest Valid Parentheses](https://www.internhack.in/learn/dsa/problem/longest-valid-parentheses) (Hard)
91. [Maximal Rectangle](https://www.internhack.in/learn/dsa/problem/maximal-rectangle) (Hard)
92. [Median of Two Sorted Arrays](https://www.internhack.in/learn/dsa/problem/median-of-two-sorted-arrays) (Hard)
93. [Minimum Cost Path with Teleportations](https://www.internhack.in/learn/dsa/problem/minimum-cost-path-with-teleportations) (Hard)
94. [Reconstruct Itinerary](https://www.internhack.in/learn/dsa/problem/reconstruct-itinerary) (Hard)
95. [Reverse Nodes in k-Group](https://www.internhack.in/learn/dsa/problem/reverse-nodes-in-k-group) (Hard)
96. [Shortest Palindrome](https://www.internhack.in/learn/dsa/problem/shortest-palindrome) (Hard)
97. [Sliding Window Maximum](https://www.internhack.in/learn/dsa/problem/sliding-window-maximum) (Hard)
98. [Text Justification](https://www.internhack.in/learn/dsa/problem/text-justification) (Hard)
99. [Trapping Rain Water](https://www.internhack.in/learn/dsa/problem/trapping-rain-water) (Hard)
100. [Word Ladder](https://www.internhack.in/learn/dsa/problem/word-ladder) (Hard)

## Prepare for the rest of the Visa 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)
- [Infosys](https://www.internhack.in/learn/dsa/companies/infosys) (158)
- [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)
- [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)
