Sabre came to our college for the role of Associate Software Developer (Intern+Full-time)
Round 1:
Online Test
Duration:1 hr 30 mins.
Total Marks: 164
40 Multiple choice questions containing mix of aptitude and technical. Each question carried either 2 or 3 marks for a correct answer and -1 for a wrong answer. There were also two coding questions for 50 marks and 20 marks respectively:
- Given two strings S1 and S2. Convert S1 to a palindrome by replacing characters by any other character, such that S1 contains S2, in minimum number of steps. If not possible return -1. Example: S1: archie S2: ar Output: 4 (arcchra or arhhra)
- Given a number N, write the number of permutations possible such that if the numbers are written in an array prime indexes (1-based indexing) contain only prime numbers Example: N=4 Output: 4 Explanation: 1 2 3 4 1 3 2 4 4 2 3 1 4 3 2 1To solve this problem simply calculate the number of primes till N and then return the product of factorials of prime and non primes, like for N=4, Number of primes = 2 Number of non primes = 2 So results = 2! x 2! = 4