Question d’entretien chez Publicis Sapient

1. Factory Design pattern implementation. 2. Enheritance, polymorphism, encapsulation concepts. 3. Given an array of size 100 and it can have number between 0-99. 1 number is duplicate. find it.

Réponse à la question d'entretien

Utilisateur anonyme

26 sept. 2016

For 3rd question i suggested 2 approaches. 1. sort the array and compare a[i] with arr[i+1]. 2. take diff sum of number from 0 to 99 and sum of array number. Then he asked time complexity of 1st approch. I told O(nlogn) for sorting and O(n) for finding duplicate. Then he told O(nlogn)+O(n) is not equal to O(nlogn). i told yes it is but we ignore constant in algorithm. and these notation are for huge value of n. He then handed over his laptop to me and asked to prove from google. I proved and he became angry. He than tol 1 scientist from Sapient came and told your common sense got defieted with this answer. what will you say. I answered go, read some books, do research and if you came back and proved then i will say welcome. He just ended up the interview. I suggested one data structure book before taking an interview on DS. He just became out of control and started looking for security. I just collected my cell from reception and left. He told We will blacklist for 6 month. I replied why for 6 month. I dont want to get a call from this company. please block for entire life