Summer Interview Questions | Glassdoor.co.in

# Summer Interview Questions

646

Summer interview questions shared by candidates

## Top Interview Questions

Sort: RelevancePopular Date

### Summer at Goibibo was asked...

18 Apr 2015
 You're given an array of n numbers. Each number is between 0 and 100. For each number, you've to print "India" if the number is divisible by 3, "Pakistan" if the number is divisible by 5 and "Japan" if the number is divisible by both 3 and 5.3 AnswersLet the array be a[] with n elements inside. The approach would be simple. for (i = 0; i < n; i++) { if (a[i] % 15 == 0) { printf("Japan\n"); } else if (a[i] % 5 == 0) { printf("Pakistan\n"); } else if (a[i] % 3 == 0) { printf("India\n"); } }for i in range(101): if i%3 == 0 and i%5 == 0: print(i,"Japan") elif i%3 == 0: print(i,"India") elif i%5 == 0: print(i,"Pakistan")for i in 1..<101 { if (i % 3 == 0) { print("-- India --, \(i)") print("-- Japan --, \(i)") }else if (i % 5 == 0) { print("-- Japan --, \(i)") print("-- Pakistan --, \(i)") } }

### Summer at Goibibo was asked...

18 Apr 2015
 There are two arrays city[] and population[], each with n elements. Each city[i] corresponds to population[i], that is, each ith element in city[] has population of ith element in population[]. Now, I've to sort the city[] array according to the population in them.3 AnswersLet p[] and c[] be population and city arrays respectively. I then used simple bubble sort (I asked if he interviewer wanted to me used any specific sorting algorithm) to sort the arrays. for (i = 0; i < n; i++) { for (j = i+1; j < n; j++) { if (p[i] < p[j]) { swap(p[i], p[j]); swap(c[i], c[j]); } } }>>> cities = ['a', 'b', 'c', 'd', 'e'] >>> population = [2, 5, 7, 1, 9] >>> zip(cities, population) [('a', 2), ('b', 5), ('c', 7), ('d', 1), ('e', 9)] >>> zip(population, cities) [(2, 'a'), (5, 'b'), (7, 'c'), (1, 'd'), (9, 'e')] >>> my_map = zip(population, cities) >>> my_map.sort() >>> for population, city in my_map: ... print city ... d a b c ePython code L1 = [15000,8000,3000,10000,45000] L2 = ["Tokio","Paris","Dehli","London","Newyork"] for i in range(len(L1)): for j in range(i+1,len(L1)): if L1[i]>L1[j]: L1[i],L1[j] = L1[j],L1[i] L2[i],L2[j] = L2[j],L2[i] print("The soerted arrays are:") print(L1) print(L2)

### Summer Internship for MBA Marketing Profile at GlaxoSmithKline was asked...

8 Jan 2013
 4ps of marketing? or some current news related to FMCG sector2 AnswersFollowing are the 4Ps of Marketing 1. Product, 2. Price, 3. Place, \$. ProcessProduct, Price, Place and Promotion. these Ps are from Producers perspective. We have 4 Cs from consumers' side. They are Customer solution( Product), Cost( price), Convenience( Place), Communication( promotion) .

### Summer Internship at Progress was asked...

24 Apr 2013
 (Puzzle - not asked to me but to others) Burning rope. A non -uniform rope burn fully in 1 hour. You have two ropes and have to measure 45 minutes. You also have a lighter2 AnswersTrick is to burn ropes from both sides.Burn 1st rope from both sides and 2nd from only one side. When the 1st rope finishes, burn the other side of 2nd rope also. When 2nd rope finishes, it measures 45 minutes

10 Jul 2012

### Summer at Fidelity Investments was asked...

4 Sep 2017
 Force garbage collection in java1 AnswerBy system.gc function

18 Dec 2015

9 Jul 2017

### Summer Associate at Strategy& was asked...

11 Jun 2019
 How many games to find out the winner in a knock-out tournament of n teams.1 Answern-1