Visa interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Visa
upvote
share-icon
4 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 12 months
Topics: Data Structure, OS, DBMS, System Design, Dynamic Programming
Tip
Tip

Tip 1 : Work on your problem-solving skills. Solve as many questions as you can.
Tip 2 : Communication skills are very important in interviews.
Tip 3 : Do some good projects.

Application process
Where: Campus
Eligibility: 6.5 CGPA
Resume Tip
Resume tip

Tip 1 : Mention some good projects on your resume and be prepared.
Tip 2 : Do not put false things on your resume.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration60 minutes
Interview date3 Nov 2020
Coding problem2

This was an elimination round. There were 2 coding questions. Both questions were of medium level and I solved them in a given time. After this round, 29 students got shortlisted and I was one of them.

1. Ninja And The Dance Competetion

Easy
10m average time
90% success
0/40
Asked in companies
AdobeSalesforceVisa

Ninja has been asked to organize a dance competition. Ninja decided that he will take individual entries and then will divide them into pairs. As part of the entry, he asked the participants to choose any number.

Ninja then thought of a creative method to divide them into pairs. He decided that he would select a number ‘K’, and then select numbers from the list that have a difference equal to ‘K’.

You need to help Ninja in finding the number of distinct pairs from the numbers with differences equal to ‘K’.

Example:
Let us suppose the numbers are chosen by participants: [2, 6, 5, 2, 3] and K = 3, then the distinct pairs having differences equal to K are: [2, 5] and [3, 6] so print 2. 
Note:
The list of numbers can contain duplicate numbers, you need to print only the distinct pairs.

For example [2, 2, 3, 4] and K = 1, so you need to print 2 as the two distinct pairs are: (2, 3) and (3, 4).
Problem approach

I solved this question using the map in O(n) time complexity. First I stored the count of elements in an array then by checking the condition(k > 0 && map.containsKey(i + k) || k == 0 && map.get(i) > 1), I incremented the result by one every time when condition satisfied. Below is my code for the same.

class Solution {
public int findPairs(int[] nums, int k) {
Map map = new HashMap();
for(int num : nums)
map.put(num, map.getOrDefault(num, 0) + 1);

int result = 0;
for(int i : map.keySet())
if(k > 0 && map.containsKey(i + k) || k == 0 && map.get(i) > 1)
result++;
return result;
}
}

Try solving now

2. Maximum length sub-array having absolute difference of adjacent elements either 0 or 1.

Easy
15m average time
85% success
0/40
Asked in companies
AdobeVisaRanosys

Given an array ‘A’ of ‘N’ integers, you need to find the maximum length of the sub-array such that the absolute difference between the adjacent elements of the sub-array should be either 0 or 1.

A sub-array is a contiguous section of original elements of the array.

For Example

Let us say  A = [2,4,6,7,6,9], then adjacent elements of sub array [6,7,6] have absolute difference of either 0 or 1 and this is the maximum length sub-array. So the required answer will be 3.
Problem approach

This was a simple array problem. I solved this using question as:
Starting from the first element of the array, find the first valid sub-array and store its length then starting from the next element (the first element that wasn’t included in the first sub-array), find another valid sub-array. Repeat the process until all the valid sub-arrays have been found then print the length of the maximum sub-array.

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date4 Nov 2020
Coding problem1

This was a technical round on Zoom. The interviewer was very friendly. He gave me one coding problem. I solved the problem and then he asked to improve time and space complexity if possible. I explained my logic very well. After this question, he asked to me explain 3NF(3rd normal form). Then we had some discussion on OOPs concepts.

1. LRU Cache Implementation

Moderate
25m average time
65% success
0/80
Asked in companies
ZomatoQualcommOracle

Design and implement a data structure for Least Recently Used (LRU) cache to support the following operations:

1. get(key) - Return the value of the key if the key exists in the cache, otherwise return -1.

2. put(key, value), Insert the value in the cache if the key is not already present or update the value of the given key if the key is already present. When the cache reaches its capacity, it should invalidate the least recently used item before inserting the new item.
You will be given ‘Q’ queries. Each query will belong to one of these two types:
Type 0: for get(key) operation.
Type 1: for put(key, value) operation.
Note :
1. The cache is initialized with a capacity (the maximum number of unique keys it can hold at a time).

2. Access to an item or key is defined as a get or a put operation on the key. The least recently used key is the one with the oldest access time.
Problem approach

Solve this beforehand.

Try solving now
03
Round
Medium
Video Call
Duration60 minutes
Interview date4 Nov 2020
Coding problem1

This was another technical round. The interviewer gave me a coding problem to solve.
 

1. Valid String

Moderate
18m average time
85% success
0/80
Asked in companies
SalesforcePaytm (One97 Communications Limited)Visa

You have been given a string 'S' containing only three types of characters, i.e. '(', ')' and '*'.

A Valid String is defined as follows:

1. Any left parenthesis '(' must have a corresponding right parenthesis ')'.
2. Any right parenthesis ')' must have a corresponding left parenthesis '('.
3. Left parenthesis '(' must go before the corresponding right parenthesis ')'.
4. '*' could be treated as a single right parenthesis ')' or a single left parenthesis '(' or an empty string.
5. An empty string is also valid.

Your task is to find out whether the given string is a Valid String or not.

Try solving now
04
Round
Easy
HR Round
Duration60 minutes
Interview date5 Nov 2020
Coding problem2

1. System Design problem

What to do if there are too many requests to a web server? Don’t know if they’re correct. I feel it was a more test to see your critical thinking and acquired knowledge.

2. General

What do you want to work in?
Why do you want to join VISA?
Asked what kept them at VISA? And what they’re objectives in their career?

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you create a function in JavaScript?

Choose another skill to practice
Start a Discussion
Similar interview experiences
company logo
SDE - 1
1 rounds | 2 problems
Interviewed by Visa
2227 views
0 comments
0 upvotes
company logo
SDE - 1
1 rounds | 1 problems
Interviewed by Visa
1042 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by Visa
3027 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 7 problems
Interviewed by Visa
1852 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
106026 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
50696 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
31562 views
6 comments
0 upvotes