LogIn
I don't have account.

VISA Staff Software Engineer Online Assessment (OA) Experience (2026) | Two Coding Questions | Rejected

Shashwat Tiwari
367 Views

#graph

#dynamic-programming

#interview-experience

#visa

#backend-engineering

Recently, I appeared for the VISA Staff Software Engineer Online Assessment (OA) and I wanted to share my experience to help others preparing for similar hiring rounds. The assessment was conducted on HackerRank and consisted of two coding questions to be completed in 90 minutes. Both problems were algorithmic and required identifying the right approach rather than implementing lengthy code.

Overall, I found the OA to be moderately difficult. The first problem was graph-based, while the second required dynamic programming. Time management played an important role because both questions demanded careful analysis before coding.

OA Details

  • Company: VISA
  • Role: Staff Software Engineer
  • Platform: HackerRank
  • Duration: 90 Minutes
  • Coding Questions: 2
  • Difficulty: Medium to Hard
  • Result: Rejected

Question 1: Graph Traversal / Minimum Path Score

Problem Overview

The first problem was based on graphs and was very similar to LeetCode 2492 – Minimum Score of a Path Between Two Cities.

The graph consisted of multiple cities connected by weighted roads. The objective was to determine the minimum score of a valid path between two given cities. Instead of finding the shortest distance, the score depended on the minimum edge weight encountered along the chosen path.

Although the wording differed from the LeetCode version, the underlying concept and solution pattern were almost identical.

My Thought Process

Initially, I considered whether Dijkstra's algorithm would be required since the problem involved weighted edges. However, after carefully reading the problem statement, I realized that we were not minimizing the total path distance. Instead, we needed to identify the minimum edge weight within the connected component that could be part of a valid path.

That observation simplified the solution significantly.

I modeled the graph using an adjacency list and performed a graph traversal using DFS. While traversing the connected component, I continuously updated the minimum edge weight encountered. Since every node reachable from the source belonged to the same connected component, traversing the entire component was sufficient to determine the answer.

Expected Approach

  • Build the graph using an adjacency list.
  • Perform DFS starting from the source city.
  • Visit every reachable node exactly once.
  • While traversing, maintain the smallest edge weight encountered.
  • Return the final minimum edge weight.

Complexity

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

Question 2: Minimum Cost to Take Courses (Dynamic Programming)

Problem Overview

The second question was a Dynamic Programming problem involving minimizing the total cost required to complete a set of courses.

Although I couldn't find the exact question afterward, it reminded me of LeetCode 983 – Minimum Cost For Tickets because both problems required making optimal decisions among multiple purchase options while minimizing the total cost.

The challenge was deciding whether to pay for an individual course or choose a package that covered multiple upcoming courses, making it a classic optimization problem.

My Thought Process

My first instinct was to try a greedy approach by always selecting the cheapest available option. However, I quickly realized that choosing the locally cheapest option could result in a higher overall cost later.

Since the same subproblems appeared repeatedly, Dynamic Programming was a much better fit. I defined the DP state to represent the minimum cost required from a particular course onward. For each state, I evaluated all possible purchase options and selected the one producing the minimum total cost. This reduced the exponential recursive solution into an efficient DP solution.

Expected Approach

  • Define an appropriate DP state.
  • Use recursion with memoization or bottom-up DP.
  • Consider every valid purchase option.
  • Store intermediate results to avoid repeated computation.
  • Return the minimum achievable cost.

Complexity

Depending on the implementation:

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

Overall Experience

The OA focused more on algorithmic thinking than tricky implementation details.

One interesting aspect was that both questions resembled well-known interview patterns but were presented in different business contexts. Recognizing the underlying algorithmic pattern was the key to solving them efficiently. The graph problem tested knowledge of graph traversal and connected components, while the second problem evaluated Dynamic Programming fundamentals.

I was able to solve a significant portion of the assessment, but I wasn't selected for the next round.

Preparation Tips

If you're preparing for VISA Software Engineer or Staff Software Engineer interviews, I'd recommend practicing the following topics:

  • Graph Traversal (DFS/BFS)
  • Connected Components
  • Shortest Path Variations
  • Dynamic Programming
  • Memoization
  • Bottom-Up DP
  • State Design
  • Greedy vs DP comparisons

Some particularly useful LeetCode problems include:

  • 2492. Minimum Score of a Path Between Two Cities
  • 983. Minimum Cost For Tickets
  • Number of Provinces
  • Network Delay Time
  • Cheapest Flights Within K Stops
  • Coin Change
  • Climbing Stairs
  • House Robber

Final Thoughts

Overall, I felt the OA was well designed and tested core problem-solving skills rather than language-specific knowledge. If you're comfortable identifying common DSA patterns especially Graphs and Dynamic Programming. you should be able to approach similar questions with confidence.

I hope this experience helps anyone preparing for VISA interviews. Best of luck with your preparation!

Responses (0)

Write a response

CommentHide Comments

No Comments yet.