Visa Software Engineer 1 (SDE-1) Interview Experience | CodeSignal OA + Graph-Based Technical Rounds
#graph
#sde-1
#interview-experience
#visa
I recently interviewed for the Software Engineer 1 (SDE-1) position at Visa. The entire hiring process took around 2–3 weeks and consisted of four rounds, including an Online Assessment, two technical interviews focused on graph algorithms and a hiring manager discussion.
What stood out about Visa's interview process was that the technical interviews emphasized problem modeling and graph reasoning rather than asking standard LeetCode questions. Interviewers were interested in understanding the thought process, handling edge cases and discussing alternative approaches.
Here's a detailed breakdown of my interview experience.
Interview Overview
| Company | Visa |
|---|---|
| Role | Software Engineer 1 (SDE-1) |
| Interview Mode | Remote |
| Total Rounds | 4 |
| Hiring Timeline | 2–3 Weeks |
| Difficulty | Medium |
| Result | Selected |
Round 1 – CodeSignal Online Assessment
The first round was a 90-minute CodeSignal Online Assessment consisting of four coding questions with increasing difficulty.
Assessment Pattern
- Question 1: Easy
- Question 2: Easy
- Question 3: Medium–Hard
- Question 4: Hard
The problems primarily covered common data structures and algorithms. Typical topics included:
- Arrays
- Strings
- Hashing
- Implementation
- Edge-case handling
- Algorithm optimization
The assessment was designed so that the first two questions could be solved quickly, allowing candidates to spend more time on the later, more challenging problems.
Difficulty : Medium
Round 2 – Technical Interview (Graph Cycle Detection)
The interviewer started with a brief introduction before presenting a graph-based coding problem.
Problem Statement
Given a list of strings, construct a graph where each string represents a node.
Create a directed edge from one string to another if:
- The last character of the first string matches the first character of the second string.
Determine whether the constructed graph contains a cycle.
Example
Input
["abc", "def", "cfg", "gza"]
Possible graph:
abc → cfg
cfg → gza
The objective was to detect whether a cycle existed in the graph.
Expected Approach
The problem naturally maps to a directed graph. A typical solution involves:
- Building an adjacency list
- Running DFS with recursion-state tracking
- Detecting back edges to identify cycles
- Handling disconnected components
//Optimal Java Solution
import java.util.*;
public class StringGraphCycleDetector {
public static boolean hasCycle(List<String> words) {
if (words == null || words.isEmpty())
return false;
int n = words.size();
List<List<Integer>> graph = buildGraph(words);
// 0 = unvisited
// 1 = visiting
// 2 = visited
int[] state = new int[n];
for (int i = 0; i < n; i++) {
if (state[i] == 0) {
if (dfs(i, graph, state))
return true;
}
}
return false;
}
private static boolean dfs(int node,
List<List<Integer>> graph,
int[] state) {
state[node] = 1;
for (int neighbour : graph.get(node)) {
if (state[neighbour] == 1)
return true;
if (state[neighbour] == 0) {
if (dfs(neighbour, graph, state))
return true;
}
}
state[node] = 2;
return false;
}
private static List<List<Integer>> buildGraph(List<String> words) {
int n = words.size();
List<List<Integer>> graph = new ArrayList<>();
for (int i = 0; i < n; i++)
graph.add(new ArrayList<>());
for (int i = 0; i < n; i++) {
String first = words.get(i);
if (first == null || first.isEmpty())
continue;
char lastChar = first.charAt(first.length() - 1);
for (int j = 0; j < n; j++) {
if (i == j)
continue;
String second = words.get(j);
if (second == null || second.isEmpty())
continue;
char firstChar = second.charAt(0);
if (lastChar == firstChar) {
graph.get(i).add(j);
}
}
}
return graph;
}
public static void main(String[] args) {
List<String> test1 = Arrays.asList(
"abc",
"def",
"cfg",
"gza"
);
List<String> test2 = Arrays.asList(
"abc",
"cde",
"efg",
"gab"
);
List<String> test3 = Arrays.asList(
"ab",
"bc",
"ca"
);
List<String> test4 = Arrays.asList(
"abc"
);
List<String> test5 = Arrays.asList();
List<String> test6 = Arrays.asList(
"",
"abc",
"cde"
);
List<String> test7 = Arrays.asList(
"ab",
"bc",
"cd",
"de"
);
List<String> test8 = Arrays.asList(
"ab",
"bc",
"ca",
"xy",
"yz"
);
System.out.println(hasCycle(test1)); // false
System.out.println(hasCycle(test2)); // true
System.out.println(hasCycle(test3)); // true
System.out.println(hasCycle(test4)); // false
System.out.println(hasCycle(test5)); // false
System.out.println(hasCycle(test6)); // false
System.out.println(hasCycle(test7)); // false
System.out.println(hasCycle(test8)); // true
}
}
The discussion also covered:
- Graph construction
- Time complexity
- Space complexity
- Edge cases
- Alternative traversal approaches
Topics Covered
- Graph Modeling
- DFS
- Cycle Detection
- Adjacency List
- Graph Traversal
Difficulty: Medium
Round 3 – Technical Interview (Route Reconstruction)
The second technical interview focused on graph reasoning using a real-world routing problem.
Problem Statement
Given multiple city-to-city routes in the form:
Mumbai → Bangalore
Goa → Dehradun
Calcutta → Mumbai
Dehradun → Calcutta
Reconstruct the complete journey by identifying the true starting city and producing the full travel path.
Expected Output
Goa → Dehradun → Calcutta → Mumbai → Bangalore
Solution Discussion
The first approach involved modeling the cities as a directed graph and traversing it using DFS.
Steps
- Build graph.
- Compute indegree of every node.
- The node with indegree 0 is the starting city.
- Run DFS from the starting city.
- Store traversal.
import java.util.*;
public class JourneyDFS {
public static List<String> reconstructJourney(List<String[]> routes) {
List<String> result = new ArrayList<>();
if (routes == null || routes.isEmpty())
return result;
Map<String, List<String>> graph = new HashMap<>();
Map<String, Integer> indegree = new HashMap<>();
for (String[] route : routes) {
String src = route[0];
String dest = route[1];
graph.computeIfAbsent(src, k -> new ArrayList<>()).add(dest);
indegree.put(dest, indegree.getOrDefault(dest, 0) + 1);
indegree.putIfAbsent(src, 0);
}
String start = null;
for (String city : indegree.keySet()) {
if (indegree.get(city) == 0) {
start = city;
break;
}
}
if (start == null)
return result;
Set<String> visited = new HashSet<>();
dfs(start, graph, visited, result);
return result;
}
private static void dfs(String city,
Map<String, List<String>> graph,
Set<String> visited,
List<String> result) {
if (!visited.add(city))
return;
result.add(city);
if (!graph.containsKey(city))
return;
for (String next : graph.get(city))
dfs(next, graph, visited, result);
}
public static void main(String[] args) {
List<String[]> routes = Arrays.asList(
new String[]{"Mumbai","Bangalore"},
new String[]{"Goa","Dehradun"},
new String[]{"Calcutta","Mumbai"},
new String[]{"Dehradun","Calcutta"}
);
System.out.println(reconstructJourney(routes));
}
}
Time : O(N)
Space : O(N)
The interviewer then encouraged discussion of alternative solutions. A simpler and more efficient method involved:
- Storing every destination in a HashSet.
- Finding the source city that never appears as a destination.
- Using a HashMap to follow each city's outgoing route until the journey ends.
This approach reconstructs the route efficiently while avoiding unnecessary graph traversal.
import java.util.*;
public class JourneyHashMap {
public static List<String> reconstructJourney(List<String[]> routes) {
List<String> result = new ArrayList<>();
if (routes == null || routes.isEmpty())
return result;
Map<String, String> nextCity = new HashMap<>();
Set<String> destinations = new HashSet<>();
for (String[] route : routes) {
String src = route[0];
String dest = route[1];
nextCity.put(src, dest);
destinations.add(dest);
}
String start = null;
for (String city : nextCity.keySet()) {
if (!destinations.contains(city)) {
start = city;
break;
}
}
if (start == null)
throw new IllegalArgumentException("Invalid route: no unique starting city found.");
Set<String> visited = new HashSet<>();
while (start != null) {
if (!visited.add(start))
throw new IllegalArgumentException("Cycle detected in routes.");
result.add(start);
start = nextCity.get(start);
}
if (visited.size() != nextCity.size() + 1)
throw new IllegalArgumentException("Disconnected routes exist.");
return result;
}
public static void main(String[] args) {
List<String[]> routes = Arrays.asList(
new String[]{"Mumbai","Bangalore"},
new String[]{"Goa","Dehradun"},
new String[]{"Calcutta","Mumbai"},
new String[]{"Dehradun","Calcutta"}
);
System.out.println(reconstructJourney(routes));
}
}
Concepts Evaluated
- Graph Modeling
- HashMap
- HashSet
- Path Reconstruction
- Edge Cases
- Algorithm Design
Difficulty: Medium
Round 4 – Hiring Manager Discussion
The final round was a behavioral interview with the hiring manager. The discussion began with a self-introduction and a walkthrough of my resume. Some of the questions included:
- Tell me about yourself.
- Why do you want to join Visa?
- Describe a mistake you made and what you learned from it.
- How do you plan to grow in your career?
- What motivates you as a software engineer?
The interviewer focused on communication skills, learning mindset, ownership and long-term career aspirations rather than technical topics.
Difficulty: Easy
Overall Experience
The Visa SDE-1 interview process was well structured and emphasized practical problem-solving over memorizing algorithms. While the Online Assessment tested core DSA skills with progressively harder questions, the technical interviews focused on representing real-world scenarios as graph problems and reasoning about efficient solutions.
Both technical rounds involved graph modeling, but the discussions extended beyond coding. Interviewers were interested in understanding the approach, handling edge cases, evaluating alternative solutions and explaining complexity trade-offs. The hiring manager round focused on communication, growth mindset and cultural fit.
Overall, the experience was positive, with interviewers creating a collaborative environment and encouraging discussion throughout the process.
Preparation Tips
If you're preparing for Visa's Software Engineer interview, focus on the following areas:
- Arrays and Strings
- HashMaps and HashSets
- Graph Representation
- Depth-First Search (DFS)
- Breadth-First Search (BFS)
- Cycle Detection in Directed Graphs
- Topological Concepts
- Path Reconstruction Problems
- Complexity Analysis
- Edge Case Handling
For the CodeSignal assessment, solve the easy questions quickly without sacrificing code quality so that more time is available for the harder problems. During technical interviews, explain your thought process, discuss trade-offs and mention possible optimizations even if they are not explicitly requested.
General Interview Advice
One of the most valuable lessons from this interview process was the importance of communication. Interviewers are often evaluating how you approach a problem as much as whether you arrive at the final solution. As you solve a problem:
- Ask clarifying questions before coding.
- Explain your reasoning step by step.
- Discuss alternative approaches.
- Consider edge cases early.
- Analyze time and space complexity.
- Suggest optimizations if time permits.
Keeping the conversation active helps interviewers understand your problem-solving process and demonstrates confidence in your technical decisions.
Final Verdict
- Round 1: CodeSignal Online Assessment
- Round 2: Graph Cycle Detection
- Round 3: Route Reconstruction Using Graphs and Hashing
- Round 4: Hiring Manager Discussion
Overall Result: Selected 🎉
