Visa OA (2-Month SDE Intern)

Visa visited my college campus today for the 2-month SDE intern position and conducted an Online Assessment (OA). There were 4 coding questions in total – 2 easy, 1 medium, and 1 hard Time limit:70mins.

Questions:

1.Array Neighbour Sum
Return the sum of elements in the array that are greater than both of their neighbors.

2.Mission Time (Two Sorted Arrays)
Given two sorted arrays representing departure times of two spaceships and an integer mission, find the time required to complete the mission.
(For each element in array1, pick the next greater element from array2. Repeat this mission times and return the end time).

3.Text Justification (Center Alignment Variant)
Very similar to LeetCode 68. Text Justification
, but instead of left-aligning words, we had to center-align them.
(Implementation heavy).

4.Subarrays with At Least K Distinct Elements
Given an array nums and an integer k, find the number of contiguous subarrays that contain at least k distinct elements.
(Note: repeated elements in a subarray don’t count as distinct).

My Performance:

Solved 3/4 fully.

Partially solved the 4th one.

Final score: 531 / 600.

Now waiting for further rounds 🚀

Comments (2)