Visa Interview Experience | On-Campus Internship
VISA Inc visited our college (NSIT, Delhi) on February 2020 for hiring interns.
Round 1: Coding Round
The round was held on Hackerrank coding platform. It was an 1.5 hour long test comprising of 4 coding questions. The questions were as follows:
Q1 –You are given an array of n points (xi, yi) in the plane, and the problem is to return the distance between closest pair of points in the array.
Q2 – We were given string of n, where str[i] denotes the binary number . For example if str[i]=”3415″ then our deduced binary number will be : 11101 (set bits on position 1, 3, 4 and 5 from end, positions not given can be assumed to be zero). Problem was to sort these strings on increasing order of their binary numbers.
Hint : Use comparator function to sort these strings.
Q3. It was a DP+Greedy problem. ‘N’ machines were given with their ‘efficiency’ and ‘duration’ and a formula was given that, Best Fit for ‘K’ machines=(sum of efficiency of ‘K’ machines) * (minimum of duration of ‘K’ machines). ‘K’ was given, problem was to select ‘K’ machines such that ‘Best fit for ‘K’ machines’ is maximum.
Q4 – You are given array of processes with each process having ‘id’ and ‘run time’ of process. We were required to sort the processes using comparator function.
About 150 students sat for this round and 16 students were selected for the next round.
Round 2: Technical cum HR Round
As my branch is Information Technology, he asked me the difference between Computer Science and IT. He then gave me this question :
There are eight identical-looking coins; one of these coins is counterfeit and is known to be lighter than the genuine coins. What is the minimum number of weighings needed to identify the fake coin with a two-pan balance scale without weights?
and asked my approach to solve this question. We discussed this question for about 10 min and with different scenarios and if-nots .
He then asked me How will I explain ‘What Memory is’ to a 5 year old kid. He asked me the differences between dynamic and static memory and how to implement the same in C++. He asked me about Dangling pointers and what Memory leak is and how can we avoid it. What smart pointers are and why one should use them .
He also asked me about classes and objects and how OOPS programming is different from procedural style of programming.
He asked me some Probability questions later on like what is the probability that one is color blind or not ?. After that, he gave me a Coding question which I was supposed to write in a paper. Question : Print all the possible palindromes in a given string. He then modified the question a bit and asked my approach for the same.
It was about 40 to 45 mins long, we shook hands and I left. The very day result was declared. Total 7 students got selected and I was one of them .
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.