VISA Summer internship OA-On campus
Summary
I recently participated in an Online Assessment for a Summer internship role at VISA. The assessment, conducted on CodeSignal, consisted of four coding challenges that I had 70 minutes to complete.
Full Experience
I received information from our placement cell about VISA's Summer internship role on campus. After a couple of reschedules, the Online Assessment (OA) was finally set for October 24th. The OA was conducted on CodeSignal and comprised 4 questions, totaling 600 marks, with a time limit of 70 minutes. We received the access link a day prior but were required to take the assessment at the scheduled time in our college lab.
Interview Questions (4)
Given an integer n, print a square pattern where the outer border is formed by asterisks (*) and the inner part is filled with hyphens (-). For n=4 the output should be:
****
*--*
*--*
****
Given a list of strings, for each string, reverse it only if both its first and last characters are vowels. The first and last vowel characters themselves should remain in their original positions. If the condition is not met, the string should remain unchanged.
Examples:
Input: ["abcde", "acvbn", "Etuilo"]
Output: ["adcbe", "acvbn", "Eliuto"]
Given an array of numbers, find the total count of 'soowath' subsequences. A subsequence is 'soowath' if it consists of numbers with alternating parity (odd, even, odd, ...) OR if all numbers are odd OR if all numbers are even.
Examples of 'soowath' sequences:
- 1 2 3 4 (alternating)
- 1 3 5 7 (all odd)
- 2 3 4 7 (alternating)
- 4 8 2 6 (all even)
Examples of NON-'soowath' sequences:
- 1 2 4
- 2 3 5
For input = [1, 2, 3, 4], the output should be 10. The 'soowath' subsequences are: (1), (1,2), (1,2,3), (1,2,3,4), (2), (2,3), (2,3,4), (3), (3,4), (4).
The constraint is 10^5, requiring a linear time complexity solution.