Visa Coding Interview Questions: OA, Technical Interview & Lead Round

Visa runs a large technology center in Bengaluru and hires freshers for Software Engineer and New Graduate SWE roles through campus and off campus drives. The process is DSA heavy through an online assessment, followed by rounds that dig deep into database design and core CS fundamentals, closing with a lead or managerial round.

This guide is organized by interview stage, online assessment, technical interview, and lead round, based on questions actually reported by candidates. Every coding problem includes the exact question, a worked example, the right approach, and time or space complexity.

Visa's Hiring Process for Fresher Roles

1. Application and Eligibility

  • B.E./B.Tech with a minimum CGPA around 7.0 and no active backlogs, reported from recent campus drives.
  • Apply through your college placement cell or Visa's careers page for off campus openings.

2. Online Assessment 60 to 90 minutes

  • Historically hosted on HackerRank or Mettl, with the most recently reported 2025 drives moving to CodeSignal.
  • Two to four DSA coding problems, easy to medium hard difficulty. Some older drives combined this with around 30 MCQs on operating systems, networking, and security basics, though this format varies by drive.

3. Technical Interview Round 1

  • Resume and project deep-dive, DSA fundamentals, OOP concepts, and often one live coding problem.

4. Technical Interview Round 2

  • Heavier on DBMS and SQL, covering joins, normalization, and star schema, sometimes a second coding problem, and light system design topics like REST APIs, caching, and the CAP theorem for stronger candidates.

5. HR or Lead Round

  • Behavioural questions, "why Visa," and a discussion of your projects, sometimes conducted by a senior engineering lead for final calibration. Some drives add an extra technical round before this, making the process five rounds in total.

Preparation Resources

Part 1 Visa Online Assessment (OA) Questions

The OA runs on CodeSignal in the most recently reported drives, 60 to 90 minutes, two to four DSA problems. Problems range from easy to medium hard.

1. Maximum Subarray Sum Easy

OA Arrays · DP LeetCode:{' '} #53

Given an array of integers, find the contiguous subarray with the largest sum and return that sum.

Input: nums = [-2,1,-3,4,-1,2,1,-5,4]
Output: 6
Why: the subarray [4,-1,2,1] has the largest sum

Approach: Use Kadane's algorithm. Track the best sum ending at the current index, either extending the previous subarray or starting fresh, whichever is larger.

Complexity: Time O(n) · Space O(1)

Follow-up: How would you also return the actual subarray, not just the sum?

2. Minimum Falling Path Sum Medium

OA DP · Matrices LeetCode:{' '} #931

Given an n by n matrix, find the minimum sum of a falling path, starting anywhere in the first row and moving to an adjacent column in the next row at each step.

Input: matrix = [[2,1,3],[6,5,4],[7,8,9]]
Output: 13

Approach: Work row by row with dynamic programming, where each cell's minimum falling path sum equals its own value plus the minimum of the three possible cells above it, directly above, diagonally left, or diagonally right.

Complexity: Time O(n^2) · Space O(1) if updating in place

Follow-up: How would you also reconstruct the actual path, not just the minimum sum?

3. Count Pairs With Difference Equal to K Medium

OA Hashing LeetCode:{' '} #532

Given an array and an integer K, count the number of pairs (i, j) where i > j and arr[i] - arr[j] = K.

Input: arr = [1, 5, 3, 4, 2], K = 3
Output: 2

Approach: Use a hash map to store how many times each value has appeared so far. For each element, check whether element - K exists in the map and add its count to the running total.

Complexity: Time O(n) · Space O(n)

Follow-up: How would you solve this if K could be zero, counting pairs of equal elements instead?

4. Count Substrings of Length 3 With at Least One Vowel Easy

OA Strings · Sliding Window

Given a string, count how many substrings of length exactly 3 contain at least one vowel.

Input: s = "leetcode"
Output: 6

Approach: Slide a window of size 3 across the string. For each window, check whether it contains a vowel, and increment the count if it does.

Complexity: Time O(n) · Space O(1)

Follow-up: How would you generalize this to substrings of any given length K?

5. Merge Overlapping Intervals Medium

OA Sorting · Intervals LeetCode:{' '} #56

Given a list of intervals, merge all overlapping intervals and return the resulting non overlapping intervals.

Input: intervals = [[1,3],[2,6],[8,10],[15,18]]
Output: [[1,6],[8,10],[15,18]]

Approach: Sort the intervals by start time. Walk through them, merging the current interval into the last kept interval whenever their ranges overlap, otherwise adding it as a new interval.

Complexity: Time O(n log n) · Space O(n)

Follow-up: How would you handle this efficiently if intervals were added one at a time to an already merged set?

6. Add Two Numbers Without Arithmetic Operators Medium

OA Bit Manipulation LeetCode:{' '} #371

Given two integers, return their sum without using the plus or minus operators.

Input: a = 5, b = 7
Output: 12

Approach: Use bitwise XOR to add the bits without carrying, and bitwise AND shifted left by one to compute the carry. Repeat this process, feeding the new sum and carry back in, until there is no carry left.

Complexity: Time O(1) for fixed width integers · Space O(1)

Follow-up: How would you adapt this approach to subtract two numbers instead?

Part 2 Visa Technical Interview Questions

The technical rounds combine DSA coding with database design, OOP fundamentals, and a walkthrough of your resume and projects.

7. N-Queens Hard

Technical Interview Backtracking LeetCode:{' '} #51

Given an integer N, place N queens on an N by N chessboard so that no two queens attack each other, and return all distinct solutions.

Input: n = 4
Output: [[".Q..","...Q","Q...","..Q."],["..Q.","Q...","...Q",".Q.."]]

Approach: Use backtracking, placing one queen per row and tracking which columns and diagonals are already under attack. Backtrack whenever a placement leads to a dead end.

Complexity: Time O(n!) in the worst case · Space O(n) for the tracking sets

Follow-up: How would you modify this to count solutions only, without storing every board configuration?

8. Kth Smallest Element in a BST Medium

Technical Interview Trees LeetCode:{' '} #230

Given a binary search tree and an integer K, find the Kth smallest value in the tree.

Input: root = [3,1,4,null,2], k = 1
Output: 1

Approach: Perform an inorder traversal, which visits BST nodes in sorted order. Stop as soon as you have visited K nodes and return that value.

Complexity: Time O(h + k) · Space O(h) for recursion depth

Follow-up: How would your approach change if the BST were frequently modified and you needed to answer this query repeatedly?

9. Clone a Linked List With a Random Pointer Medium

Technical Interview Linked List · Hashing LeetCode:{' '} #138

Given a linked list where each node has a next pointer and a random pointer that can point to any node or null, create a deep copy of the list.

Input: head with values [7,13,11,10,1] and assorted random pointers
Output: a fully independent deep copy with matching next and random pointers

Approach: First pass, interleave a copy of each node right after its original. Second pass, set each copy's random pointer from the original's random pointer's next. Third pass, unweave the two lists apart.

Complexity: Time O(n) · Space O(1) excluding the output list

Follow-up: Can you solve this using a hash map instead, and what is the trade-off?

10. LRU Cache Medium

Technical Interview Design · Hashing LeetCode:{' '} #146

Design and implement a Least Recently Used cache supporting get and put in O(1) time, evicting the least recently used entry when full.

Input: capacity = 2, put(1,1), put(2,2), get(1), put(3,3), get(2)
Output: 1, -1

Approach: Combine a hash map for O(1) lookup with a doubly linked list to track usage order, moving accessed nodes to the front and evicting from the back.

Complexity: Time O(1) per operation · Space O(capacity)

Follow-up: How would you extend this design to an LFU cache instead, evicting the least frequently used entry?

11. Two Sum in a BST Medium

Technical Interview Trees · Hashing LeetCode:{' '} #653

Given the root of a binary search tree and a target sum, determine whether two distinct nodes exist whose values add up to the target.

Input: root = [5,3,6,2,4,null,7], target = 9
Output: true

Approach: Traverse the tree, storing each visited value in a hash set. For each new node, check whether target - node.val already exists in the set.

Complexity: Time O(n) · Space O(n)

Follow-up: How would you solve this using two iterators walking the BST from smallest and largest ends inward, instead of a hash set?

12. Find the Missing Number Easy

Technical Interview Math · Arrays LeetCode:{' '} #268

Given an array containing n distinct numbers from a range of 0 to n with exactly one missing, find the missing number.

Input: nums = [3, 0, 1]
Output: 2

Approach: Calculate the expected sum of numbers from 0 to n using the closed form formula, then subtract the actual sum of the array. The difference is the missing number.

Complexity: Time O(n) · Space O(1)

Follow-up: How would this change if two numbers were missing instead of one?

13. Maximum Length Subarray With Equal 1s and Minus 1s Medium

Technical Interview Hashing · Prefix Sum LeetCode:{' '} #525

Given an array containing only 1s and -1s, find the length of the longest contiguous subarray with an equal number of each.

Input: arr = [1, -1, 1, 1, -1, -1]
Output: 6

Approach: Track a running prefix sum and store the first index at which each prefix sum value occurs in a hash map. Whenever the same prefix sum reappears later, the subarray between those two indices has an equal count of 1s and -1s.

Complexity: Time O(n) · Space O(n)

Follow-up: How would you adapt this to work with an array of 0s and 1s instead, finding the longest subarray with equal counts?

Part 3 Visa Lead Round, Database, and System Design Questions

The lead round and later technical rounds shift toward database design, security fundamentals, and light system design, alongside a couple of harder coding problems.

14. Last Stone Weight Easy

Onsite Heap LeetCode:{' '} #1046

Given a list of stone weights, repeatedly smash the two heaviest stones together. If they are equal, both are destroyed, otherwise the lighter one is destroyed and the heavier one's weight is reduced by the lighter one's weight. Return the weight of the last remaining stone, or 0 if none remain.

Input: stones = [2,7,4,1,8,1]
Output: 1

Approach: Use a max heap. Repeatedly pop the two heaviest stones, compute the result of smashing them, and push any remainder back onto the heap, until at most one stone is left.

Complexity: Time O(n log n) · Space O(n)

Follow-up: How would this change if you needed the process replayed as a sequence of smash operations, not just the final result?

15. Batch Task Scheduling Medium

Onsite Greedy · Queues

Given a set of tasks and a limit on how many tasks can be processed in one batch, find the minimum total time needed to process all tasks if each batch takes a fixed amount of time regardless of how many tasks it contains, up to the batch limit.

Input: tasks = 10, batchLimit = 3, timePerBatch = 2
Output: 8

Approach: Divide the total task count by the batch limit, rounding up, to get the number of batches needed, then multiply by the time per batch.

Complexity: Time O(1) · Space O(1)

Follow-up: How would this change if different tasks took different amounts of time within a batch?

16. Maximum Sum of Node Values in a Connected Component Medium

Onsite Graphs · DFS

Given an undirected graph with a value on each node, find the maximum sum of node values within any single connected component.

Input: nodes with values [4,2,7,1], edges connecting some of them
Output: the sum of values within the largest-sum connected component

Approach: Use DFS or BFS to identify each connected component, summing the node values within it as you traverse, and track the maximum sum seen across all components.

Complexity: Time O(V + E) · Space O(V)

Follow-up: How would you handle this efficiently if the graph were updated with new edges repeatedly?

17. SQL Self Join for Employee and Manager Names Medium

Onsite SQL

Given an employee table with columns id, name, and manager_id, where manager_id references another employee's id, write a query that returns each employee's name alongside their manager's name.

Input: employee(id, name, manager_id)
Output: employee_name, manager_name for every employee

Approach: Join the employee table to itself, matching each row's manager_id to the id column in the second copy of the table, using a left join so employees without a manager still appear.

Complexity: Not applicable, evaluated on correct SQL syntax and join logic

Follow-up: How would you extend this query to show the full management chain, not just the direct manager?

18. Database Design Fundamentals Medium

Onsite DBMS

Explain what a star schema is and why it is used, how normalization reduces redundancy with an example, and the difference between SQL and NoSQL databases including when you would choose MongoDB over a relational database.

Discussion points: fact and dimension tables in a star schema, normal forms with a
concrete before-and-after example, and structured versus flexible schema trade-offs

Approach: Explain a star schema as a central fact table connected to surrounding dimension tables, optimised for read heavy analytical queries. Walk through normalizing an example table step by step into second or third normal form. Contrast SQL's rigid schema and strong consistency against NoSQL's flexible schema and horizontal scalability, citing MongoDB's BSON document format as an example.

Complexity: Not applicable, evaluated on conceptual clarity and real examples

Follow-up: When would denormalizing a database actually be the right call despite the redundancy it introduces?

19. Security Fundamentals for Web Applications Medium

Onsite Security

Explain the difference between symmetric and asymmetric encryption with a real world use case for each, what a digital signature and certificate are used for, and how HTTPS secures data in transit.

Discussion points: shared-key versus public/private-key encryption, certificate
authorities and trust chains, and the TLS handshake at a high level

Approach: Explain symmetric encryption as fast but requiring a shared secret, commonly used for bulk data encryption, versus asymmetric encryption using public and private key pairs, commonly used for secure key exchange and digital signatures. Describe how a digital certificate, issued by a trusted authority, proves a server's identity, and how HTTPS combines both encryption types during the TLS handshake to establish a secure connection.

Complexity: Not applicable, evaluated on conceptual clarity

Follow-up: What is the practical difference between encryption and hashing, and when would you use each?

20. Designing Basic Rate Limiting for an API Hard

Onsite System Design

Given a log of requests with IP addresses and timestamps, design a system that flags or blocks any IP address making more than X requests within a rolling 10 minute window, a pattern relevant to preventing abuse and DDoS style traffic.

Discussion points: sliding window versus fixed window counting, where the counts are
stored, and how the system scales across multiple servers

Approach: Maintain a per IP address timestamp log or counter using a sliding window algorithm, evicting timestamps older than the window as new requests arrive. Discuss storing this state in a fast, shared store like Redis so the rate limit is enforced consistently across multiple application servers, not just in memory on a single instance.

Complexity: Time O(1) amortized per request with a well chosen data structure · Space O(requests within the window)

Follow-up: How would you handle this system needing to work correctly even during a Redis outage?

Preparation Tips

  • Expect a genuine mix of DSA and database depth. Visa's later rounds lean noticeably more on SQL, normalization, and schema design than many other product companies, so do not neglect DBMS prep in favour of pure DSA.
  • Brush up on OS fundamentals specifically. Threads, mutexes, semaphores, deadlock conditions, and thrashing come up repeatedly across reported technical rounds.
  • Security concepts are worth genuine understanding, not memorised definitions. Encryption, hashing, HTTPS, and authentication versus authorization are asked with follow-ups that probe real understanding.
  • Prepare a clear, specific answer for "why Visa." This question appears in nearly every reported HR or lead round, and a generic answer stands out for the wrong reasons.

Join our Telegram group to discuss more Visa interview questions and prep strategies!

Useful Resources for Your Placement Prep