Interview Question On Data Structures Algorithms OS and Networking PDF
Interview Question On Data Structures Algorithms OS and Networking PDF
1. Copyright
2. Amazon Interview | Set 1
3. Amazon Interview | Set 2
4. Amazon Interview | Set 3
5. Yahoo Interview | Set 1
6. Microsoft Interview | Set 1
7. Yahoo Interview | Set 2
8. Yahoo Interview | Set 3
9. Microsoft Interview | Set 2
10. Microsoft Interview | Set 3
11. Amazon Interview | Set 4
12. Adobe Interview | Set 1
13. Microsoft Interview | Set 4
14. Amazon Interview | Set 5
15. Microsoft Interview | Set 5
16. Microsoft Interview | Set 6
17. Amazon Interview | Set 6
18. Amazon Interview | Set 7
19. Microsoft Interview | Set 7
20. Microsoft Interview | Set 8
21. Adobe Interview | Set 2
22. Microsoft Interview | Set 9
23. [TopTalent.in] Interview with Arun Dobriyal who landed a job at Facebook, Palo Alto
24. [TopTalent.in] Rushabh Agrawal from BITS Pilani talks about his Google interview experience
25. Amazon Interview | Set 8
26. Amazon Interview | Set 9
27. Amazon Interview | Set 9 (Answers)
28. Amazon Interview | Set 10
29. Amazon Interview | Set 11
30. Oracle Interview | Set 1
31. Adobe Interview | Set 3
32. [TopTalent.in] How Flipkart gets the best out of their applicants
33. Amazon Interview | Set 12
34. Microsoft Interview | Set 10
35. Groupon Interview | Set 1 (SDE Profile - Fresher)
36. Microsoft Interview | Set 11
37. Qualcomm Interview | Set 1
38. Amazon Interview | Set 13
39. Strand Life Sciences Interview | Set 1
40. Facebook Interview | Set 1
41. Microsoft Interview | 12
42. Goldman Sachs Interview | Set 1
43. Directi Interview | Set 1
44. Amazon Interview | Set 14
45. Amazon Interview | Set 15
46. Amazon Interview | Set 16
47. Software Engineering Lab, Samsung Interview | Set 1
48. Directi Interview | Set 2
49. [TopTalent.in] Nitin Gangahar on the Many Benefits of Competition Programming
50. TransBit Interview | Set 1
51. Microsoft Interview | 13
52. Symantec Interview | Set 1
53. Nvidia Interview | Set 1
54. Adobe Interview | Set 4
55. [TopTalent.in] Exclusive Interview with Ravi Kiran from BITS, Pilani who got placed in
Google, Microsoft and Facebook
56. Amazon Interview | Set 17
57. Works Applications Co., Ltd. Japan Interview | Set 1
58. Microsoft Interview | 14
59. Amazon Interview | Set 18
60. Amazon Interview | Set 19
61. [TopTalent.in] Interview with Sujeet Gholap, placed in Microsoft, Google, Samsung, Goldman
Sachs & Tower Research
62. Amazon Interview | Set 20
63. Amazon Interview | Set 21
64. Microsoft Interview | 15
65. D E Shaw Interview | Set 1
66. [TopTalent.in] In Conversation With Nithin On What It Takes To Get Into Goldman Sachs
67. Microsoft Interview | 16
68. Amazon Interview | Set 22
69. [TopTalent.in] Rapid Fire Interview With Trisha Roy About Her Job Offers from Nomura and
IOC
70. Amazon Interview | Set 23
71. Microsoft Interview | 17
72. Microsoft Interview | 18
73. GS Labs Interview | Set 1
74. Amazon Interview | Set 24
75. HCL Interview | Set 1
76. [TopTalent.in] Google, Facebook, Amazon, Walmart & PocketGems, All Fighting For Prasoon
Mishra
77. Amazon Interview | Set 25
78. Amazon Interview | Set 26
79. Amazon Interview | Set 27
80. Amazon Interview | Set 28
81. Amazon Interview | Set 29
82. [TopTalent.in] Interview with Rizwan Hudda Who Was offered The Highest Package In India By
Tower Research
83. Amazon Interview | Set 30
84. Google Interview Experience for Technical Operations Specialist[Tools Team] Adwords,
Hyderabad, India
85. [TopTalent.in] Interview With Nandini from VNIT Who Bagged an Off Campus Job in Microsoft
86. Microsoft Interview | Set 19
87. Fab.com Pune Interview Experience
88. Goldman Sachs Interview Experience
89. Adobe Interview | Set 5
90. Amazon Interview | Set 31
91. Amazon Interview | Set 32
92. Amazon Interview | Set 33
93. [TopTalent.in] Interview with Manpreet Who Got Offers From Amazon, Hoppr, Browserstack,
Reliance via TopTalent.in
94. Amazon Interview | Set 34
95. Amazon Interview | Set 35
96. Amazon Interview | Set 36
97. Yahoo Interview | Set 3
98. Morgan Stanley Interview | Set 1
99. Morgan Stanley Interview | Set 2
100. [TopTalent.in] Interview with Ellora Nath who got a Job Offer from EBay
101. Amazon Interview | Set 37
102. D E Shaw Interview | Set 2
103. Cisco Interview | Set 1
104. Google Placement Questions
105. Amazon Interview | Set 38 (SDE-I)
106. VMWare Interview | Set 1 (MTS-2)
107. Fiberlink (maas360) Interview | Set 1
108. Cisco Interview | Set 2
109. Morgan Stanley Interview | Set 3
110. Cisco Interview | Set 3
111. Morgan Stanley Interview | Set 4
112. Amazon Interview | Set 39 (SDE)
113. Cisco Interview | Set 4
114. [TopTalent.in] Interview with Pradeep Verma from NIT Trichy who talks about his internship at
Amazon
115. Oracle Interview | Set 2 (On-Campus)
116. Amazon Interview | Set 40 (On-Campus Round 1)
117. [TopTalent.in] Rubal Chadha on playfully working in EA – A Gamer’s Paradise
118. Twitter Interview | Set 1
119. Amazon Interview | Set 41 (On–campus)
120. Adobe Interview | Set 6 (On-campus for MTS-1)
121. Amazon Interview | Set 42 (On-Campus)
122. Adobe Interview | Set 7 (On-campus for MTS-1)
123. Amazon Interview | Set 43 (On-Campus)
124. Amazon Interview | Set 44 (For Internship)
125. Amazon Interview | Set 45 (For Internship)
126. Microsoft Interview | Set 20 (On-campus for Internship)
127. Amazon Interview | Set 46 (On-campus for Internship)
128. [TopTalent.in] Parag Reveals Few Secrets about getting into NetApp
129. Amazon Interview | Set 47 (Off-campus for SDE-1)
130. Amazon Interview | Set 48 (On-campus for SDE-1)
131. Amazon Interview | Set 49 (On-campus for SDE-1)
132. Amazon Interview | Set 50 (On-campus for SDE)
133. Directi Interview | Set 3
134. Amazon Interview | Set 51 (On-campus for SDET)
135. [TopTalent.in] Want to know how to get into Yahoo! ? Read our exclusive Interview with Prabha
136. Qualcomm Interview | Set 2
137. Amazon Interview | Set 52 (For Internship)
138. Amazon Interview | Set 53 (For SDE-1)
139. Amazon Interview | Set 54 (For Internship)
140. [TopTalent.in] Hacker with a Heart – Interview with Google Hall Of Fame Member, Mohit Sahu
from NIT Raipur
141. Flipkart Interview | Set 1 (For SDE 2)
142. Drishti-Soft Solutions Interview | Set 1
143. [TopTalent.in] What it takes to be a Googler? An Interview with Google’s recent hire Romal
Thoppilan
144. Flipkart Interview | Set 2 (For SDE 1)
145. Citrix Interview | Set 1
146. Amazon Interview | Set 54 (On Campus for SDE)
147. Yatra.com Interview | Set 1
148. Cisco Interview | Set 5
149. Microsoft Interview | Set 21
150. SAP Labs India | Set 1 (On Campus Interview)
151. Goldman Sachs Interview | Set 2 (On-Campus for Analyst)
152. Microsoft Interview | Set 22
153. Amazon Interview | Set 54 (Off-Campus For SDE-1)
154. Amazon Interview | Set 55 (On-Campus)
155. Arista Network Interview | Set 1
156. Microsoft Interview | Set 23
157. Oracle Interview | Set 3 (On-Campus)
158. Microsoft Interview | Set 24
159. D E Shaw Interview | Set 3
160. Oracle Interview | Set 4 (On-Campus)
161. DELL Interview | Set 1 (On-Campus)
162. Microsoft Interview | Set 25 (On-campus for Internship)
163. Cisco Interview | Set 6
164. Amazon Interview | Set 56 (Off-Campus)
165. Amazon Interview | Set 57 (Off-Campus for SDE-1)
166. Amazon Interview | Set 58 (On-campus for Software Development Engineer)
167. Amazon Interview | Set 59 (Off-campus for SDE-1)
168. Flipkart Interview | Set 3
169. Amazon Interview | Set 60 (For Internship)
170. Amazon Interview | Set 61 (For Internship)
171. Amazon Interview | Set 62 (For SDE-1)
172. Amazon Interview | Set 63 (For SDE-1)
173. Open Solutions Interview | Set 1
174. IBM IRL Interview | Set 1
175. Amazon Interview | Set 64 (Off-Campus for SDE)
176. Amazon Interview | Set 65 (Off-Campus for SDE-2)
177. Amazon Interview | Set 66 (For SDE)
178. Amazon Interview | Set 67 (For SDE-1)
179. Amazon Interview | Set 68 (For SDE-1)
180. Microsoft Interview | Set 26
181. Myntra Interview | Set 1
182. Cadence India Interview | Set 1
183. Amazon Interview | Set 69 (For SDE-1)
184. Flipkart Interview | Set 4 (For SDE-1)
185. Amazon Interview | Set 70 (On-Campus For Internship)
186. Adobe Interview | Set 8 (Off-Campus)
187. Amazon Interview | Set 71 (For SDE-2)
188. Bharti SoftBank (HIKE) Interview | Set 1
189. Adobe Interview | Set 9
190. Flipkart Interview | Set 5 (Off-Campus for SDE-1)
191. Amazon Interview | Set 72 (Off campus for SDE-1)
192. Amazon Interview | Set 73 (For SDE-1)
193. Amazon Interview | Set 74
194. Amazon Interview | Set 75 (For SDE-1)
195. Amazon Interview | Set 76 (For SDE-1)
196. Amazon Interview | Set 77 (Off-Campus For SDE-1)
197. Belzabar Interview Computer Scientist Internship
198. Amazon Interview | Set 78
199. Yatra.com Interview | Set 2
200. Expedia Interview for SDE-II
201. Amazon Interview | Set 79 (For SDE-1)
202. Android Developer Interview at Headstrong and SnapDeal
203. Software Engineering Lab, Samsung Interview | Set 2
204. Flipkart Interview | Set 6
205. Expedia Interview | Set 2
206. Fab.com Pune Interview | Set 2
207. Amazon Interview | Set 80
208. Google (Mountain View) Interview
209. One97(Paytm) Interview Experience
210. Amazon Interview | Set 81 (For SDE-I)
211. Amazon Interview | Set 82 (For SDE-2)
212. Amazon Interview | Set 83
213. Amazon Interview | Set 84
214. Amazon Interview | Set 85
215. Amazon Interview | Set 86
216. [TopTalent.in] Top College: No, Top Talent: Yes ; Anudeep cracks Google
217. Flipkart Interview | Set 7 (For SDE II)
218. Microsoft Interview | Set 27
219. Shreepartners Gurgaon Campus Recruitment
220. Oracle Interview | Set 5 (For Server Technologies)
221. Amazon Interview | Set 87 (For SDE)
222. Pilani Soft Labs (redBus) Interview
223. Oracle Interview | Set 6
224. Amazon Interview | Set 88
225. Interview experience in SRI, Bangalore
226. Amazon Interview | Set 89
227. Flipkart Interview | Set 8 (For SDE 1)
228. [TopTalent.in] Exclusive Interview with Prashanth from IIT Madras who landed a job at
Microsoft, Redmond
229. Amazon Interview | Set 90
230. [TopTalent.in] 51 Students from BITS get into GSoC, Janani talks about her experience.
231. Amazon Interview | Set 91
232. [TopTalent.in] Interview with Rishav who got a job offer from one of the core companies,
Qualcomm
233. Amazon Interview | Set 93
234. Paxcel Technologies Interview Experience
235. Amazon Interview | Set 95 (For SDE-I)
236. [ToTalent.in] Exclusive Interview with Shweta, who got a job at Goldman Sachs
237. Amazon Interview | Set 96 (On-Campus for Internship)
238. Flipkart Interview | Set 9 (On-Campus)
239. Flipkart Interview | Set 10 (On-Campus For SDE-1)
240. Amazon Interview | Set 97 (On-Campus for SDE1)
241. Amazon Interview | Set 98 (On-Campus)
242. Amazon Interview | Set 99 (On-Campus)
243. Amazon Interview | Set 100 (On-Campus)
244. D E Shaw Interview | Set 4 (On-Campus for Internship)
245. Citrix Interview | Set 2
246. Accolite Interview | Set 1 (On-Campus)
247. Amazon Interview | Set 101 (On-Campus)
248. Cisco Interview | Set 7(On-Campus)
249. Amazon Interview | Set 102
250. Amazon Interview | Set 103 (On-Campus)
251. Amazon Interview | Set 104
252. Payu Iinterview (On-Campus)
253. Amazon Interview | Set 105 (On-Campus)
254. Amazon Interview | Set 106 (On Campus for Internship)
255. Directi Interview Questions
256. Amazon Interview | Set 107 (For SDE-1)
257. Flipkart Interview | Set 11
258. D E Shaw Interview | Set 5 (On-Campus for Internship)
259. Stanley Interview | Set 7 (On-Campus)
260. Amazon Interview | Set 108 (On-Campus)
261. Aricent Interview | Set 1 (On-Campus)
262. Amazon Interview | Set 109 (On-Campus)
263. Amazon Interview | Set 110 (On-Campus)
264. Amazon Interview | Set 111 (On-Campus)
265. Microsoft Interview | Set 28 (On-Campus)
266. Motorola Mobility(Bangalore) Android Developer Interview
267. Amazon Interview | Set 112 (On-Campus)
268. Amazon Interview | Set 113 (On-Campus for Internship)
269. Intel Interview Experience
270. Intuit Interview | Set 1 (On-Campus)
271. Intuit Interview | Set 2 (On-Campus)
272. Morgan Stanley Interview | Set 8 (On-Campus)
273. Microsoft Interview | Set 29 (On-Campus for Internship)
274. Zoho Interview | Set 1 (On-Campus)
275. Adobe Interview | Set 10 (Software Engineer)
276. Flipkart Interview | Set 12 (On-Campus)
277. Interview Experience at Rockwell Collins
278. Microsoft Interview | Set 30 (On-Campus)
279. Morgan Stanley Interview | Set 9 (On-Campus for Internship)
280. One Payu Interview Experience
281. Directi Interview | Set 5 (On-Campus)
282. Amazon Interview | Set 114 (On-Campus for Internship)
283. Microsoft Interview | Set 31 (On-Campus)
284. Microsoft Interview | Set 32 (On-Campus for Internship)
285. Amazon Interview | Set 115 (On-Campus)
286. Amazon Interview | Set 116 (On-Campus)
287. Amazon Interview | Set 117 (On-Campus for Internship)
288. Aricent Interview | Set 2 (On-Campus)
289. Goldman Sachs Interview | Set 3
290. Hike Interview Experience
291. Goldman Sachs Interview | Set 4 (On-Campus for Internship)
292. Inmobi On Campus Interview Experience
293. Nagarro On Campus Interview Experience
294. Morgan Stanley Interview | Set 10 (On-Campus)
295. Interview Experience @ Bankbazaar.com
296. Morgan Stanley Interview | Set 11 (On-Campus)
297. Amazon Interview | Set 118 (On-Campus for Internship)
298. Adobe Interview | Set 11 (On-Campus)
299. Amazon Interview | Set 119 (On-Campus for Internship)
300. [TopTalent.in] Nothing Could Stop Zubin from Landing a Dream Job at Goldman Sachs
301. Arista Network Interview | Set 2 (On Campus Full Term)
302. Expedia Interview | Set 3 (On Campus Full Term)
303. Amazon Interview | Set 120 (On-Campus for Internship)
304. Amazon Interview | Set 121 (On-Campus for SDE-1)
305. Amazon Interview | Set 122 (On-Campus for Internship)
306. Adobe Interview | Set 12 (On Campus for MTS-1)
307. Flipkart Interview | Set 13
308. Interview Experience at Samsung Research Institute - Delhi
309. Telephonic interview for Tower Research LLC, Gurgaon internship(High Frequency Trading)
310. Amazon Interview | Set 123 (On-Campus for Internship)
311. Oracle Interview | Set 7
312. Directi Interview | Set 6 (On-Campus for Internship)
313. [TopTalent.in] Exclusive Interview with Anubhav from BITS Pilani who cracked EBay
314. Adobe Interview | Set 13 (On Campus for Internship)
315. Facebook Interview | Set 2 (On Campus for Internship)
316. Adobe Interview | Set 14 (On Campus for Full Time)
317. Microsoft Interview | Set 33 (On-Campus for Internship)
318. Sandisk Corporation On Campus Interview for Software Developer
319. MAQ Software Interview Experience
320. MAQ Software Interview Experience | Set 2
321. Oracle Interview | Set 8
322. SapientNitro Interview Experience
323. Flipkart Interview | Set 14 (For SDET-1)
324. [TopTalent.in] Exclusive Interview with Vivek Ruparel who got into Amazon
325. Samsung On Campus Interview
326. [TopTalent.in] Exclusive Rapid Fire Interview with Gritika Who Got a job offer from Microsoft
327. Aptitude Test (60 min):
328. Coding Test (2 Questions 30 min)
329. Interviews:
330. Morgan Stanley On Campus Written Round
331. Sapient global market Interview Experience
332. Athena Health Interview Experience
333. Amadeus Labs Interview Experience
334. Amazon telephonic interview questions for SDE 1
335. Oracle Interview | Set 8 (On Campus for Application Developer)
336. Microsoft Interview | Set 34 (On-Campus)
337. Microsoft IDC Interview | Set 35 (On-Campus for Internship)
338. Akamai placement questions for the role of Associate Network Infrastructure Engineer or
Associate Network Operations Engineer
339. Morgan Stanley Interview | Set 12 (On-Campus for Technology Analyst)
340. Amazon Interview | Set 124 (On-Campus)
341. Amazon Interview | Set 125 (On-Campus for Internship)
342. U2opia Mobile Interview Experience
343. Payu Interview Experience | Set 3 (On-Campus)
344. Expedia Interview | Set 4 (On-Campus)
345. CommVault Systems Placement Experience
346. Microsoft Research India Interview | Set 36 (On-Campus for Internship)
347. Microsoft Interview | Set 37 (For SDE-1)
348. Amazon Interview experience | Set 126 (For SDE-1)
349. Interview Experience with Indus Valley Partners
350. Samsung R & D Interview Experience for Internship
351. Citrix Interview | Set 2 (Written Test Experience)
352. Linkedin Intership Interview for Software development Engineer
353. Amazon Interview experience | Set 127 (For Internship)
354. [TopTalent.in] Exclusive Interview with Abhishek who got into DE Shaw
355. Intuit Interview | Set 3 (For SE-2)
356. SAP Labs Interview Experience for Developer Associate
357. Belzabar interview experience for Computer Scientist
358. [TopTalent.in] “It’s the best feeling of my life” says Krunal after cracking Google, Mountain
View
359. Zoho Interview | Set 2 (On-Campus)
360. Arista Networks Interview | Set 3
361. Amazon Interview experience | Set 128 (For SDET)
362. Amazon interview Experience | Set 129 (For SDE 1 Off-Campus)
363. Microsoft IDC and IT First Round Questions
364. Hike Interview | Set 2
365. Chalk Studio Interview Experience
366. Microsoft IDC Interview Experience | Set 38 (For Internship)
367. Informatica Internship Interview Experience
368. Belzabar Software Interview Experience
369. D E Shaw Interview | Set 6 (Off-Campus)
370. Intuit Interview | Set 4 (For SSE)
371. Interview Experience @ Service Now, Hyderabad
372. BrowserStack Written Round Experience
373. ZoomRx On-Campus Interview Experience
374. Oracle Interview | Set 9 (On campus for Application Development profile)
375. Amazon interview Experience | Set 130 (For SDET 1)
376. Aricent Group Chennai Interview Experience
377. Amazon interview Experience | Set 131 (For SDET 1)
378. Amazon interview Experience | Set 132 (For SDE Intern)
379. Aricent Interview | Set 4 (On-Campus)
380. BrowserStack Placement Paper
381. [TopTalent.in] Exclusive Interview with Arushi Who Got Into Flipkart
382. Intuit Interview | Set 5 (On-Campus for Internship)
383. Adobe Interview | Set 15 (For MTS-1)
384. Amazon interview Experience | Set 133
385. Amazon interview Experience | Set 134 (Off-Campus for SDE)
386. Nagarro Interview Experience | Set 2
387. BrowserStack Written Test | Set 3
388. Linkedin Online Coding Questions for Campus Placement
389. Amazon interview Experience | Set 135 (On-Campus for SDE)
390. BrowserStack On-Campus Placement Questions
391. Nagarro Interview Experience | Set 3 (On-Campus)
392. Amazon interview Experience | Set 136 (For SDE-T)
393. Axtria Interview Experience
394. Cisco Interview Experience | Set 8 (On-Campus)
395. Expedia Interview Experience | Set 5 (On-Campus)
396. Flipkart Interview | Set 15 (For SDE-II)
397. Myntra Interview | Set 2 (For SDE-II)
398. Paxcel Technologies Interview Experience | Set 2
399. Length of the largest subarray with contiguous elements | Set 2
400. MakeMyTrip Interview Experience
401. Flipkart Written test for Placement
402. IBM ISL Interview Experience
403. Amazon interview Experience | Set 137 (Assessment test for SDE)
404. Hike Interview Experience | Set 3 (For SDE 1)
405. Amazon interview Experience | Set 138 (For SDE 1)
406. Amazon interview Experience | Set 140 (Experienced for SDE)
407. Microsoft Interview Experience | Set 39 (On-Campus)
408. [TopTalent.in] Interview with Chirag Who Got into DreamWorks
409. Amazon interview Experience | Set 141 (For SDE1)
410. SAP Labs India | Set 2 (On Campus Interview)
411. Adobe Interview | Set 16 (For MTS-1)
412. Nagarro Interview Experience | Set 4 (Off-Campus)
413. Amazon interview Experience | Set 142 (Off-Campus for SDE-1)
414. [TopTalent.in] Interview With Amit Who Got Into Flipkart
415. Amazon Interview Experience | Set 143 (Off-Campus for SDE-1)
416. Amazon Interview Experience | Set 144 (Off-Campus For SDE-1)
417. Citicorp On Campus Interview Experince
418. Google Interview Experience
419. Amazon Interview Experience | Set 145 (Off-Campus)
420. Zoho Interview | Set 3 (Off-Campus)
421. Adobe Interview | Set 17 (For MTS-1)
422. MakeMyTrip Interview Experience | Set 2 (On-Campus)
423. One97 Interview Experience | Set 2
424. KLA Tencor Interview Experience
425. Wizecommerce On-Campus Interview Experience
426. [TopTalent.in] Interview With Divanshu Who Got Into Google, Mountain View
427. First round
428. Second round
429. SapientNitro Interview Experience | Set 2 (On-Campus)
430. InfoEdge Interview Experience
431. MakeMyTrip Interview Experience | Set 3
432. Jabong Interview Experience for Software Development Engineer
433. Amazon Interview Questions | Set 147
434. Amazon Interview Experience | Set 148
435. Amazon Interview Experience | Set 149 (On-Campus for Internship)
436. Amazon Interview Experience | Set 150 (SDE1 for 1 Year Experienced)
437. Amazon Interview Experience | Set 151 (For SDE)
438. Amazon Interview Experience | Set 152
439. MakeMyTrip Interview Experience | Set 4
440. Goldman Sachs Interview Experience | Set 5
441. [TopTalent.in] Interview With Faraz Who Got Into MobiKwik
442. Sapinet interview experience | Set 1(On-campus)
443. Amazon Interview Experience | Set 152 (Kindle Team SDE-1 )
444. Flipkart Interview | Set 16
445. Amazon Interview Experience | Set 153 (For SDE1)
446. Microsoft Interview Experience | Set 40 (Off-Campus)
447. Hike Interview Experience | Set 4 (Off-Campus for SDE1)
448. Quikr Interview Experience for Software Engineer Position in Bangalore
449. Amazon Interview Experience | Set 154 (For SDE2)
450. Goldman Sachs Interview Experience | Set 5 (On-Campus)
451. Walmart Labs Interview Experience
452. Goldman Sachs Interview Experience | Set 6
453. Amazon Interview Experience | Set 155 (On-Campus)
454. Nvidia Interview | Set 3 (On Campus)
455. My Interview experience of Service Now USA
456. VISA Inc. Interview Experience (On-Campus)
457. InMobi Interview Eexperience | Set 2 (On-Campus)
458. Interview Experience at Optimus Information Inc.
459. VISA Inc. Interview Experience | Set 2 (On-Campus)
460. Linkedin Interview Experience | Set 3 (On-Campus)
461. Linkedin Interview Experience | Set 4 (On-Campus)
462. Microsoft Interview Experience | Set 41 (On-Campus)
463. Amazon Interview Experience | Set 156 (On-Campus)
464. Accolite Interview | Set 2 (On-Campus)
465. Target Corporation Interview Experience | Set 1 (On-Campus)
466. ServiceNow Interview Experience | Set 3 (On-Campus)
467. Amazon Interview Experience | Set 157 (On-Campus)
468. Interview Experience with Synopsys - On Campus
469. Snapdeal (Software) Interview Experience | Set 1 (On-Campus)
470. Amazon Interview Experience | Set 158 (Off-Campus)
471. Bharti SoftBank (Portal Team) Interview Experience (Off-Campus)
472. [TopTalent.in] Exclusive Rapid Fire Interview with Deepali Who Got Into Facebook
473. Amazon Interview Experience | Set 159 (Off-Campus)
474. Prop Tiger Interview Experience
475. Adobe Interview Experience | Set 18 (For WBT Profile)
476. PayU Interview Experience | Set 4 (For Fresher)
477. Qubole Interview Experience
478. Housing.com Interview Experience
479. Global Analytics Interview Experience
480. Citrix R&D Interview Experience | Set 3 (On-Campus)
481. Housing.com Interview Experience | Set 2
482. Brocade Interview Experience
483. UHG(United Health Group) Interview Experience
484. MAQ Software Interview Experience | Set 3
485. Amazon Interview Experience | Set 160 (For SDE 2)
486. Athena Health Interview Experience | Set 2
487. My Interview Experience at Polycom
488. D E Shaw Interview | Set 7 (Off Campus)
489. IIT Delhi MS(R) CS Interview
490. Amazon Interview Experience | Set 161 (Off Campus for SDE-1, Banglore)
491. Adobe Interview Experience | Set 19 (For MTS)
492. Amazon Interview Experience | Set 162
493. Zoho Interview | Set 4
494. Amazon Interview Experience | Set 163 (For SDE II)
495. Oracle Interview | Set 10 (For Server Technology)
496. Red Hat Interview Experience | Set 1 (For Internship)
497. Snapdeal Interview Experience | Set 2 (For Software Engineer 2)
498. One Convergence Device Interview Experience | Set 1 (On-Campus)
499. Amazon Interview Experience | Set 164 (For SDE I)
500. Synopsys Interview Experience | Set 2
501. Amazon Interview Experience | Set 165 (For SDE I)
502. Huawei Interview Experience
503. Gramener Interview Experience | Set 1 (For Visualization Developer)
504. MAQ Software Interview Experience | Set 5
505. Amazon Interview Experience | Set 165 (For SDE I)
506. Microsoft Interview Experience | Set 42 (For SDE1)
507. Payu Interview Experience | Set 5 (On-Campus)
508. Snapdeal interview experience | Set 3
509. Amazon Interview Experience | Set 166 (For SDE I)
510. Knowlarity Interview Experience
511. Amazon Interview Experience | Set 167 (SDE I for 1 year 6 months experience)
512. Microsoft Interview Experience | Set 43
513. Amazon Interview Experience | Set 168
514. Amazon Interview Experience | Set 169 (For SDE 2)
515. Subex Interview Experience
516. Practo Placement Experience
517. Visa Interview Experience | Set 3 (On-Campus)
518. Microsoft IDC Interview Experience| Set 44
519. Oracle Interview | Set 11 (For Server Technology)
520. Amazon Interview Experience | Set 170
521. Komli Media Interview Experience
522. Amazon Interview Experience | Set 171
523. BrowserStack Interview Experience | Set 5 (Fresher)
524. Microsoft Interview Experience | Set 45
525. Intuit Interview Experience | Set 6
526. Written Test Of "National Instruments"
527. Magic Bricks Interview Experience
528. Intuit Interview Experience | Set 7 (For 3.5 Years Experienced)
529. Adobe Interview Experience for MTS-1 (1.5 Years Experience)
530. Rockstand.in interview experience
531. MAQ Software Interview Experience | Set 6 (On-Campus)
532. SAP Labs Interview Experience | Set 3 (Campus-Pool)
533. Housing.com Interview Experience | Set 3 (On-Campus)
534. Snapdeal Interview Experience | Set 4 (On Campus)
535. Monotype Solutions Interview Experience
536. Snapdeal Interview Experience | Set 5 (On Campus)
537. Snapdeal Interview Experience | Set 6 (On Campus)
538. Snapdeal Interview Experience | Set 7 (On Campus)
539. Cadence Interview Experience | Set 2
540. Persistent Systems interview experience (on campus)
541. Goldman Sachs Interview Experience | Set 7
542. Works Applications Co., Ltd. Japan Interview | Set 2
543. Belzabar Software Interview Experience | Set 4
544. Microsoft Interview Experience | Set 46 (Onsite)
545. Amazon Interview Experience | Set 173 (On-Campus)
546. Amazon Interview Experience | Set 174 (For SDE)
547. OLA Cabs Interview Experience (Bangalore)
548. Flipkart Interview Experience | Set 17 (For SDE II)
549. Microsoft IDC interview Experience | Set 47 (For 1.7 Years Experienced)
550. Flipkart Interview Experience | Set 18 (For SDE I)
551. OLA Cabs Interview Experience | Set 2 (For Android - 1.5 Years)
552. Snapdeal Interview Experience | Set 8 (On Campus)
553. Snapdeal Interview Experience | Set 9 (On Campus)
554. Snapdeal Interview Experience | Set 10 (On Campus)
555. Snapdeal Interview Experience | Set 11 (On Campus)
556. Myntra Interview Experience | Set 3 (On-Campus)
557. Microsoft interview Experience | Set 48 (For 1.5 Years Experienced)
558. Flipkart Interview Experience | Set 19 (For SDET)
559. Visa Interview Experience | Set 4 (On-Campus)
560. Amazon Interview Experience | Set 175 (For SDE)
561. BrowserStack Interview Experience | Set 6 (On-Campus)
562. AXIO-NET Recruitment Process Experience
563. Visa Interview Experience | Set 5
564. Hike Interview Experience | Set 6
565. Amazon Interview Experience | Set 176 (For SDE 1)
566. Symantec Interview | Set 2
567. Computer Sciences Corporation (CSC) Interview Experience (On-Campus)
568. Nagarro Interview Experience | Set 5 (Pool Campus Drive)
569. Cisco Interview Experience | Set 9 (For Experienced)
570. National Instruments Interview Experience | Set 2
571. Juniper Networks Interview Experience
572. Vizury Interactive Solutions Interview Experience
573. Amazon Interview Experience | Set 177 (First Round in Pool Campus)
574. Interview Experience at Compro Technologies, Delhi
575. LinkedIn Interview Experience | Set 5 (On campus)
576. CouponDunia Interview Experience
577. Birst India Interview Experience
578. Microsoft interview Experience | Set 49 (For Internship)
579. SAP Labs Interview Experience | Set 4 (Off-Campus)
580. Amazon Interview Experience | Set 178 (For SDE-1)
581. Fiberlink (maas360) Interview | Set 2 (Written Test Question)
582. VMWare Interview Experience | Set 2 (On-Campus)
583. Practo Interview Experience | Set 2 (Off-Campus)
584. Microsoft interview Experience | Set 50
585. CouponDunia Interview Experience | Set 2 (Fresher)
586. Amazon Interview Experience | Set 179 (For SDE-1)
587. SAP Labs Interview Experience | Set 5 (Experienced)
588. Amazon Interview Experience | Set 180 (Telephonic Interview )
589. CouponDunia Interview Experience | Set 3 (For Android Developer)
590. Amazon Interview Experience | Set 181 (For SDE 1)
591. Commonfloor Placement Questions 2014
592. Flipkart Interview Experience | Set 20 (For SDE-II)
593. Myntra Interview Experience | Set 4 (For Senior Software Engineer )
594. Microsoft Interview Experience | Set 51 (For SDE Intern)
595. Practo Interview Experience | Set 3 (Off-Campus)
596. Pubmatic Interview Experience
597. Amazon Interview Experience | Set 182 (For SDET 1)
598. MakeMyTrip Interview Experience | Set 5 (Online Coding)
599. Myntra Interview Experience | Set 5
600. Snapdeal Interview Experience | Set 12 (For Senior Software Developer)
601. Accolite Interview Experience | Set 3 (On-Campus)
602. Amazon Interview Experience | Set 183 (SDE - New Grad Position)
603. Lenskart Interview Experience for Application Developer
604. SAP Labs Interview Experience | Set 6 (Experienced)
605. SAP Labs Interview Experience | Set 7
606. D E Shaw Interview | Set 8 (Telephonic Round Questions)
607. Amazon Interview Experience | Set 184 (Off Campus for SDE1)
608. Amazon Interview Experience | Set 185 (For SDE1)
609. One97 Interview Experience | Set 3 (Backend/Node js Developer)
610. CouponDunia Interview Experience | Set 4 (Off-Campus for Internship)
611. Amazon Interview Experience | Set 186 (For SDE1)
612. Nirvana Financial Solutions Interview Experience | Set 1 (Off campus for Internship)
613. Interview experience at Ignite World (Formerly Bharti Softbank Portal)
614. CouponDunia Interview Experience | Set 5 (For full time Software Engineer)
615. Flipkart Interview Experience | Set 21
616. SAP Labs Interview Questions | Set 8 (Bangalore)
617. Flipkart Interview Experience | Set 22 (For SDE 2)
618. Amazon Interview Experience | Set 187 (For SDE1)
619. Akosha Interview Experience
620. Flipkart Interview Experience | Set 23
621. Kritikal Solutions Interview Experience
622. 24*7 Innovation Labs Interview Experience
623. BankBazaar Interview Experience | Set 2
624. Inmobi Interview Experience | Set 3
625. Taxi4Sure Interview Experience
626. ScaleGrid Interview Experience
627. OLA Cabs Interview Experience | Set 3
628. MetLife Interview Questions
629. VMWare Interview Experience | Set 3
630. Interview Experience with Yatra(Hyderabad) | Set 3 (For Senior Software Engineer)
631. Question in Amazon Interview
632. Top 25 Interview Questions
633. Palantir Technologies Interview | Set 1
634. Bloomberg Interview | Set 1 (Phone Interview)
635. Bloomberg Interview | Set 2 (Video Conference)
636. Google Interview Question for Java Position
637. BankBazaar Interview Experience | Set 3
638. Flipkart Interview Experience | Set 24
639. Snapdeal Interview Experience | Set 13 (On-Campus for SDET)
640. Amazon Interview Experience | Set 188 (For SDE1)
641. Flipkart Interview Experience | Set 25
642. Synopsys Interview Experience | Set 3 (For R&D Engineer)
643. 10 Most asked Questions from Java Programmers
644. OLA Cabs Interview Experience | Set 4 (For SDE 2)
645. Quikr Interview Experience | Set 2 (For SDET)
646. Flipkart Interview Experience | Set 26
647. Microsoft Interview Experience | Set 52 (Fresher)
648. Flipkart Interview Experience | Set 27 (For SDE)
649. Hike Interview Experience | Set 7 (For Automation Testing/Manual Testing)
650. Snapdeal Interview Experience | Set 14 (On-Campus for Software Engineer 1)
651. Interview experience at "Infinera Bangalore India"
652. Visa Interview Experience | Set 7
653. Carwale Interview Experience (Off-Campus for SDE 1)
654. Flipkart Interview Experience | Set 28 (For SDE2)
655. Amazon Interview Experience | Set 189 (For SDE-1)
656. Paytm Interview Experience | Set 4 (Walk-in Drive)
657. Amazon Interview Experience | Set 190 (Delhi Drive)
658. Snapdeal Interview Experience | Set 14 (For Software Engineer)
659. Prop Tiger Interview Experience | Set 2 (For Software Engineer)
660. Delhivery Interview Experience
661. Travel Triangle Interview Experience
662. Synopsys Interview Experience | Set 4 (For R&D Engineer I)
663. MAQ Software Interview Experience | Set 7
664. Microsoft Interview Experience | Set 53
665. Amazon Interview Experience | 191
666. Microsoft Interview Experience | Set 54 (For SDE)
667. Microsoft Interview Experience | Set 55 (For Software Engineer 2)
668. Flipkart Interview Experience | Set 29
669. NI Coding test
670. InfoEdge Interview Experience | Set 2 (For PHP-MySQL Developer Profile)
671. Zoomcar Interview Experience
672. D E Shaw Interview Experience | Set 9
673. Codenation Interview Experience
674. OLA Cabs Interview Experience | Set 5 (For SDE ||)
675. Amazon Interview Experience | 192
676. Microsoft Interview Experience | Set 56 (For SDE 2)
677. SAP Labs Interview Questions | Set 9 (Fresher)
678. Flipkart Interview Experience | Set 30(For SDE 2)
679. D E Shaw Interview Experience | Set 10 (Off-Campus)
680. Goibibo Interview Experience
681. OLA Interview Experience | Set 6 (For SDE-1)
682. Amazon Interview Experience | 193 (For SDE-1)
683. Fiberlink (maas360) Interview | Set 3
684. Yatra.com Interview Experience | Set 4
685. Microsoft Interview Experience | Set 57 (For SDE)
686. D E Shaw Interview Experience | Set 11 (On-Campus)
687. eBay Interview Experience
688. MAQ Software Interview Experience | Set 8 (Off Campus for Software Engineer-1)
689. Yatra.com Interview Experience | Set 5 (For Software Developer 1)
690. Tejus Network Interview Experience
691. Zopper.com Interview Experience
692. Interview Experience with Spire Technologies
693. Amazon Interview Experience | 194 (For Software Support Engineer)
694. Morgan Stanley Interview | Set 13 (On-Campus)
695. FreeCharge Interview Experience for Senior Software Engineer
696. [24]7 Innovation Labs Interview Experience | Set 2
697. Flipkart Interview Experience | Set 31 (For Fresher)
698. Zoho Interview | Set 5 (On-Campus Drive)
699. Flipkart Interview Experience | Set 32 (For SDE-1)
700. D E Shaw Interview Experience | Set 12 (On-Campus)
701. Walmart Labs Interview Experience | Set 2 (On-Campus)
702. Intuit Interview Experience | Set 8 (On-Campus for Internship)
703. Amazon Interview Experience | 195 (On-Campus For SDE-1)
704. Amazon Interview Experience | 196 (On-Campus)
705. Myntra Interview Experience | Set 6 (On-Campus For Software Engineer)
706. Amazon Interview Experience | 197 (On-Campus for Internship)
707. Amazon Interview Experience | 198 (For SDE1)
708. Xome interview experience for software developer
709. Microsoft Interview Experience | Set 58 (For Software Engineer)
710. Oracle Interview | Set 12 (On Campus for Application Dev Profile)
711. Microsoft Interview Experience | Set 59 (On-Campus)
712. Amazon Interview Experience | Set 198 (On-Campus for Internship)
713. Amazon Interview Experience | Set 199 (On-Campus for Internship)
714. Adobe Interview Experience | Set 21 for Software Engineer (Fresher)
715. Epic Systems Interview Experience - Off Campus
716. D E Shaw Interview Experience | Set 13 (On-Campus)
717. Amazon Interview Experience | Set 200
718. Amazon Interview Experience | Set 201 (On-Campus for SDE-1)
719. D E Shaw Interview Experience | Set 14 (On-Campus)
720. Goldman Sachs Interview Experience | Set 8 (On-Campus)
721. Amazon Interview Experience | Set 202
722. Microsoft Interview Experience | Set 60 (On-Campus for Internship)
723. Flipkart Interview Experience | Set 33 (For SDE-1)
724. MAQ Software Interview Experience | Set 9 (On-Campus for SE-1)
725. Amazon Interview Experience | Set 203 (On-Campus for SDE-1)
726. Amazon Interview Experience | Set 204 (On-Campus for Internship)
727. Amazon Interview Experience | Set 205 (On-Campus for Internship)
728. Amazon Interview Experience | Set 206 (On-Campus for SDE-1)
729. Microsoft Interview Experience | Set 61 (On-Campus for IDC)
730. Amazon Interview Experience | Set 207 (On-Campus for Internship)
731. Amazon Interview Experience | Set 208 (On-Campus for Internship)
732. Microsoft Interview Experience | Set 62 (On-Campus for IDC)
733. Amazon Interview Experience | Set 209 (On-Campus)
734. Amazon Interview Experience | Set 210 (On-Campus)
735. Microsoft Interview Experience | Set 63 (For Internship)
736. Adobe Interview Experience | Set 22 (On-Campus)
737. Amazon Interview Experience | Set 211 (On-Campus for Internship)
738. Flipkart Interview Experience | Set 34 (On-Campus for SDE-1)
739. Oracle Interview Experience | Set 13 (On-Campus)
740. Kronos Incorporated Interview | Set 1 (On-Campus)
741. Oracle Interview Experience | Set 14 (On-Campus for Server Tech)
742. Amazon Interview Experience | Set 212 (On-Campus)
743. Microsoft Interview Experience | Set 64 (For SDE-2)
744. Dell Interview Experience | Set 2 (On-Campus for Dell International R&D)
745. EXL Analytics Interview Experience | Set 1 (On-Campus)
746. Amazon Interview Experience | Set 213 (Off-Campus for SDE1)
747. Amazon Interview Experience | 214 (On-Campus)
748. Accolite Interview Experience | Set 4 (On-Campus)
749. Amazon Interview Experience | 215 (On-Campus for Internship)
750. Flipkart Interview Experience| Set 35 (On-Campus for SDE 1)
751. Interview Experience with Swiggy
752. Dell Interview Experience | Set 3 (On-Campus for Dell International R&D)
753. Drishti-Soft Solutions Interview | Set 2 (On-Campus Written)
754. Adobe Interview Experience | Set 23 (1 Year Experienced)
755. Codenation Interview Experience | Set 2 (On-Campus for Internship)
756. Drishti-Soft Solutions Interview | Set 3 (On-Campus)
757. Adobe Interview Experience | Set 24 (On-Campus for MTS)
758. Microsoft Interview Experience | Set 65 (On-Campus for Internship IT and IDC)
759. Flipkart Interview Experience| Set 36 (On-Campus for SDE 1)
760. Endurance International Group Interview Experience (on-campus)
761. Accolite Interview Experience | Set 5 (On-Campus)
762. Goldman Sachs Interview Experience | Set 9 (On-Campus for Internship)
763. Amazon Interview Experience | 216 (On-Campus for Internship)
764. Adobe Interview Experience | Set 25 (On-Campus for MTS-1)
765. Amazon Interview Experience | 217 (On-Campus)
766. Walmart Labs Interview Experience | Set 3 (On-Campus)
767. Adobe Interview Experience | Set 26 (On-Campus for MTS-1)
768. Amazon Interview Experience | 218 (On-Campus)
769. Interview Experience with Alcatel Lucent (Bangalore) for Software Engineer
770. ChargeBee Interview Experience (On-Campus)
771. Microsoft IDC Interview Experience | Set 66 (On-Campus for Internship)
772. CommVault Systems Placement Experience
773. Paypal Interview Experience | Set 1 (On-Campus)
774. Rockwell Collins Campus Interview Experience
775. Drishti-Soft Solutions Interview | Set 4 (On-Campus)
776. Drishti-Soft Solutions Interview | Set 5 (On-Campus)
777. Amazon Interview Experience | 219 (On-Campus)
778. Drishti-Soft Solutions Interview | Set 6 (On-Campus)
779. Amazon Interview Experience | 220 (On-Campus)
780. Oracle Interview Experience | Set 15 (On-Campus)
781. Amazon Interview Experience | Set 221
782. Zoho Interview | Set 6 (On-Campus Drive)
783. Amazon Interview Experience | Set 222
784. Morgan Stanley Interview | Set 16 (On-Campus)
785. Fiberlink (maas360) Interview Experience | Set 4 (Off-Campus)
786. Goldman Sachs Interview Experience | Set 10 (On-Campus)
787. Amazon Interview Experience | Set 223 (On-Campus)
788. Goldman Sachs Interview Experience | Set 11 (On-Campus for Strats Division)
789. Morgan Stanley Interview | Set 17 (On-Campus)
790. D E Shaw Interview Experience | Set 15 (On-Campus)
791. Zoho Interview | Set 7 (On-Campus Drive)
792. Microsoft IDC Interview Experience | Set 67 (On-Campus for Internship)
793. Bharti SoftBank (HIKe) | Set 7(For SDE)
794. UHG(United Health Group) Interview Experience | Set 2 (On-Campus)
795. Amazon Interview Experience | Set 224
796. MakeMyTrip Interview Experience | Set 6 (Online Coding)
797. OLA Interview Experience | Set 7 (For SDE-1)
798. Grofers Interview Experience For SDE
799. Goldman Sachs Interview Experience | Set 12 (On-Campus)
800. Interview with WOW Labz for MEAN Stack Developer
801. EXl Analytics Interview Experience | Set 2 (On-Campus)
802. Goldman Sachs Interview Experience | Set 13 (On-Campus for Internship)
803. Paypal Interview Experience | Set 2 (On-Campus for Full Time)
804. PayPal interview experience | Set 3 (On-Campus for Internship)
805. National Instruments Interview Experience | Set 3 (On-Campus)
806. Amazon Interview Experience |Set 225 (For 1 Year Experienced)
807. VMware Interview Experience | Set3 (On-Campus for Full Time and Internship Offers)
808. Accolite Interview Experience | Set 6 (On-Campus)
809. MakeMyTrip Interview Experience | Set 7 (On-Campus)
810. Adobe Interview Experience | Set 27 (On-Campus for Internship)
811. Grofers Interview Experience | Set 2 (On-Campus)
812. Barracuda Networks Interview Experience
813. HP R&D Interview Experience (On-Campus, full time)
814. Intuit Interview | Set 8 (On-Campus)
815. Sigmoid On-Campus Hiring
816. Factset Interview Experience (On-Campus)
817. IBM -ISDL Interview Experience
818. OATS Systems Interview Experience | Set 1 (On-Campus)
819. MakeMyTrip Interview Experience | Set 8 (On-Campus)
820. Factset Interview Experience |Set2 (On-Campus)
821. Visa Interview Experience |Set 8 (On-Campus)
822. Amazon Interview Experience |Set 226 (On-Campus for SDE-1)
823. Flipkart Interview Experience| Set 37 (On-Campus for SDE 1)
824. Amazon Interview Experience | Set 227 (On-Campus for Internship and Full-Time)
825. Microsoft IDC Interview Experience | Set 68 (For SDE)
826. Walmart labs interview | Set 4 (For Senior Software Engineer)
827. Mahindra Comviva Interview Experience | Set 1 (On-Campus)
828. Salesforce Interview Experience | Set 1 (For SDE-1)
829. MakeMyTrip Interview Experience | Set 9 (Off-Campus for Sr. Android developer))
830. Intuit Interview | Set 9 (On-Campus)
831. Amazon Interview Experience | Set 228 (On-Campus for Internship)
832. Amazon Interview Experience | Set 229 (On-Campus for SDE)
833. TinyOwl Technologies Interview Experience | Set 1 (On-Campus)
834. Bidgely Interview experience | Set 1 (On-Campus for Internship)
835. Yatra.com Interview Experience | Set 6
836. Quikr Interview Experience | Set 3
837. Aspiring Minds Interview Experience | Set 1 (On Campus)
838. SAP Labs Interview Experience | Set 10 (For Developer Specialist, 4-6 yrs)
839. Goldman Sachs Interview Experience| Set 14 (1+ Years Experienced)
840. enStage Bangalore Interview Experience for Software Engineer position
841. Verifone Interview Experience |Set 1 (For Software engineer)
842. Goldman Sachs Interview Experience | Set 15 (On-Campus for Internship)
843. Walmart Labs Interview Experience | Set 5 (On-Campus)
844. Informatica Interview Experience | Set 2 (On-Campus)
845. Moonfrog Labs Interview Experience
846. Directi Programming Questions
847. Infosys Interview Experience Set (0n-Campus for Specialist Programmer)
848. HP R&D Interview Experience | Set 2 (On-Campus)
849. Factset Interview Experience | Set 3 (On-Campus)
850. Oracle Interview Experience | Set 16 (On-Campus for GBU Developer Profile)
851. Calsoft Interview Experience | Set 1 (On-Campus)
852. Oracle Interview Experience | Set 17 (On-Campus)
853. Numerify Interview Experience | Set 1 (On-Campus)
854. Amazon Interview Experience | Set 230 (On-Campus For SDE)
855. Salesfoce Interview Experience |Set 2 (On-Campus For SDE )
856. Walmart Labs Interview Experience | Set 6 (On-Campus)
857. Infinera Interview Experience |Set 2 (For Layer 3 Routing/Singnaling Developer)
858. Thoughtworks Interview Experience | Set 1 (On-Campus)
859. Visa Interview Experience |Set 9 (On-Campus)
860. Accolite Interview Experience | Set 7 (On-Campus)
861. Intuit Interview Experience | Set 10 (On-Campus For Internship + FTE For Devops)
862. Adobe Interview Experience | Set 28 (For MTS-2)
863. Adobe Interview Experience | Set 29 ( Off-Campus)
864. SAP Labs Interview Experience | Set 11
865. Microsoft IDC Interview Experience | Set 69 (For SDE)
866. Accolite Interview Experience | Set 8
867. Microsoft Interview Experience | Set 70 (On-Campus for IDC and IT)
868. Teradata Interview Experience | Set 1 (On-Campus for Developer Profile)
869. Swiggy Interview Experience | Set 2 (On-Campus)
870. Adobe Interview Experience | Set 30 (Off-Campus For Member Technical Staff)
871. Oracle Interview Experience | Set 18 (On-Campus for GBU App Development)
872. Oracle Interview Experience | Set 19 (On-Campus for App Development)
873. Interview Experience Opera Solutions, Noida
874. Walmart Lab Interview Experience | Set 7 (Off-Campus 3 Years Experience)
875. Opera Interview Experience | Set 2 (On-Campus For Software Engineer)
876. Moonfrog Labs Interview Questions
877. Amazon Interview Experience | Set 231 (On-Campus)
878. Factset Interview Experience | Set 4 (On-Campus)
879. Oxigen Wallet On-Campus placement
880. MakeMyTrip Interview Experience | Set 10 (On-Campus)
881. Microsoft Interview Experience | Set 71 (Off-Campus)
882. Drishti-Soft Solutions Interview | Set 7 (Off-Campus)
883. Factset Interview Experience | Set 5 (On-Campus)
Copyright
The content of this book comes from geeksforgeeks.org and it's licensed under Creative Commons
Attribution-NonCommercial-NoDerivs 2.5 India
No of Rounds: 1 Written + 4 PI
2 Subjective Questions:
I. To find if there is any root to leaf path with specified sum in a binary tree.
Technical Interview
Question 2: A sorted array has been rotated r times to the left. Find r in least possible time.
Question 3: Clone a singly link list whose nodes contain, apart from next pointers, an extra pointer to
any random node. The random pointer of a node N could be after N, before N or the node N itself.
Technical Interview
Question 1: There is a big file of words which is dynamically changing. We are continuously adding
some words into it. How would you keep track of top 10 trending words at each moment?
I. Enqueue
II. Dequeue
IV. isNumberPresent
Question 4: Write a function that returns the length of the longest leaf-to-leaf path in a binary tree.
Technical Interview
Question 1: There is a binary tree of size N. All nodes are numbered between 1-N(inclusive). There
is a N*N integer matrix Arr[N][N], all elements are initialized to zero. So for all the nodes A and B,
put Arr[A][B] = 1 if A is an ancestor of B (NOT just the immediate ancestor).
Question 3: There is a N*N integer matrix Arr[N][N]. From the row r and column c, we can go to
any of the following three indices:
So if we start at any column index on row 0, what is the largest sum of any of the paths till row N-1.
Two robots land with their parachutes on an infinite one-dimensional number line. They both release
their parachutes as soon as they land and start moving. They are allowed only to make use of the
following functions.
I. moveLeft() // robot moves to left by 1 unit in 1 unit time
III. noOperation() // robot does not move and takes 1 unit time
IV. onTopOfParachute() // returns true if the robot is standing on top of either of the parachute,
else false
V. didWeMeet() // returns true if the robot meets to the other robot, else false
Write a function in order to make the robots meet each other. Robots will be executing the same copy
of this function.
HIRED!!
Tips / Advice:
I. Each time you write a code, check for the edge cases.
II. Do not assume anything. Keep asking questions if there are any doubts.
This article is compiled by Akash Nawani. Many Many congratulations to Akash for his selection in
Amazaon. If you like GeeksforGeeks and would like to contribute, you can also write an article and
mail your article to [email protected]. See your article appearing on the GeeksforGeeks
main page and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview/
Amazon Interview | Set 2
Please find the details of my amazon interviews below.
2 Subjective Questions:
I. Given a linked list containing character in each node, segregate its nodes in such a way that
all nodes containing a vowel are moved to the end of the linked list. We will have to maintain the
order.
Technical Interview
Question 1: You are given a linked list and a parameter k. You will have to swap values in a certain
fashion, swap value of node 1 with node k, then node (k+1) with node 2k and go on doing this in the
similar fashion
Question 2: For the above question, do it without swapping the values. If you want a swap to occur
between two nodes, then you will have to move the nodes itself.
Technical Interview
Question 1: You are given many slabs each with a length and a breadth. A slab i can be put on slab j
if both dimensions of i are less than that of j. In this similar manner, you can keep on putting slabs on
each other. Find the maximum stack possible which you can create out of the given slabs.
Question 2: The above question was raised to 3 dimensions.
Questions : Then there were many questions asked on compilers and dynamic memory allocation.
Technical Interview
Question 1: You are given pairs of numbers. In a pair the first number is smaller with respect to the
second number. Suppose you have two sets (a, b) and (c, d), the second set can follow the first set if
b<c.So you can form a long chain in the similar fashion. Find the longest chain which can be formed.
Question 2: Find the longest increasing subsequence in O(nlogn). Proof and full code was required.
Question 3: You are given a linked list and an integer k. Reverse every consecutive k nodes of the
given linked list.
Question 4: You are given an array. For every element you have to replace it with the closest number
on the right side which is greater than the element itself.
Interview Round 4:
The team was highly impressed so they cancelled my 4th round for others who appeared for the 4th
round, it was atleast an hour long.
HIRED!!
This article is compiled by Jinendra Baid. Many Many congratulations to Jinendra for his selection
in Amazaon. If you like GeeksforGeeks and would like to contribute, you can also write an article and
mail your article to [email protected]. See your article appearing on the GeeksforGeeks
main page and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-2/
Amazon Interview | Set 3
Please find the details of my Amazon interviews below.
2 Subjective Questions:
I. Given a linked list containing character in each node, segregate its nodes in such a way that all
nodes containing a vowel are moved to the end of the linked list. We will have to maintain the order.
II. Parenthesis checker.
Question 1: You are given two linked lists whose nodes contain a digit as data member. Both lists
represent a number. You have to add them and return the resultant list.
Input: 9->9->3->4->5 and 8->9->1 (represent 99345 and 891)
Output: 1->0->0->2->3->6
My Solution: Reverse the linked lists. Create the new sum list which is reversed. Finally reverse the
resultant list.
Question 2: Interviewer asked to solve the above question without changing the original lists.
My Solution: Count number of nodes in both lists. If equal then simply add two lists recursively. If
not then advance a temp ptr which is a pointer to head of larger list by diff of nodes and then add the
list pointed by temp and list 2. Make sure to keep track of carry. Add recursively. Propagate the carry
in remaining elements of larger list. Was asked to code. Coded it.
Question 1: Delete nth node from end of a linked list in a single scan.
Question 2: In a linked list, in addition to the next ptr, a random ptr is also present. Clone the linked
list.
Did it in O(n) but by modifying the linked list and then restoring it. Was asked to do it without making
any modifications in the original list. Did that in O(n^2)
Question 3: Two nodes of a BST are given. Print the path from 1st node to the 2nd node. You are
also provided the parent pointers in addition to normal left and right pointers.
Question 1: An array of n integers is there in which the range of elements is n, i.e., the difference
between maximum and minimum number is n. Find the repeating numbers.
Question 2: An extension of Question 1. Was asked to find number of times each number is repeated.
Question 3: There are n frames of m data element each. The data element in each frame is arranged
in increasing order. You are provided m*n space in which you have to arrange all data in increasing
order.
My 1st solution was to use merge sort. He modified the question as only O(n) space is there and you
need to send data in increasing order as fast as you can.
My 2nd solution was to use min heap and construct it with the 1st element of all n frames. Min heap
also contains extra field which signifies the frame number of data elements. This data structure can do
the needful.
Question 1: Replace each element of an array with its greatest next integer in O(n).
I couldn’t do it. I tried but it didn’t click. Not expected when you are in your last round.
This article is compiled by Vinay Khetan. We will be soon publishing Vinay’s Yahoo and Microsoft
interviews as separate posts. Vinay was selected in Microsoft. Many Many congratulations to Vinay
for his selection.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-3/
Yahoo Interview | Set 1
Following are the details of my Yahoo interviews.
Section – 1
Question 1: It was based on file and directory structure. Cannot recall what was the exact question.
Question 2: 9 mobiles are given whose name, cost and 3 other features were provided on scale of 9.
You have to treat cost as 1 dimension and three other features as another dimension(their respective
weightage was given). When the user enters a name of mobile, the name of another 3 mobiles should
be displayed based on how similar they are to given mobile on the basis of dimension 1 and
dimension 2 of the mobile.
Section – 2
Question 1: Given a circular linked list, you have to split the linked list into two another circular
linked list. If it contains 2n+1 nodes, then first list should contain n+1 nodes and second list should
contain n nodes.
Question 2: You have to count the number of first contiguous 0s of an array. The size of array is not
given.
After the completion of given time, they asked us to explain our code. They were looking for clarity
of code, whether it was giving right output and they checked for corner cases also.
Technical Round- I
The interviewer asked me to solve a few questions from the set of 25 questions that were there in the
aptitude test.
He further asked my favourite subject and began to ask questions from there. He then asked questions
from OS, DBMS and networking.
Technical Round- II
Here also 2-3 questions of the aptitude test were asked. He asked which subjects I like. I mentioned
data structure, networking and DBMS.
To my surprise, he started asking me questions from OS. The questions were not quite hard. They
were based on semaphores, synchronization, virtual memory, paging, faulting, and deadlock. It was
just that I was not well prepared in OS. That round went pretty average and that was end of it.
The guys who qualified for the next 2 HR rounds were all hired. In the HR round, questions such as
personal strengths, weakness etc were asked. It was a bit casual.
This article is compiled by Vinay Khetan. We will be soon publishing Vinay’s Microsoft interviews
as a separate post. Vinay was selected in Microsoft. Many Many congratulations to Vinay for his
selection.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/yahoo-interview-set-1/
Microsoft Interview | Set 1
Following are the details of my Microsoft interviews.
Date of Interviews: 30th July, 31st July and 3rd August, 2012
Personal Interview(3-8-12)
Question 2: Write a function which checks whether the tree is height balanced or not. Give test cases
also.
Source
http://www.geeksforgeeks.org/microsoft-interview-set-1/
Yahoo Interview | Set 2
First of all a big thanks to the geeksforgeeks team. It has been the biggest help in my preparation. Till
5th july i could not write a simple program of tree traversal. But just the arrays, linked list, tree,
string, DP and backtracking tabs of g4g helped me reach the interview rounds of Amazon (i was
eliminated though) and getting placed at Yahoo.
Following is the list of my interview questions.
The lab test had two sections each comprising of 2 questions. Attempting one from both sections was
must to qualify but there was no restriction on attempting more. Section 2 was very easy.
Section 1:
Question 1- Given a file system tree like the one given below, write a program to: a) represent it in
memory, and b) find the size of all files in any given path. For example:
Input: /etc/vpnc
Output: 114
Input: /etc
Output: 188
Root->/etc->/etc/sysconf->networks 23 bytes
eth0 32 bytes
eth1 19bytes
/etc/vpnc->
Prf1 12bytes
Prf2 102 bytes
/home->/home/user1->
F1 99bytes
F2 33bytes
/home/user2->
F4 332
/home->
F4 211
Question 2: Given below is a list of smart phones with price and a set of features (app,style,speed)
rated in a scale of 0 to 9. You might want to normalize the price on a scale 0-9 where 9 is the
maximum price of all phones in the list. Write a program that will take a phone as input and output the
three most similar phones. For comparing phones use price and a weighted score of all features as
distinct dimensions.
App-0.3
Style-0.3
Speed-0.4
My solution:- I calculated the weighted average of the 3 features and assumed them to be a point on x-
axis. Scaled down the prices by a factor of 1000 and assumed it to be y-axis. Now whenever an input
was given I simply found out the 3 closest points from the given phone’s co-cordinates.
Section 2:
Q3. Split a perfect circular linked list (where the last node’s next pointer points the first node) in two
equal parts (if the total no. of nodes is odd, say 2m+1, then the first half should contain m+1 nodes).
Q4.suppose we have an array whose length is not known. The content of the array is such that the first
of the entries are 0s and the rest are all 1s. Write a function which will take this array as a parameter
and return the number of 0s.
When the coding was over, they came over and checked the codes, output and were marking on code
clarity, coding style and output.
Initially I was asked 2/3 questions from the aptitude test we appeared in the morning and had to
explain how I reached that particular answer.
He took an intro then enquired about favorite subjects and almost the entire interview was based on
OS (memory management, scheduling everything was asked).
One good question was implementing a LRU cache. I was not supposed to code it but had to give
the entire idea.
Then he asked a question on networking and I clearly answered I don’t know anything other than the
name of layers. So he asked me to speak a line about all of them.
In this round too the interviewer started with a question on networking and once again I told him the
same answer. Then he asked me questions from data structure. One of them was difference between
merge sort and quick sort. Which one would you prefer and why? Do you really need the auxiliary
space in merge sort?
This interview was quite casual. Questions like which yahoo product do you use? What are its
shortcomings? (Well I just gave him a whole list of flaws of yahoo messenger :P)
The next question was to give an idea of a product I would like to make.
This was an HR round. Basically personal questions were asked. One question that was disturbing
was what would be that 1 company given an option you would flunk yahoo. Initially I was bit
diplomatic and anwered “ I always wanted to get in any one of amazon, Microsoft, adobe or yahoo
(the big 4 who come to my college). And I have been eliminated from amazon 2 days ago”. Then
honestly answered him but if I really have an option I will choose MS.
This article is compiled by Saket Saurav Pathak. Many Many congratulations to Saket for his
selection. If you like GeeksforGeeks and would like to contribute, you can also write an article and
mail your article to [email protected]. See your article appearing on the GeeksforGeeks
main page and help other Geeks.
Source
http://www.geeksforgeeks.org/yahoo-interview-set-2/
Yahoo Interview | Set 3
Hi, I am Saurav Biswas, from IIT Kharagpur, currently doing my PhD in Machine Learning in
Germany. I got hired at Yahoo SDC, India, in December (3rd to be precise) last year, through campus
interviews. I was offered a position for Senior Software Engineer.
Interview consisted of a written test comprising of 25 objective questions, a coding round and then
three technical and an HR round.
Round 2 : Coding
We were given an hour, and the problem was something like given a set of 2 dimensional pairs of
points (floats/doubles) find out the two nearest points, for each point. I used recursive divide and
conquer approach to solve it in O(nlgn) time. Later I was told to generalize the code for n points
(pseudo code ) after my algo passed the test cases successfully .
From the coding round around 10 people were selected for the PI round of technical interviews .
Technical Interviews :
Round 1 :
I was posed a few questions on linked lists which I easily answered . The last question was that
suppose you have implemented a search engine , you want to find if a URL typed by you is present in
the cache of URLs that you have , more or less you have to give an optimized algo for it . I had read
about suffix trees , the night before ( my good luck ) and I managed to code the problem with relative
ease . The interviewer was satisfied and I qualified for the second Technical Interview .
Round 2 :
This time , the interviewer posed a math puzzle . I don’t remember it exactly , but it was something
that the problem when framed mathematically would yield you an inequality in two variables , and
you had to solve for the two unknowns . Initially I was in a fix , but the interviewer was kind enough
to suggest me that i solve it heuristically . I started with base cases and proceeded up and finally the
solution converged after a few iterations . The interviewer was satisfied . He then talked about what I
would like to work on if I got an offer from Yahoo . Coming from a machine learning background , I
was interested in working on the Yahoo Search Engine and he said he would definitely look into it . I
was through that round .
Round 3 :
This time , the interviewer focused on Networking , OS and OOP concepts . I was asked to code the
multiple Producer / Consumer problem , which I did . Then he asked a few questions on OOP , like
difference between overloading and Overriding , virtual and friend functions and so forth . There was
also a question on Iterators in JAVA . I had a strong grasp on OOP so I answered them . Finally he
said he would like to ask me a question from Networking . He told me to explain the Leaky Bucket
Algorithm . I didn’t know about it , so I said maybe he could ask me something else . So he asked me
about TCP Three Way handshake . I did so more or less well .
Final Round : HR
The HR Interview was casual , asking me about personal interests , hobbies ( I told I played the guitar
) and what I would bring to if offered a job in Yahoo . She also asked me if I had any other companies
in hand . I had none so I said I would like to go with the offer if I got it .
So finally I was hired in the position of a Senior Software Engineer . But I got a PhD offer from
Germany in Machine Learning , so I declined the offer later in June .
As a note of advise to fellow aspirants , I would say that please read up Cormen and Tenenbaum for
Algo / DS . I personally would like to thank g4g for their wonderful collection which is also a must .
It helped me a lot too . Also people tend to screw up questions from OS/ Networking so keep basics
like Synchronization, Process handling , Deadlocks , Memory management , TCP/IP clear . Read
basic stuff for databases like primary keys , normalization and that should be it . Refer to xkcd for
standard math puzzles .
This article is compiled by Saurav Biswas. Many Many congratulations to Saurav for his selection. If
you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/yahoo-interview-set-3/
Microsoft Interview | Set 2
Please find the details of my Microsoft Interview below.
1. Given the head pointer of a linked list, each node having data value only 0/1/2, properly sort the
linked list and return the head pointer.
2. Given a picture with pixels arranged in an N*N matrix, right rotate the picture by 90 degree.
1. Given a Binary tree, where each node has also its parent pointer pointing to its parent, apart from
two usual child pointers. Write the function for inorder successor. Discuss all possible test cases for
this function and whether your function can handle all those test cases.
2. How can you check whether a binary tree is BST or not, in the most space optimised manner.
1. Given two sorted linked list, create a third list which contains only those elements of first list,
which are not common with second list. Do this with O(n) time. Discuss all possible test cases for
this function and whether your function can handle all those test cases.
1. If your friend writes a text editor software and gives it to you for testing, what are the tests you will
perform on the software to ensure it meets the basic requirements of a naive user?
2. Given two linked lists, how do you check whether the two lists intersect at some node with O(n)
time? Discuss all possible test cases for this function and whether your function can handle all those
test cases.
1. Given an array of unsorted integers, find all the pairs of numbers which sum to a given N. Discuss
all possible test cases for this function and whether your function can handle all those test cases.
2. Given three points a, b and c, write a function to find what type of triangle they construct or
whether a triangle can be made at all. Discuss all possible test cases for this function and whether
your function can handle all those test cases.
HIRED!!
Source
http://www.geeksforgeeks.org/microsoft-interview-set-2/
Microsoft Interview | Set 3
I would like to thank GEEKSFORGEEKS team that they made my confidence level high when it
comes to coding. I finished my interview today, hope this could be of help to others.
Date Of Interview: 25th Aug, 3rd Sept, and 4th Sept 2012
25-08-2012:
Online test conducted by some PARIKSHA LITE company (outsourced)
TEST 1: There were 15 questions to be done in 30 min. 6-7 of them were basic calculations and
program output easy ones.
TEST 2:
A) There were 3 questions to be coded for IDC test:
….1) Check whether a linked list is a palindrome or not
….2) Whether a given sting is a new arrangement of main string (eg COXX is XXOC but not XOC)
….3) Convert a given sorted dynamic linked list to balanced binary search tree.
B) There were 4 question in MSIT test:
….1) Write merging two arrays code or pseudo code.
….2) Reverse a string of characters.
….3) Print binary representation of a given number.
….4) Given a control tower for aeroplane how will you make sure it does not fail. (Basically
designing question )
03-09-2012:
Round1:
Q1) A thread waiting at while(1) and thread waiting at wait(wrt), what is the difference?
#include
#include
int main()
{
unsigned int a, b, c;
a = rand();
b = rand();
c = a + b;
if( c
Q3) Write code to find Nth node from the last of a linked lists, and write test
Round2:
Q1) Write code to implement a command called 'tail -5 filename' in unix file usi
Q2) Write pseudo code to implement LRU in real time OS.
Round3:
Q1) Write code to convert given number into words (eg 1234 as input should outpu
Q2) Write test cases for the same question mentioned above.
Round4:
Q1) Write anagrams code when you are given an isWord() function in the fastest p
04-09-2012
Round5:
Q1) Design a database schema for college elections and how will you make sure at
Q2) Write code to detect deadlocks and prevent deadlocks and implement as two se
Q3) Write Singleton pattern code and state places with usage of keyword static a
Q4) given two processes one that updates a database in 2 min and other in 5 min.
Q5) Write code to count number of nodes of a tree, find depth of a tree, find wi
Round6:
Q1) Design a class diagram for students registering for a sport and competition
Rest were sort of HR questions like why microsoft, your strengths etc but in the
This article is compiled by Ankush Choudhary. If you like GeeksforGeeks and woul
Source
http://www.geeksforgeeks.org/microsoft-interview-set-3/
Amazon Interview | Set 4
Please find the details of my Amazon interviews below.
No of Rounds: 4
Round 1:
Question 1:- Given a 2D array containing only 0/1’s and each row is in sorted order. Find the row
which contains maximum number of 1s.
I was asked to code. Algo which I told was I will search position of first 1 in 1st row using binary
search. And mark it. Now note that position check in 2nd row. If there is 1 for that position already
found in 1st row, then binary search from 0 to that position else move to row number 3. Similarly
continue further.
Round 2:-
Question 1:- Given a Binary tree and two nodes. Need to find the minimum ancestor, no parent nodes
given.
Each time when I told answer, they modified question little bit or removed some extra storage which I
was taking.
Question 2:- Given a Binary tree and two nodes. Need to find smallest path between them
Round 3:-
Question 1:- Given an array of infinite size containing 0/1 only and in sorted order, find position of
first one.
My answer: first check whether 1 is present at 100th position or not if there, do binary search
between 0 and 100 else check 1 is there at 200th position, and similarly continue further.
Question 2:- Given life time of different elephants find period when maximum number of elephants
lived. ex [5, 10], [6, 15], [2, 7] etc. year in which max no elephants exists.
Other questions were regarding Operating system like virtual memory etc.
Round 4:-
It was HR round. Questions related to project. Questions like why I should Hire you etc were asked.
This article is compiled by Naveen Kumar Singh. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-4-2/
Adobe Interview | Set 1
Following are the details of Adobe Interview.
Round 1
1. How will you implement a stack using a priority queue. Push and pop should be in O(1).
2. Three mislabeled jars problem.
Round 2
1. How does stack look in function calls? Given a recursive function call, how will the stack look
like?
2. When does stack (process stack) overflow? What are the remedies?
3. What are balanced BSTs. Then he randomly gave me various numbers and asked me to create a
BST. And to balance it.
4. Advantages of linked list over arrays. And arrays over linked list.
5. How are vectors implemented internally in the library. This question revolved around dynamic
implementation of arrays. Then discussed the amortized time of the operations using dynamic
implementation of arrays.
Round 3
1. There was a question in written round that there is a global static variable ‘lock’ initially set to 0
and there was a code segment given.
while(lock);
lock = 1;
//Critical section
lock = 0;
Does this solve critical section problem. I answered that it will solve in uni processor system but not
in multiprocessor system. Then he asked me to explain my answer. After a long discussion we came
to a conclusion that this wont even solve in uni processor system. Then he asked me the solution to
solve this. I did that using testandset instruction.
2. When a function is called in thread, what variables can be accessed from it. There was a long
discussion on this too. I went in the wrong direction but corrected myself later. Stack variables are
copied but heap variables are same.
Round 4
1. What data structures will you use to implement a text editor. Size of editor can be changed and you
also need to save the styling information for all the text like italic, bold etc.
Round 5
HR Round: Normal HR questions.
Thanks to Suresh for sharing Adobe Interview Questions. If you like GeeksforGeeks and would like
to contribute, you can also write an article and mail your article to [email protected].
See your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-questions-set-1/
Microsoft Interview | Set 4
Hi, this is Ishita Gupta. I have been one of the lucky hires of Microsoft this year through oncampus. So
wanted to share my experience as well as the questions asked for other aspirants to benefit from.
Written round was conducted online. It was a one hour test, with 30 aptitude questions and 20
technical (based on C, C++, Algorithms, flowcharts, logic, pseudocodes).
After being selected in 1st written, there was another written. It was of one hour, and there were 4
questions:
Both the writtens were done on 14th Aug. Results of the 2nd written was given out on 4t Sept, when
they actually came to our campus.
1st interview:
Started asking what all subjects I know in CSE (as I am from M. Tech ECE, and this time they
allowed us too). I told him C, basics of C++, socket programming, little of SQL etc. He asked me
what is the approach of C Programming called. (Procedural). Then asked for C++. Then wanted me to
explain him the disadvantages of Procedural programming. Then went onto class, object, relations
between objects, inheritance, abstraction, encapsulation. Asked me to give an example from the
interview room to describe these concepts. (I chose fan!). Then he went to concepts of memory –
stack, heap. Static and dynamic memory allocation, static variable and local variable memory
allocation. Difference in memory allocation for struct & class and class & object.
Then he asked me malloc, new. Then he shifted to DBMS or rather SQL, as I mentioned I know SQL
only and do not remember basics of DBMS. He asked me the types of languages in SQL (DML, DDL)
and then asked to write queries to get distinct entries from a column and then to get only the non-
distinct entries from that column.
Then he asked me to give solutions to the problem of timeout and overload on irctc server during
tatkal reservation. It went on for an hour. I came out all exhausted!
2nd interview:
After getting shortlisted in 1st interview, 2nd interview started off with concepts of C and C++ as
well as OOPS.
Was asked to write a program to find out the duplicates in a string in the most efficient way with least
complexity.
Was asked for basic concepts of Cloud Computing. This interview lasted for 40 mins or maybe a bit
more.
3rd interview:
This was the last round, and it was HR surprisingly! Questions asked were:
……Passion
……Tools for success
……Discussion of technologies that I have learnt on my own
……As student of ECE, why MSIT and not Telecom
……Won’t I get bored at MSIT?!
……Any questions for the panel
Results were declared 5 hours later, with everyone’s interview being over. And God gifted me with
MSIT job!
Many Many congratulations to Ishita. If you like GeeksforGeeks and would like to contribute, you can
also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-set-4/
Amazon Interview | Set 5
I’ve attended the Amazon interview in Hyderabad, This was kindle team, I got rejected but I’d like to
share the experience, thought of giving back something to geeksforgeeks, which was a great reference
for me.
Written test
Very straight forward
1. Given a linked list, sort without extra space.
I wrote merge sort
2. Methods to serialize & deserialize a tree ,must complete the below 2 monthods. File serialize
(node *root) & node * deserialize(File f)
Cleared the written test, I was told this after 1:30 Hrs.
First round
1. Find diameter of a tree, I’ve seen the question here, But i didn’t recollect.. So solved my self..in
some primitive way which made me write code with difficulty.
2. Find a lowest common Ancestor, The variation was the tree was just a Binary Tree, Not BST, It
was interesting to solve as i know only BST variation.
Second round
1. Given an array randomize it,
2. Write all possible permutations of a array of size z.
3. Given a 2-D array of 0s and 1s, find islands in it. An Island is 1s together. E.g (below there is U
shaped island)
0100001
0100001
0100001
0100001
0111111
4. Write a method to check if a tree is BST or not. I wrote some stupid mistake in this code, probably
that gave away my interview.
Third round
1. So many HR like questions. Why Amazon, Why u want to leave, Why u dont want to stay, what did
you do to stay back, biggest challenge, worst mistake, etc etc.. blabbered something.
2. Write a method that will test a function which merges 2 sorted linked lists.
3. Design a system, which can convert books from one format to another
Fourth Round
Only one design question: Design a email client.
After 4 days and lot of anticipation, I got a mail saying I got rejected, Was wondering what they
exactly look for.
Thanks to muzicisgod for sharing Amazon Interview Questions. If you like GeeksforGeeks and would
like to contribute, you can also write an article and mail your article to
[email protected]. See your article appearing on the GeeksforGeeks main page and help
other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-4-3/
Microsoft Interview | Set 5
Hi everyone, I would like to share my experiance with MicroSoft, as i have been the lucky hire.
Written (online)
Objective(60 minutes) + Subjective(60 minutes)
Objective: Apptitude + Reasoning( 30 questions ) and technical( 20 questions, C/C++ programs, flow
chart, identify correct function )
Subjective: 3 coding question( No in-build compiler in Web-Browser, simply you have to write your
working code as a function/functions )
1) A number is given say n, find the minimum number which is greater than n and has same no. of set
bits in it.
2) Binary search tree to Doubly linked list conversion( prefer in-place conversion )
2) details about q1 and q2 which is asked in the Subjective round, how you solve the problem and ask
to write the same code I have written in Test and explain it.
2) You have given a adjacency matrix of a graph, find the number of connected component set of the
graph.
2) You have n processes and m available resources, explain each step of OS in the execution of those
process along with which data structure will be suitable at a condition, which scheduling algorithm
will suit best, also in case of preepmtive scheduling, waiting queue etc.. its take a long time to
explain him. but finally he is satisfied with my answers.
3) Write a modified strcmp function which ignores cases and returns -1 if s1 4) iterative inorder
traversal.
3) He ask me about favorite programming language, and why I like that language..
4) You have given a range in Integer(a to b), find all the prime number between a and b.
…..i) first i gave him the simple solution(check every no. whether it is prime or not).
…..ii) then he asked about Sieve and to implement it, and which on is better( first approach or seive)
Finally…end of PIs and After 10-15 minutes, To my great relief, this time I was hired…
Many Many congratulations to Ajeet Kumar. If you like GeeksforGeeks and would like to contribute,
you can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-set-5/
Microsoft Interview | Set 6
I am a guy from CSE dept, IIT-BHU and currently in 4th year. I am placed in microsoft now and all
the credit goes to geeksforgeeks for sharpening and improving my coding skills. Thanks a lot guys for
such a wonderful site. Below is my interview experience, if its of any help to my fellow job seekers.
Written Round 1 :
50 multiple choice questions in 60 mins time. Had 2 sections – Aptitude and Programming Ability.
2. Given a binary search tree . Convert it into a doubly linked list in place (no extra space) such that
prev points to left child and next points to right child.
3. Given a linked list that contains 0,1 and 2 . Sort this linked such that it contains 0s first, then 1s and
then 2s in O(n) time. Ex:- 2->2->1->0->0->2->1->1->0 = 0->0->0->1->1->1-2->2->2
PI round 1 (Technical):
1. About urself, most challenging project of all you have done and about ur internship.
2. Remove from string s1, all the characters that are present in string s2.
S1=”abcde” s2=”xyazbx” Ans. S1= ”cde”
4. Always ask some questions to the interviewer at the end. That’s a good gesture.
5. Write test cases for the programs above and see if ur program covers all the test cases or not.
PI round 3 (Technical)
PI round 4 (Testing)
2. Given a func :: int typeOfTriangle(int side1,int side2,int side3); (func gives a number for the type of
triangle)
Write test cases to check functionality and security issues and even automate the generation of test
cases.
PI round 5 (Technical)
1. WAP to check if a binary tree is a BST or not.
PS- Whenever u write a program be sure to cover all the corner cases and write it in a proper
indented way. As interviewers ask to write testcases for the program u have written and then check if
ur program covers all the test cases.
Source
http://www.geeksforgeeks.org/microsoft-interview-set-6/
Amazon Interview | Set 6
Following are my interview details for senior software engineer in 2010. Thought of sharing it, if it
helps anybody
Telephonic Interview 1
1) Write your own power function in C/C++. Time complexity of your code, optimizations.
2) Given two strings, write a function to remove all characters in one string which are present in
other string
Telephonic Interview 2
1) Construct a tree from ancestor matrix. The main thing he wanted to check was use of binary search.
2) Find the k maximum selling items at amazon site at the end of day. Given a file which has count all
sold items. Use of min heap was expected.
Face to Face 1
1) Given a Binary Search Tree, in-place convert it to DLL.
2) Find the next greater element for every element in array.
Face to Face 2
1) Median of two sorted arrays.
2) Given an XML file, how will you store it in memory. Use of tree was expected.
There were some more questions that I don’t remember.
Face to Face 3
1) Given a Binary Tree, check if every node is sum of all of its children.
2) Given any Binary Tree, convert it to a tree where every node is sum of all of its children.
3) Given an array, find three numbers a, b and c such that a^2 + b^2 = c^2
Thanks to Vivek for sharing Amazon Interview Questions. If you like GeeksforGeeks and would like
to contribute, you can also write an article and mail your article to [email protected].
See your article appearing on the GeeksforGeeks main page and help other Geeks
Source
http://www.geeksforgeeks.org/amazon-interview-2/
Amazon Interview | Set 7
Hi my name is Anandhakumar. P. I am a 2012 pass out from college of engineering guindy. I recently
underwent offcampus interview with Amazon, Chennai, India for the post of SDE. I love
geeksforgeeks and i will call it as the best site to prepare for coding interviews. Here goes my
interview experience. Hope this is useful to someone and someone gets benefitted by it.
3) arr1 – 4, 5, 6, _, _, _
arr2 – 1, 2, 3
arr1 has enough free space to hold elements of arr2. Merge array 2 with arr1 in a sorted manner.
Cleared this round. I felt it easy as i was preparing for it for more than 2 months and geeksforgeeks
helped me greatly.
1) An array of size n is given. The array contains digits from 0 to 9. I had to generate the maximum
number using the digits in the array such that it is divisible by 2, 3 and 5
eg: 1 array = 18760, output must be: 8160
eg: 2 array = 7776, output must be: “no number can be formed”
[discussion went for more than 35 minutes. Every time i gave a solution, he was adding the
constraints and finally i did it. he was ok with it.]
2) least common ancestor in a binary tree [Note : not binary search tree ] [30+ minutes]
I explained him with several methods and finally he was ok with and asked me to write the code for
and i did it. he checked my code for different test cases and finally he was ok with it ..
Not even 5 minutes break i was asked to get ready for next face to face interview .
2) A n*n matrix is given which is containing elements in which each row alone is sorted. column is
not sorted. I have to convert it into a single dimensional array which will hold all the elements of the
array in a sorted manner.
I told him many logics . actually he kept on adding constraints with whatever logic i told him. Finally
he gave me a hint and asked to use minheap property and finally he was ok with it. I solved this
question using lots of help with him. man i was in interview for continuously more than 3 hours.
I am waiting for my result for next round. I will update if i go through the next rounds. Overall it was
a great experience with amazon and people in amazon are very smart minded.
Thanks to Anandha Kumar for sharing Amazon Interview experience. If you like GeeksforGeeks and
would like to contribute, you can also write an article and mail your article to
[email protected]. See your article appearing on the GeeksforGeeks main page and help
other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-set-7-2/
Microsoft Interview | Set 7
Recently I attended Microsoft Campus Interview and got selected. Below is my Interview Experience
and I just wanna share it to GeeksforGeeks viewers.
1st Round:
Online Aptitude test:
Aptitude, logical questions and subjective Questions
2nd Round:
Online test
In this round we are asked to type the code in notepad and send (no compilers)
3rd Round:
It started wih introduce yourself and he introduced himself to me. Then he asked me about my project
and it gone to some stuffs related wih memory. He asked me how a program is stored in memory
int main(){
if(i10)
prinf("Hi");else{};
}else{}
return 0;
}
so output should be
int main()
{
if(i10)
printf("hi");
else
{
}
}
else
{
}
return 0;
}
2) Write a program to find the diameter of a binary tree and then he wanted to extend it for m-ary tree.
4th Round:
1) You are provided with a string which contains single byte as well as two byte characters. If a
character is single byte char, it’s MSB is 0, if it’s a 2 byte char, it’s MSB is 1. Write a program to
check whether the given string is palindrome or not.
Test cases for above program.
2) Write a program to print the n-nodes from tail of the linked list.
Test cases for above program.
5th Round:
1) Write a program to Validate an IPv4 Address.
Write test cases for above program.
2) Write a program to find all the possible paths from a starting point to dest point in a maze(2-D
array).
ex: 1 0 1 0
1 1 1 1
0 1 0 1
0 0 1 1
Write a code for printing last n lines in a file (refer man page of tail command in linux). The file size
may vary, it may be 1MB or it may be 100 GB.
Give top 10 test cases for the above program
Many Many congratulations to Muniraj G. If you like GeeksforGeeks and would like to contribute,
you can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-set-7-3/
Microsoft Interview | Set 8
This about my experience of MS interview, which happened last day
Tech Round 1
1. Find the middle point of the linked list
2. Check whether loop exists or not in Linked List
3. How to calculate the size of the linked list
4. Given an unsorted array, how to divide them into two equal arrays whose difference of sum is
minimum
-> First I proposed sorting and then distributing them to two buckets. She’s fine with that. However
she doesn’t want to sort the array and asked if i can solve in O(n) time
Tech Round 2.
1. Given an array, rotate the elements of an array within O(n) time and with 0(1) space
-> This is the worst round for me. Made silly mistake. I felt very bad after coming out. couldn’t get an
idea of continuous swapping
Tech Round 3
1. Given a sorted array, find the pair of elements whose sum can be equal or close to given sum
2. Given an array [a1b2c3d4] convert to [abcd1234] with 0(1) space and O(n) time
Director Round 4
1. Given Linked list, write heapify and delete methods.
2. Given two sorted arrays of any length, find out the median of them if they are sorted into single
array.
–> Lost here. I couldn’t find good solution. I think it’s my bad luck If i could have crossed
Anyways, it’s a nice experience overall. First time I entered into MS campus and first interview with
them. Learned lot. Needs to improve and get into that by next time
They will give little hints and try to use them and make solution out of it.
Thanks to Nitin Gurram for sharing Microsoft Interview Questions. If you like GeeksforGeeks and
would like to contribute, you can also write an article and mail your article to
[email protected]. See your article appearing on the GeeksforGeeks main page and help
other Geeks
Source
http://www.geeksforgeeks.org/microsoft-interview-set-8/
Adobe Interview | Set 2
I have recently been through the recruitment process of ADOBE. I didn’t get through (I got the reply
today), but I sincerely hope that my experience will help some of you in your endeavors.
Round 0: Written Test – I was called for a written test. The test was 3 hours long. It had four
sections – Quantitative, Analytic, Data Structures and Algorithms, and Core Java & J2EE
fundamentals
The questions were simple. The paper had a time limit for each of the individual sections but
somehow the HR collected the answer sheets (and the question papers) all together at the end of 3
hours.
There was no negative marking but they had a different weight-age for questions in each section
Analytical: 3-4 Analytical Puzzles followed by 4-5 follow up questions (multiple choice). Time
limit: 15 minutes
Data Structures & Algorithm: 10 questions (not multiple choice) to be answered with a brief
explanation. Questions like 24ABC in base 6 would be what in a base 7 system. Write a program to
find the missing number in an array of size N-1 which had jumbled up numbers ranging from 1 to N. I
hope you get the idea.
Core JAVA & J2EE – The Core JAVA section had general questions on JAVA. They stressed a lot on
threads.
I dint know much about J2EE but the whole paper had just 6 questions on it, so missing them didn’t
cost me much.
Almost a week later the HR informed me that I had done really well in the test and that I have to come
to the ADOBE office for the first set of interviews.
Interview 1
1) He gave me a custom PERSON object. This object had some properties like name, surname, age
etc. He asked me to write a function which can return the size of this object. He asked me to write a
generic code that will work with any object. The object may have inbuilt data types like in the
PERSON object or it may have another custom object inside it such as a FAMILYBACKGROUND
object. He gave me a few functions from the JAVA API which can tell you about the contents of an
object. He asked me to write a helper function that can return the size of default data types like int,
float etc.
2) He gave me a sorted but rotated array and asked me to find the pivot.
Interview 2
1) He gave me a sorted but rotated array and asked me to search an element inside it without finding
the pivot. Complexity of the solution should still remain O(Log n)
2) Find the mean and median of the elements which are dynamically added at runtime.
3) I have a list of N teams T1, T2, T3 … Tn. Each of these teams has played a match against every
other team. I have a function displayResult(Team T1, Team T2), it returns the team which won the
match between any two given teams T1 and T2.
I have to write the teams in an order such the (n-1)th team (in the order) had lost to the nth team which
in turn had lost to (n+1)th team..
For example if in a particular order, the teams appeared as T1, T2, T3, T4 … then team T1 had lost to
T2, T2 had lost to T3, and T3 had lost to T4… It may be possible that T3 lost to T1 .. but that need
not be taken into consideration while writing the order. Only the neighboring elements should be such
that the element on the left has lost to the element on the right.
How will you write the teams in this order? Write a code for it
Make all the necessary assumptions you need to solve the problem.
4) Print an order of all the knight moves such that it fills up an 8 by 8 chess board. The moves should
be such that no block that has been stepped on is visited again.
After a few days, the HR informs me that I have qualified for the next round. Only this time my
interview will be taken by some of the senior executives at ADOBE.
Interview 3
1) General discussion about the work done in projects, internships etc.
2) What is reflection? How does JVM find the right class to instantiate an object?
3) Draw a Pascal triangle. Write a code to print the elements of an N level Pascal triangle using a 1
dimensional array.
Interview 4
1) Generate all possible combinations (of r elements) inside an array of size N
E.g. arr [] = {2,8,14} All possible combinations of r=2 will be {2,8}, {8,14}, {14,2}
2) Why are string objects immutable in java? How are Strings structurally designed in java?
3) When should one use merge sort and when should one use quick sort?
HR
General questions like if selected which office would I like to work for? Where do I see myself 5
years from now? etc etc…
I stumbled on the interview questions in the fourth round (Probably why I wasn’t selected).
Please post if someone has answers to them.
Best of luck.
Source: http://www.geeksforgeeks.org/forum/topic/adobe-interview-8th-september-28th-september-
2012
Thanks to ganglu for sharing interview experience. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-set-1/
Microsoft Interview | Set 9
I am Amit Dhaka. Following is my experience of MS IDC intern interview.
Many Many congratulations to Amit Dhaka. If you like GeeksforGeeks and would like to contribute,
you can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks
Source
http://www.geeksforgeeks.org/microsoft-interview-set-9/
[TopTalent.in] Interview with Arun Dobriyal
who landed a job at Facebook, Palo Alto
In conversation with Arun Dobriyal, a Computer Science graduate from IIT, Kharagpur who was
recently hired by Facebook for a whopping pay package of 1.3 Crores, much higher than the 77
lakhs being quoted in newspapers. In clear and concise words, Arun gave us quite a few nuggets of
knowledge that many students, aiming for similar achievements in life, will find really valuable.
A long and hectic day of exams and interviews, concluded really well for him when he was informed
that he has been selected. Words cannot do justice to his joy at that moment and thus, when asked
about his reaction to the news, he says that his happiness knew no bounds. Since the previous
statistics on Facebook’s recruitment were quite dreary, his expectations were quite low this year.
Therefore, his pleasure in being one of the lucky four this year from his college is perhaps quite
obvious. At the end of the day, this feat can be attributed to his amazing knowledge and persistence.
His account of that day proves how thorough the company is in choosing only the best and most
deserving. An online exam was conducted to select 25 students out of over 200 students who had
applied. There were two software engineers and a HR person from the Facebook’s Palo Alto office
to manage and conduct the whole process. The 25 were subjected to an offline coding exam
consisting of just two questions, only to select about 10 students. The shortlisted students then
underwent a round of individual interviews. He was the first one to face a conference call interview
with a few people from California, which also consisted of two on-the-spot coding type questions. If
this wasn’t enough, there were three more rounds of interviews to conclude the hiring process. But in
the end, he and three others passed with flying colours and, of course, hefty pays.
Arun, with his vast experience and wide range of accomplishments, has lots of advice for the future
graduates. In one of his most important points, he clearly implied how trivial a résumé is. It’s a
formality and a minor part of the process. It’s all about exceedingly strong fundamentals.
When asked about what giants like Facebook are looking for in students, he answers with supreme
proficiency in algorithmic programming and data structures. It is algorithmic programming and not
system programming that has gained a lot of importance. Of course, qualities like good
communication skills and other soft skills are a given for any such high-profile offer.
One of the most important qualities that set you apart from your peers is how good you’re at using
algorithms to solve any given problem instantaneously. Exceptionally strong foundation in the subject
is pivotal to your success. Although the programming language is the candidate’s choice, being very
good at one language is a very valuable asset. In his opinion, it’s a must. His repeated emphasis on
fundamentals illustrates the fact that they are a must to perform effectively, be it in the interview or at
the company itself.
To those who’ve a long way ahead before sitting on an interview chair, his advice was loud and clear
– Try to gain as much experience as possible. Internships at start-ups and corporate companies, in
both India and abroad, are the best opportunities to do so.
That companies like Facebook visit just a few colleges every year, only to recruit a handful of people
shows how competitive the recruitment market is. Although talent from all over the country wishes to
connect with companies like Facebook, not all of them are able to find the right opportunities.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin.
Source
http://www.geeksforgeeks.org/facebook-interview/
[TopTalent.in] Rushabh Agrawal from BITS
Pilani talks about his Google interview
experience
Google is consistently chosen as the best workplace in the world and engineers all around the world
would simply love to be a part of this amazing and innovative organization. Rushabh Agrawal,
a Computer Science graduate from BITS Pilani, recently got recruited by this dream organization in
Mountain View, California Office and we, at TopTalent.in got an opportunity to talk to him. He speaks
about his personal reactions (read jubilation), the recruitment process and gives out useful tips &
suggestions for all aspirants.
First question that anybody would ask – How did it all happen?
The campus placement season at BITS Pilani kicked off with the Google written test on 10th August.
He had almost forgotten about it because nobody heard from them for quite some time. But on August
28th, five of the numerous applicants got calls for interviews at the Bengaluru office of Google. And
by 6th September they were in India’s silicon city for their interviews. I’m sure he would agree with
me when I say it was all worth it. After all, 2 of the 5 lucky candidates (Rushabh Agrawal and Kunal
Lad) actually got selected for Google’s Mountain View office.
When asked about his reaction to the good news, he clearly demonstrated the fact that it will remain
an unforgettable day for him. “It was in the afternoon and I had just come back from lunch in the hostel
mess; still hungry, given the food that day.” And that was when he saw an email informing him of his
selection. He remembers the moment clearly, “I spent the next 10 minutes going through the email
trying to come to terms with what was written in the email.” Within 10 minutes he received a call
from the Google HR person to personally inform him about his selection and that was when the
joyous feeling finally seeped in. While she went on to describe the package details and terms of
joining, Rushabh was too jubilant to care about all that she was saying! His friends and ‘wingies’
were already shouting and cheering around him within minutes – all this while the HR lady was
speaking to him. He declares that the feeling still remains like a too-good-to-be-true thing.
On whether the selection process is different from the usual campus placement processes.
We’ve heard of those brain teasers and super-tough questions from Google’s interview. Rushabh
disagrees and says the process is more or less similar to companies like Microsoft, Amazon etc. Only
difference was in length of the placement process. Usually, when companies come for campus
placement, the process gets over within a day, on the campus itself. But Google almost took a month.
There was an initial screening test followed by a series of interviews. All interviews they had at
Google were technical and each interviewer tested a different domain of knowledge and thinking.
There was an open ended discussion as well, in one of the rounds. Rushabh also had a couple of
publications in his kitty and a couple of interviewers discussed about them as well. A very interesting
point is that during the complete interview process, there were no eliminations after each interview.
All of them went through the same number of interviews. During the interview, the interviewers
constantly took down observations/opinions. In his opinion, at the end of the entire process, all the
points are tallied to select the candidates. He cheerfully tells us that apart from the interview they got
to enjoy the lunch at Google and were put up in a really awesome place for the night.
On the kind of skill-set companies like Google, are looking for in candidates.
He informs us an in a matter-of-fact way that knowledge of Data Structures and Algorithms are a
must, along with decent coding skills. In addition, knowledge of Computer Networks and Object
Oriented Programming (OOP) can come in handy as well. Knowing anything else is a bonus. Like in
anything else, practice (solving problems in this case) helps a lot. Interviewers generally evaluate a
candidate based on his/her response (thinking process, approach) to unknown problems. So they look
for problem solving skills as well, in addition to experience. It is a fact that companies like Google
look for highly intelligent people. And the resume, along with the interview process, gives them
ample opportunities to evaluate a candidate’s intelligence.
Companies like Google don’t care about the candidates’ non-technical achievements. So don’t clutter
your resume by mentioning those. Keep your resume short and crisp. No point explaining everything
as they do not “study” your resume (His was a 1 page document). During the interview, the
interviewer may glance through it and on finding something interesting, would like to talk about it.
This will start a discussion and the conversation, which is now in your hands, offers a good chance to
impress the interviewer. Write your resume accordingly (such that it evokes enough curiosity in the
mind of the interviewer). Also, you’ll obviously want to talk about some of your
projects/publications more than the rest. So highlight your work accordingly. Now there’s some really
specific and useful advice, right?
Interested people would obviously want to know how much preparation goes into winning such great
offers. He gives an honest response and says “I didn’t prepare for Google specifically apart from
going through some of the Google interview questions available online, a couple of days before the
interview.” According to him, the questions in general are similar to what one would encounter in
interviews for Microsoft, Amazon or any other similar company.
“Preparing for placements in general over the summers, worked out good enough for me”, he says
(practice is the key, evidently) This type of preparation is only to channelize one’s thought process for
the problems posed during interviews, which are different in nature to what one would otherwise
encounter. An important point to note is that the range of questions asked in interviews is not very
broad. So the preparation basically familiarizes you with common tricks and stuff that would come
into use frequently. Knowing them won’t necessarily impress the interviewer but not knowing them
would take you a notch below the rest of your competitors. Beyond that, whatever you have done so
far – publications, projects, coding experience, etc will come into play. You basically use all the
knowledge gained and skills acquired in the past few years.
To conclude we asked Rushabh to give some advice to all the students out there who’re aspiring for
similar job offers. To start with, he clarifies that that the interviews at Google are not very different
from those at Microsoft or Amazon, contrary to popular opinion. He, personally, did not find them
“extra difficult” (and he says this on behalf of all 5 who gave the interviews from BPPC)
Also, during the interview, you are not judged by simply your success in reaching the most optimal
solution. You are judged on your thought process and failure to reach the final solution is not the end
of it, which is important.
For the 1st and 2nd year students, (and many of them have asked him “the recipe” to get a job at
Google), a lot coding practice and a very good knowledge of Data-structures and Algorithms to get a
job like this is a good way to go forward but not the only way. He, himself, didn’t possess a great
coding profile but his profile was based more on projects and publications, in things like Machine
Learning, rather than algorithms. “What I feel is that you must try to gain as much knowledge and
skills as you can. You never know what will come handy.” The candidate’s intelligence and problem
solving ability would take care of the rest. You basically pursue whatever interests you or excites
you. There is no long term preparation for getting a particular job and thinking in terms of that would
not only restrict you but, also, is too short-sighted an aim to have.
Of course, every aspirant has to spend small amounts of time preparing explicitly for interviews. It’s
just a great exercise to streamline the thought process. Like any other interview process, a lot depends
on factors beyond one’s control. As they say, the rest depends on the day.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks
Source
http://www.geeksforgeeks.org/toptalent-in-rushabh-agrawal-from-bits-pilani-talks-about-his-google-
interview-experience/
Amazon Interview | Set 8
I recently interviewed with amazon for the position of SDE1 in their TRMS team. The interview
procedure was unimaginable rigorous.
Q1: Calculate the expression (2+3)*5 .. The question just said this .. I guess we had to make our own
assumptions to solve the problem
Q2: Two trees can be called isomorphic if they have similar structure and the only difference amongst
them can be is, that their child nodes may or may not be swaped..
for example
——4
—-2—6
–1–3–5–7
and
——4
—-6—2
–1–3–7–5
are isomorphic .. the trees are similar and a few nodes have their left and right child swapped…
The interviewstreet people marked the solution to my first question wrong even when it worked fine..
When I told the HR about the situation, she got it checked with some of the amazon guys and they
were ok with it.
Telephonic Interview 1
Q1: Find the Kth largest integer in a Binary Search Tree. When I told her the solution like the one
given on geeks for geeks, she asked me to do it using recursion.
Q2: Given an array of positive integers, find the max no that can be formed by any permutation of the
arrangement. I told her a logic. She then asked me to write just the comparison function to choose one
number to put before the other.
When I gave the interviewer straight answers, she twisted the question more.. Probably they wanted
to see how i think and approach a problem.
Telephonic Interview 2
Q1: A binary search tree is given with its two nodes interchanged. I had to find both the nodes.
I cleared this round. The HR told me I had to come over to Bangalore for in-person interviews. (all
the travel arrangements were made by amazon itself)
Personal Interview 1
Q1: Find the sum of continuous subarray within a one-dimensional array of numbers which has the
largest sum .. I didnt know a solution (kadane’s algorithm), but somehow I was able to work it out in
the interviews ..the interviewer liked my way of approaching and did help a little
Q2: How can you best implement queues using stacks. What would be the time complexity?
Personal Interview 2
Q1: Find non-unique characters in a given string. I told her one O(n^2) [brute force], one O(n logn)
[sort and then compare adjacent elements], and one O(n) [store the character count in an array]
approach. She then asked me to do it in O(n) without using array.
Clueless, she finally told me she wanted me to use BIT Vector. I wasnt well converse with Bit
Vectors and I told her so.. She still asked me think more. Finally she told me a solution using the same
which was impossible to think in the interview alone, especially when one didnt know what BIT
Vectors were. She agreed when I stated the point and accepted my previous O(n) solution and we
proceeded to the next question.
Q2: Given an array of integers, populate another array with the product of the elements of the first
array except for the current index element.
Here when I gave her a O(n) solution [find product and divide it with current element to get the
number for this index position], she asked me to do it without the divide operator. Gave her a O(n^2)
solution. But I couldn’t think better. Finally just when she began to tell me an O(n) approach, I
remembered the geeksforgeeks solution to the problem and gave it to her. Probably she didn’t
consider it. (don’t know for sure)
Personal Interview 3
This interview was with the hiring manager at Amazon. He first asked me a couple of HR questions
like Why Amazon? Why should we hire you? Projects, internships etc ..? How would you handle a
disagreement with your team mates? Etcetc …
Q: He drew a circle on the board and marked a few points on it. Named them X1, X2, X3 ..
Then he said these are gas stations, and you have to find the correct gas station from where a car
should begin to loop in the circle such that it never runs out of gas before completing a round. He then
sat on the table.
(Sorry, but I will have to describe it in detail to tell you how it was put out to me.. and off-course to
bring in more clarity to the question itself.. )
Unclear about what I had to do exactly and what information was available, I asked him back a few
questions.
Why will car run out of gas after fuelling from lets say the first gas station?
He said each gas station has limited amount of gas (lets say X1) and after fueling from this station it
can run out of gas even before reaching the next station (anything could happen, it may be able to
cross the next gas station but run out later before completing the round..). So I have to find a gas
station the car should start the loop from such that it never runs out of gas before completing the loop.
So can the car refuel at the next available gas station, if its able to make up to it?
Yes
Do we have the information about the amount of gas required to reach from one petrol pump to
another?
Yes
I made an assumption that the car tank was huge enough to fill as much gas as possible.
And then I drew two arrays, one holding the amount of gas each station had, and other the amount of
gas needed to go from this station to the next station..
I then took the difference (Y1-X1), (Y2-X2) ..and stored it in an array.. and then suddenly it hit me
that this became a simple problem of finding the maximum sum of a continuous subarray within an
array (circular). He liked my approach and asked me to program it. Did it and showed him a dry run
of the code I had written. He was ok with it.
(I felt good after the interview because in there I didn’t stumble at all ..)
Personal Interview 4
Q1: We have a huge file with braces ‘()’ [just one type..] Find if they are balanced .. (stacks
wouldn’t work here because you will probably run out of memory storing the stack ..) When I gave
him another solution, he asked me to do it using parallel processes. I told him to elaborate more.. (to
be honest I wasn’t familiar with parallel processes) .. Finally I told him so ..and he asked me to think
about it still ..
We discussed it for about 20 minutes. Not reaching anywhere he moved on to ask me the next
question.
Q2: Find the smallest substring which contains all the characters of the main string. Again I dint have
a solution to this. I gave him a O(n^2) approach. He asked me to think further because the way I was
approaching it was the way to go about it and I can make use of the last sub-solution obtained to
improve my complexity. Couldn’t think of anything, we finally moved on to the third question.
Q3: given the numerator and denominator of a fraction, find the quotient and the remainder without
using divide and mod (‘/’, ’%’ )operators. This was simple. I did it. He then asked to write the
invariant of my solution which was denominator*quotient + remainder = numerator.
He then asked me to think about the cases when either or both of numerator and denominator were
negative. We were almost out of time so he didn’t give me time to think and concluded the interview.
He wanted me write an invariant that was true regardless of the input. Now that I think of it, I should
have said |denominator|*quotient + remainder = |numerator|
This was probably the most difficult of all the interviews I have ever had.
Source
http://www.geeksforgeeks.org/amazon-interview-set-8/
Amazon Interview | Set 9
How did it start?
Later on I came to know that the recruitment through this link is over. So I contacted a few of HR
persons at Amazon, and I got a new link for online programming test.
1) A sentence is given which contains lowercase English letters and spaces. It may contain multiple
spaces. Get first letter of every word and return the result as a string. The result should not contain
any space. Complete the following method:
2) Given an array. Iterate it for the given number of times. And then return the summation of the
resultant elements.
Sum is 2 + (-2) = 0
If only one element remains in the array, the element remains the same after applying the iteration.
Complete the method.
Given that
class Node
{
Node left, right;
int data;
Node(intnewData)
{
left = right = null;
data = newData;
}
}
4) Swap adjacent nodes in the linked list. Change the links, not the data. Complete the method.
Ex:1, 2, 3, 4
o/P: 2, 1, 4, 3
ex: 1,2,3,4,5
op: 2, 1, 4, 3, 5
class Node {
Node next;
int val;
}
e.g.1.
i/p: 1, 2, 3
o/p: 3
explanation: the sequence is increasing
e.g.2
i/p: 4,5,6,7,8,1,2,1,2,3,5,4,6,7,8,9,0,6,7
o/p: 8
xp: 1,2,3,4,6,7,8,9
e.g.3
i/p: 1,2,9,4,5,10,7,8
o/p: 6
xp: 1,2,4,5,7,8
e.g.4
i/p: 20, 3,22, 5,50, 34, 49, 91,110
o/p:6
xp: 20,22,34,49,91,110
OR
3,5,34,49,91,110
Telephonic Interview 1:
1) A M x N matrix, filled with 0s and followed by 1s. Find the row which contains minimum
number of 0s. E.g.
0 0000 1
0 0 1 111
0 00 1 11
output: {3, 4, 5, 1, 2}
Telephonic Interview 2:
1) Given a BST, find the node which contains the value which is equal to (or lowest greater than)
the input value.
3) Given a point P and other N points in two dimensional space, find K points out of the N points
which are nearer to P.
1) Given a Singly Linked List which contains integers, bring odd values in the beginning and even
values at the end. The relative order of odd values, and that of even values should be maintained as it
is.
2) Given N sets of integers, remove some sets so that the remaining all sets are disjoint with one
another. Find the optimal solution so that the number of sets remaining at the end is maximum.
1) Given an array of size N, a window of size W slides over it by increment of slide S. If the
window reaches to the end, we should stop there. Find a formula in form of N, S, W so that we can
find the number of valid windows. Write a program to find minimum in every window and print it.
Optimize it.
Face-to-face Interview 3:
1) Trim the Given BST by given min and max values. It means remove the nodes which have values
less than min or greater than max. Write iterative and recursive – both the solutions.
2) Given an array of strings, find the string which is made up of maximum number of other strings
contained in the same array.
3) Find integer value of sqrt(N). Do not use any library functions or any mathematical solution.
1) Given a 2-dimensional array of integers, find the value 1 in the array, and set all those rows, and
columns to 1, which contains one of the values as 1.
2) Suppose you are working in companies like naukri.com. You need to collect email Ids and
contact numbers of all the Software Engineers aged between 25 to 40, in India. How will you do that?
3) Suppose a person of the age of your grandfather works on computer. He knows little about the
computer. And he complains that it was working fine, but for last 2 days, it has become very slow.
How will you solve it? What could be the reasons?
4) Design an IVR system for a Restaurant in which customers can book their tables for lunch and/or
dinner. Advance booking for 2 or 7 days/as you wish. After the request from user, respond to him that
you will confirm the request within 5 minutes. Check availability and send SMS confirming the same.
If the SMS is delivered then assume that the customer is genuine. If the SMS is not delivered
properly, discard the user request, as it is not genuine.
i) How can you take names and email Ids of the customers during the process?
ii) What can you do for repeat customers? How will you identify the repeat customers?
iii) If there is request for a team size greater than the table size, what will you do? E.g. request for
10 persons when table sizes are 6, 4 and 2.
Thanks to Hitesh for sharing Amazon Interview experience. If you like GeeksforGeeks and would
like to contribute, you can also write an article and mail your article to
[email protected]. See your article appearing on the GeeksforGeeks main page and help
other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-8-2/
Amazon Interview | Set 9 (Answers)
This post is about answers to the questions asked in Amazon Interview | Set 9. It contains links to
some of the solutions available on the geeksforgeeks. I have also written my answers which I replied
in the interview. I hope it would help the readers.
3) http://www.geeksforgeeks.org/archives/10379
5) http://www.geeksforgeeks.org/archives/12832
Telephonic Interview 1:
1) http://www.geeksforgeeks.org/archives/24272
2) http://www.geeksforgeeks.org/archives/18752
3) http://www.geeksforgeeks.org/archives/2398
Telephonic Interview 2:
3) Find the distance of every other point from P. Then use of max-heap of size K.
http://www.geeksforgeeks.org/archives/2392
1. For every set, find out the number of sets it has intersection with. Also maintain those set indices.
2. Remove the set which has maximum number of intersection. And update the remaining numbers.
3. Repeat step 2 till we have any set which has intersection with any other set. At the end, we will
have the solution. (Still not sure about optimality).
We can relate the solution with graphs: Remove some nodes so that remaining all the nodes are
isolated nodes.
Searching: To make searching efficient, we can build trie data structure using bits for every set. So
that we can find the intersections fasters.
1) I tried for some time. Then the interviewer gave me the formula. The number is 1+ceil((N-W)/S)
in all the cases.
For second part of question, simple solution is to find min in every window. But we can optimize so
that we can utilize previous results/previous min.
Bit optimal: I created a min-heap of W elements. But the heap contained indices of the array
elements, not the values inside the array itself. The indices were stored in heap as per their values in
the array. Then for a new window, search the heap linearly (heap was in form of array), replace the
old indices (which are no longer in the new window) with the new indices, and adjust that index in
the heap. After adjusting all the new indices, we will have new min for the new window at the root.
(Not sure whether the complexity brought in to the solution is worth!)
Face-to-face Interview 3:
2) I gave a solution based on trie data structure using characters of the string. But he suggested to
build trie based on the string itself. However, I was not able to think in that way.
2) I said, we can organize an online coding competition. People would register and we will have
the details. He replied, it’s too expensive. Then I said, we can postpone the competition!
Thanks to Hitesh for sharing his answers. If you like GeeksforGeeks and would like to contribute,
you can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-9-answers/
Amazon Interview | Set 10
Recently I got interviewed at Amazon Hyderabad. I just wanted to share my experience. Hope
someone gets little help from this.
1. Telephonic
a. In Binary Tree node, extra pointer ->next is given in the structure of node. Make linked list at each
level.
I did it with using Queue made of doubly linked list. Time complexity O(n), space O(n). I was
asked to write code as well on collabedit site.
b. Equilibrium point in array, equiPoint = ith index where Sum(Left array) = Sum(right Array).
Did it O(n) time complextity and O(1) space. I was asked to code it as well.
2. Telephoinc
I did it as follow.
if(start == NULL)
return;
findPair(start->left, k);
findpair(start->right, k);
}
b. Two files containing large number, one in each. You have only fopen(), int read(fp), fclose(),
fwrite(). Add these two numbers and write in third file with the help of given functions only.
c. Write sql query for getting direct and indirect reportees of a given employee. Lets say Employee
table(empId, ManagerId).
d. Oops concepts, asked to explain Static keyword with all possible example.
Rules: consider BST made from given array. Let say number x is present in the BST and to reach x,
If you go right print 1, if left then 0.
Now you are given an index i in the array A (so x = A[i]) and print the encoding without
constructing BST to reach x
I was not able to do it on the spot but after this interview, I got some free time and solved it and
handed over papers to the interviewers. I liked this problem. It was little interesting.
b. Find triplets in array so that a+b+c = k, k is given number along with array.
c. Then moved to finding all possible pair set in an array. Mind the term SET. Take care of duplicates
as well.
a. Given array, find all possible sets of elements which add up to a given integer K.
I coded it with just 4-5 lines in just couple of secs. It took little time to make him understand the
solution.
I was given an input of 6 numbers in an array and asked to run my solution till the end. It was
recursive and he asked me to keep on writing, writing, writing, till he got that okay, it will work fine.
b. I was asked couple of questions which I already knew and I told him and we moved on to next
questions. I don’t remember what he asked.
a. Discussion on my current Project. Quite a good discussion. It took quite a good time.
They asked me what more enhancements I can think of for features, I made in my project.
I explained few different things that I could think on the spot and they liked it.
b. Linked list with a “mad” pointer along with “next” pointer in it, mad can point any where(can be
null as well). Return clone of given such linked list.
I already knew the best approach for this. Then he asked me to think something else. I mentioned
Hash. He was okay with it and we moved on.
c. Replace the elements in an array with the next following greater number of it from right side of the
element.
I told him I already know this and I asked if he wants me to explain the algo. He said so and I
explained. Then we moved on.
output 3->2->1->6->5->4->7-_
e. Two strings S and S1. Remove all chars from S which are present in S1.
Explained them all possible methods for this what I could think of(with space, without space).
Finally, they were looking for BitMap solution. I explained that as well before one mentioned it.
In the whole interview process I was asked like 8-10 questions which I already knew and I mentioned
the interviewers same. I was told why you read so much.
Overall, it was quite a good experience for me. I liked the way interviewers were interacting. They
were very supportive and friendly as well.
Unfortunately, I was not selected. I have no idea what they were looking for.
Thanks to Vinay for sharing Amazon Interview experience. If you like GeeksforGeeks and would like
to contribute, you can also write an article and mail your article to [email protected].
See your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-10/
Amazon Interview | Set 11
I would like to thank geeksforgeeks team for the excellent website. I got placed in amazon because of
your website. I would like to share my experience and the interview questions.
—Write a program to find the difference between the sum of nodes at odd height and the sum of nodes
at even height
—Given an array of integers representing coin values and the sum required. find the number of coins
required to get the sum
4 technical rounds
Various programming questions related to data structures were asked. Each round was an elimination
round. Questions asked were
—Write a program to traverse the tree in spiral form in O(n) time.(Hint:use two stacks)
—Program to swap the kth node from end and kth node from front
Each technical round was for 60-90 minute duration. There was no HR round
This article is compiled by Supreeth. Many Many congratulations to Supreeth. If you like
GeeksforGeeks and would like to contribute, you can also write an article and mail your article to
[email protected]. See your article appearing on the GeeksforGeeks main page and help
other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-11/
Oracle Interview | Set 1
I attended the Oracle Server Technology interview at Banglore. They started with a PPT followed by
a written test. Then two rounds of technical interview and then HR. Finally result got declared after a
week and got selected thank you geeks for geeks.
You are expected to write a algorithm/pseudo code followed by actual code in c/c++/java.
Q1. A tree is given, send it on a network. You can assume send() and receive() functions are
available.
Q2. A compressed string is stored in an array of sufficient length. Write a program and its complexity
to un-compress the string. i.e. a3b6c4 à aaabbbbbbccccc
Q3. A media player selects songs from a database contains huge number of songs. Create a shuffle
function such that it selects a song randomly but it does not repeat the songs. You can assume random
function rand() is available.
Solution 1.
a)Read the string in inorder and transfer it using send() and receive() function.
b)Read the string in preorder and transfer it using send() and receive() function.
c)At the receiving end inorder and preorder both are available so tree can be reconstructed.
Solution 2.
a) First read all the frequencies and add them up as total_freq.
b) Start filling of array from index total_freq.
c) Repeat a character by the frequency given.
Solution 3.
a) Enumerate the songs, Assign a specific number to each song.
b) Write a map function which maps() the output of random() function to the size of song database
(size).
c) Play the song whose number is output of map function.
d) Now scale up the sequence number of that song such that it moves out of range of map() function,
i.e. seq_no= seq_no + size; (so that next time it can’t be repeated until all songs have been played
once).
e) Once all songs have been played, again scale down their sequence number.
This article is compiled by Shailendra Verma. Many Many congratulations to Shailendra Verma. If
you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/oracle-server-technology-interview-set-1/
Adobe Interview | Set 3
Following is Adobe (Testing) experience.
1st round:
—What do u know about adobe..
—Changes u want to make in adobe reader (as i said adobe reader is my fav)
—Why testing and y not developing
—Your interest (as my fav sub was os)
—What is the difference between win 8 and win 7
—What is the diff between thread and process
—When u open a new tab in browser, the new tab is a thread or process(questions related)
—Test case for bottle
—Test case for stapler
—Program to check syntax of string
Puzzles:
—Cut round cake into 8 equal pieces u can use knife only 3 times
—8 marbles puzzle(very famous)
—Given a crescent moon shape. Cut it into 7 parts with 2 cuts at max.
2nd round:
—Program to print last nth element of linked list in single traversal
—Program to create mirror image of binary tree
—Rope puzzle(famous)
—Difference between static and dynamic linking in terms of binary code.
—Given n people in a room. Each one shakes hands with only those people who are known to him.
You have to prove that there will be at-least two people among them, having same number of shake
hands.
3rd round:
—HR, normal n frank
4th round :
Puzzles:
—25 horses puzzles(famous)
—Hour glass puzzle(famous)
—You have to assemble a computer, with minimum cost. check if it is running the boot strap program.
Many Many congratulations to Saumya Varshneya. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/adobe-testing-experience/
Flipkart, like most companies, had multiple rounds of interviews. First in the list was an online round
in which the candidates had to attempt 30 Multiple Choice Questions and 2 programs to do in 90
minutes. Major topics that most of the questions were based on were the general concepts of
Aptitude, C Language, Object Oriented Programming, Data Structures, Operating Systems and
Databases.
This was followed by another written round in which they asked a programming question. Applicants
had to face three rounds of technical interviews. These concentrated heavily on general algorithm
designing. The problems given primarily tested Recursion Techniques, Greedy Techniques and
Dynamic Approach to design an efficient algorithm.
Best part? They kept guiding the candidate if he/she got lost anywhere in the process.
Flipkart recruiters mainly tested on how we think when solving a problem. It’s not that you should
know a lot of things, but you should be able to apply whatever you know. At many occasions hints and
directions like “Think like this……” and then find a better solution were provided. They want to get
the best out of you during the interview, so just go across different problems and try to apply your
knowledge of algorithms into different applications.
The written round tests the basics and the interviews test how he/she applies different techniques and
methods to develop an efficient algorithm for a problem. They mainly focus on your thinking process,
so I would suggest keep speaking your ideas continuously during your interview. If you go wrong they
will guide you.
One should be clear in the basics of any preferable language. He/she should be able to think and
apply the knowledge of one concept in another situation. No one will ask anything straight from the
book. All Books can give you so much – standard algorithms and standard problems. From there on,
it’s the candidate’s skill that will decide his performance. It is you who has to decide given a problem
which method will be most feasible and fastest.
So the advice would be to see different problems on greedy techniques and dynamic programming
using recursion. And try to understand why a particular technique was used and why other techniques
would have given poor results. This will help in thinking wide when you come across a problem.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks
Source
http://www.geeksforgeeks.org/toptalent-in-how-flipkart-gets-the-best-out-of-their-applicants/
Amazon Interview | Set 12
I am very thankful to geeksforgeeks team for such a great site. I got offer from Amazon.
Written Test
It was online test on interviewstreet.
20 MCQs- basics of C & C++, OS and some aptitude question
2nd Round
1. http://www.geeksforgeeks.org/archives/3758
2. There are some glasses with equal volume 1 litre. The glasses kept as follows
1
2 3
4 5 6
7 8 9 10
You can put water to only top glass. If you put more than 1 litre water to 1st glass, water overflow
and fill equally both 2nd and 3rd glass. Glass 5 will get water from both 2nd glass and 3rd glass and
so on..
If you have X litre of water and you put that water in top glass, so tell me how much water contained
by jth glass in ith row.
Example. If you will put 2 litre on top.
1st – 1 litre
2nd – 1/2 litre
3rd – 1/2 litre
3rd Round
1. http://www.geeksforgeeks.org/archives/3042
2. Liked list is given as below (with elements as 1, 2 and 3), sort this in one pass.
3->2->2->1->2->3->1
4th Round
1. An expression is given.
[] can enclosed [], {} and ()
{} can enclosed {}, ()
() can enclosed only ()
Check that brackets in the expression are valid or not according to enclosing condition and opening
closing condition.
Follow UP:
Two arrays are given.
One array contains symbols and second one contains expressions. Symbol array contains opening
symbol at even index and closing symbols at odd index just after opening symbol. Index is starting
from 0. Opening symbol at index i can only contain symbols from i to 2n-1, If there n pairs of
symbols.
Now check that expression in the expression array is valid or not.
2. There are m sorted arrays of each size n. You have another array B of size m*n. Fill the array B
from the m arrays in sorted order.Give the optimal solution.
I liked the way interviewers were interacting. They were very supportive and friendly as well.
This article is compiled by Viswas. Many Many congratulations to Viswas. If you like GeeksforGeeks
and would like to contribute, you can also write an article and mail your article to
[email protected]. See your article appearing on the GeeksforGeeks main page and help
other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-12/
Microsoft Interview | Set 10
Written Test
It was online test which contains 20 MCQs on C & C++.
Given some text lines in one string, each line is separated by ‘\n’ character. Print the last ten lines. If
number of lines is less than 10 then print all lines.
1
2 3
4 5 6 7
Print it as
1
23
4567
Technical Round 1
First he asked me to tell him about any project which I have worked on.
Given an array of integers. Find consecutive elements in array which has maximum sum. I know the
solution to this problem so I told him quickly.
Next he modified the question and asked me to find consecutive elements in array that have sum
equals to zero. Taking some time, I told the answer to this question also.
Next he modified question again and asked me to find consecutive elements in array that have sum
close to zero, given that there is no sub array with sum equals to zero. Also write test cases for it.
Technical Round 2
Given a linked list. How will I detect whether the list has cycle? Also write test cases for it.
He then asked me whether I have some knowledge of graphics programming. He asked me how I will
implement ‘floodfill’ for graphics application. Write code and test cases for it.
Technical Round 3
Given a 2D array and a key value. Search this key value in array and turn all elements in row and
column of this key to zero.
Given a sorted array of size n. Each element in array is unique and lies from 1 to n+1. Find the
missing element. Write code and test cases for the same.
Technical/HR Round 4
Given a string. Find a character with most number of occurrences. Write code and test case for same.
HIRED
I would like to thanks geeksforgeeks team for this wonderful site which helped me a lot and without
which I would not be able to crack this interview.
This article is compiled by Akash Gupta. Many Many congratulations to Akash Gupta. If you like
GeeksforGeeks and would like to contribute, you can also write an article and mail your article to
[email protected]. See your article appearing on the GeeksforGeeks main page and help
other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-set-10/
Groupon Interview | Set 1 (SDE Profile -
Fresher)
Hey Guys, I am sharing my experience with Groupon.
Example
Grid(100*500)
Robot Position – (5,3)
Sequence — {N,S,M,M,E,W,E,S,M,S,M} North, East, West, South, Move forward
Problem is easy, but they want it on shared editor which will give them chance to ask so many
questions whatever you are writing or if u r doing undo operation. They asked me for the perfect code
for all boundary cases. I did it well.
I quickly told them my approach, they said ok. Now they make changes in the question. You will have
to print it level by level with line break. So I gave them one another method which works in O(n) but
they told me to make changes to the first approach. I made changes to the solution, they were satisfied
with it, then told me to code it. Again they asked me questions in the code. At last they were very
satisfied with the code, I was able to make quick changes according to them or if I have missed
something
1) You have a binary tree on client machine, how will u send this info to server and how will you
again maintain the tree over the server. I thought few mins, tell him my approach, he was asking for
easier way. Then finally I told him my approach. He was satisfied and told me to write the code how
and what info will u send and how will u again maintain it on the server, I write both the codes and
He was very satisfied with my code.
2) You are given a graph and an algorithm that can find the shortest path b/w any two nodes
Now you have to find the second shortest path between same two nodes. I thought few mins and tell
him my approach, he was satisfied and told me to code it.
DS questions:
4) Connect nodes at same level, then code for that, then test cases
5) Some questions based on complexity and which will be the better
6) Which sort will u prefer for linked list and why?
7) In a grid, you are given a position, and every location has some value. find the shortest length so
that you can touch to any boundary of the grid. I code it then she asked me to optimize it, I did that
also.
8) Some other questions but I don’t remember now.
Finally hired by Groupon. Special thanks to GeeksForGeeks team, really amazing site for DS
questions. That’s all for the Groupon. Overall it’s not difficult if you are good in DS. Most of the
questions are very popular and you had already prepared. They are focusing on your approach and
your coding skills.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/skype-interview-set-1/
Microsoft Interview | Set 11
Company – STB team, Microsoft IDC.
Location – Hyderabad.
First interview
1. A quick introduction.
3. Write a code to find out longest substring without any repetition of characters with O(n)
complexity.
Ex.
String – abcdefghaxyzpbn
Output string – bcdefghaxyzp
4. Two linked lists are merged at one point. Find the merging node.
Second Interview
1. A quick introduction
3. If you have huge log file, you need to print last ‘n’ lines from the log file. Write a code for it
assuming regular file read operations.
He was also expecting that the page hit is minimum.
I had provided a solution which would read the file one by one and then will store it in a ‘n’ size
circular linked list.
4. If you have a m*n floor, find out a ‘k’ size square tile which will take care of filling the complete
floor without breaking of tile.
Use GCD logic.
Third interview
1. A quick introduction and he also asked what was asked in previous interviews.
2. We have a m*n matrix, every element in row is in increasing order and every element in column is
in increasing order. Find out a position of element ‘k’ from the matrix with O(m+n) complexity. Write
a code for it.
3. We have a ‘n’ steps and a ball which take either 1 step at a time or 2 steps at a time. Find out the
number of possible ways it covers exactly ‘n’ steps.
This article is compiled by Girish. If you like GeeksforGeeks and would like to contribute, you can
also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-set-11/
Qualcomm Interview | Set 1
Company : Qualcomm
Position: Summer Intern(Software)
Written Test
It was an online MCQ test. Time limit was one hour. There were around 55 question. It consists of
three sections:
1) Aptitude Questions
Pretty simple.
2) Programming ability :
Patience is required to solve the questions. They were easy. Most of them had 3 to 4 nested loops.
3) Third section had questions from OS, CA, C++, DBMS. Most of them were from OS.
3) Volatile Qualifier
6) Toggle only second bit of a 8 bit char(both from right and left). Write one line code.
12) Drivers
13) CPU scheduling algorithms (one of my projects was on this). What and where each one of them
should and shouldn’t be used. Advantages and disadvantages, if priority is considered in each one of
them. If already considered how it is affecting.
17) How will you improve any of your algorithm:discussed on space and time complexities.
2) She asked me about my projects, how you can enhance them, how they are useful to me.
3) Weakness, anything interesting thing about you that you can tell me.Examples for them.
6) What do you like more while working in a project , conceptualizing e.t.c and why?
Selected.
This article is compiled by Tapasweni Pathak. Many Many congratulations to Tapasweni. If you like
GeeksforGeeks and would like to contribute, you can also write an article and mail your article to
[email protected]. See your article appearing on the GeeksforGeeks main page and help
other Geeks.
Source
http://www.geeksforgeeks.org/qualcomm-interview-set-1/
Amazon Interview | Set 13
Round 1 (Telephonic)
Q1. For a given number, find the next greatest number which is just greater than previous one and
made up of same digits.
Q3. Clone the linked list having an extra random pointer in nodes which is pointing random node in
the list.
Round 2 (F2F)
Q1 In a binary tree, a random pointer is given in each node. If this pointer pointing other than any
successor of the node then set it as NULL. Otherwise let it remain untouched. Write code.
Q2. You will be given the number of pairs of parenthesis. Find out the total possible valid unique
combinations and there should not be any duplicity. Write code
Round 3 (F2F)
Project and some questions related to it.
Q1 Given an in-order traversal of a special binary tree having property that the node is always
greater than its left and right child. Construct the tree and write code.
Q2 Find top 10 trending words inserted by users in sites like twitter. Only algorithm.
Q3 write an efficient code to find the first occurrence of 1 in a sorted binary array. (2 minutes only)
Round 4 (Telephonic)
Q1. Remove duplicated from a string in O(n) without using hash.
Round 5 (F2F)
Amazon has many visitors to its site. And it tracks what pages the customers visited, etc and other
stuff.
Make an efficient data structure for storing 3 days of information of all those customers who have
visited site exactly two different days and searched more than 3 unique pages of the site in those 2
days.
So whoever visited site exactly two days out of these three days and visited more then 3 unique pages
should be in the contact list.
After final round got a regret mail after 3 days that I was Not selected.
This article is compiled by Ramendra. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-13/
Strand Life Sciences Interview | Set 1
Name – Saurav Kumar Singh
Course – Dual Degree (Computer Science & Engineering) IIT Delhi
Company- Strand Life Sciences
Visiting place- IIT Delhi
Date- 2nd December 2012 (second placement day)
Posting – Bangalore
2 Rounds
3) Nut – Bolt problem- there are n nuts and n bolts and we have to mach every nut bolt pair
efficiently. two bolts or two nuts cant be compared. But for one bolt and one nut it can be said that
bolt is undersize or oversize or exact fit for the nut. ( O(nlogn) solution expected)
4) given the design of physical square root calculator. Give the explanation how does it work. ( I can
give more details of this question is you want)
5) There are two vessels of capacities “a” and “b” respectively. We have infinite water supply. Give
efficient algorithm to make exactly 1 liter of water in one of the vessel. you can throw all the water
from any vessel any point of time.
6) Given 3 rubber bands and you have to entangle these bands in such a way that if you cut any of the
3 bands, other two rubber bands get free. Draw diagram for 3 bands. Also give methodology for “n”
rubber bands.
I scored 87/100 in first round and was one among the 5 shortlisted students from 173 students
participated in first round.
1) There are n points in 2-D space. Give an efficient algorithm to output all the quadruples which
form square.
first i gave crude solution of O(n^4) to check all the quadruples whether they form square or not. then
i modified my solution to check for 3 points whether they can form the square of not and if they can
form they make sure that 4th point exist or not. To check the existence of 4th point i suggested
Hashing. Then they asked the next question
2) How is HashMap implement in java internally. Means what hash function does java use internally.
Both in case of integers and in case of other objects. I answered this question correctly (Hashcode)
3) for the first question they asked me to use binary search to search for the 4th point. Asked me about
the comparator to sort the points. Finally i gave O(n^2logn) solution to first question. because we
need to consider only 2 points and check for other 2 points using binary search.
4) Asked to code every thing for first question from scratch to check my coding skills
5) Given a statement with space omitted ( e.g. “thisisatest” for “this is a test”). You are given a
function isWord(String input) which check whether a word is correct dictionary word or not. You
have to print all the valid statement which can be formed from given string with space omitted.
Initially I gave recursive solution for the problem which was correct. They asked me to given
dynamic programming solution for the question. Finally i gave a dynamic program for the same.
7) Asked me about my final project which is in area of approximation algorithm. Also asked me about
my future plans.
Finally I got an offer from Strand Life Sciences on the same day after 20 minutes.
Many Many congratulations to Saurav Kumar Singh. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/strand-life-sciences-interview-set-1/
Facebook Interview | Set 1
I am a final year student of IIT Guwahati and the first phase of placements has just finished at our
college. I was recruited by Directi but not before three grueling rounds of interview. I was also
shortlisted by Microsoft, Facebook and Goldman Sachs as well but got rejected after the first round
of interview from all the three companies :(. I will be posting questions relating to all the companies I
was interviewed by as well as some interview preparation advice (which should be particularly
useful for students sitting for on-campus placements). Following are Facebook interview questions
Round 1:
1) Given a string, check if it is a palindrome by ignoring spaces. E.g. race car would be a
palindrome.
2) Given two very large strings, consisting of only digits, multiply the two strings and return the result
as a string.
This article is compiled by Vikram Goyal. Many Many congratulations to Vikram for his selection in
Directi. We will be soon publishing other interview experiences as separate posts. If you like
GeeksforGeeks and would like to contribute, you can also write an article and mail your article to
[email protected]. See your article appearing on the GeeksforGeeks main page and help
other Geeks.
Source
http://www.geeksforgeeks.org/facebook-interview-set-1/
Coding questions:
1) Given a very large string, print the last ten lines.
Interview Round 1:
1) Find the output:
void print()
{
char str[20] = “hello world\0”;
int i=0;
while (str[i]!=’\0’)
{
printf("%c", str[i]);
i++;
str[i] = str[i-1];
}
}
There was a very detailed discussion on this question for nearly twenty minutes. I think I kind of
screwed this one. Basically, I had to explain how and why does a segmentation fault occurs.
2) Suppose a linked list contains list of documents containing a particular word. You are given two
such linked lists and you have to print names of all documents that contain both these words. [I gave
an algorithm based on the assumption that the list contains document names in sorted order]. I was
also asked to write the code regarding this. This operation can be classified as (A and B), where A
and B are the words and they have lists associated with them. He then moved on to more complicated
cases such as (A and B or C and (not D)). Brackets may or may not be presented. I was only asked to
give an algorithm corresponding to this.
3) What are the steps that occur when you send an E-Mail. A detailed discussion was done regarding
this wherein we also discussed about the layers of the OSI model, the protocol used for sending E-
Mail, the layer to which it belongs to.
This article is compiled by Vikram Goyal. If you like GeeksforGeeks and would like to contribute,
you can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/mircosoft-interview-12/
….First one tested us on the concepts of probability. I don’t quite remember the questions but one of
them asked us to find the Eigen values for a given matrix
….Second one tested our coding skills. Few of the questions I can recollect:
Given a number find the next largest palindrome number (e.g. if number is 100 then the next largest
palindrome is 101).
….The third paper tested our knowledge of computer science subjects. It was mainly focused on
Networks and required us to know the basics of TCP/IP, time to live (TTL) etc.
Interview Round:
1) Tell me about yourself. (This was totally unexpected!)
2) Find the probability that three points chosen on a circle lie on the same semi-circle.
3) In a matrix a saddle point is defined as the point such that, it has the maximum value in a
corresponding row and the minimum value in the corresponding column. Given a NXN matrix find the
maximum possible saddle points.
4) Given that you toss a fair coin, what is the expected number of tosses required before you get n
consecutive heads?
This article is compiled by Vikram Goyal. If you like GeeksforGeeks and would like to contribute,
you can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/goldman-sachs-interview-set-1/
Directi Interview | Set 1
Written Round:
1) Given a binary tree, such that each node contains a number. Find the maximum possible sum in
going from one leaf node to another.
2) Suppose you have some guests arriving at a party. For each guest, you are given the arrival and
departure time. When a guest arrives he is given a wine glass and when he leaves he returns that wine
glass (it becomes available to be given to another guest). Find the minimum number of wine glasses
needed to serve all the guests. The arrival and departure team can only be between 1800 to 2359
hours.
Interview
Round 1:
1) Suppose you have strings like A, B…, Z, AA, AB, ….AZ and so on. This is similar to the way the
columns of excel are named. Given a number you have to find the corresponding string. (e.g. 27
would map to AA). I had to give the algorithm and write the pseudo code for this.
2) Given n biased coins, with each coin giving heads with probability Pi, find the probability that on
tossing the n coins I will obtain exactly k heads. I had to write the formula for this (i.e. the expression
that would give us P (n, k)).
3) Given n positive real numbers, find whether there exists a triplet among this set such that, the sum
of the triplet is in the range (1, 2). Do it in linear time and O (1) space.
Round 2:
1) Suppose we have three positive integers A, B, C. We randomly choose an integer a in the range
[0,A] and an integer b in the range [0,B]. Find the probability that a + b2) Repeat the above problem
for the case when A, B, C are three positive real numbers.
3) Given a regular expression and a string (that apart from characters only contains *). Find whether
the string satisfies the regular expression. Once the initial solution was given, a good amount of time
was spent in considering all possible edge cases and tweaking the algorithm to solve those edge
cases.
What is an IP address?
Given the different prices of a stock over a time period, find the maximum profit that a person can
make by buying and selling the stock within the given time period. The number of such entries can run
into millions, so time complexity is important. E.g. the prices are 70, 60,100,150,110. The maximum
possible profit in this case is (150-60=90).
This was the end of the telephonic interview. Probably he was in two minds after this because I was
called again after 10 minutes, and two quick questions were asked:
Interview advice:
. College students spend majority of their time doing problems related to data structures and
algorithms. However most of students ignore the other core CS subjects. You MUST devote equal
time to these subjects, because almost all companies require you to possess a solid understanding of
the basic fundamentals of Operating Systems, Databases, Networks, Classes (depending on the
profile they are hiring you for).
. The way you express yourself is really important. If you are unable to express yourself clearly or
lack enthusiasm organizations would see that as a potential red flag. If you are weak in English,
practice speaking in front of a mirror (believe me, it helps) or still better give mock interviews to
your friends.
. Think out aloud. Whatever idea comes to your mind, share it with the interviewer. Always start by
giving a brute force solution to the problem (it helps the interviewer know that you have understood
the problem).
. Don’t give up on a problem until the last moment. Keep on discussing things with the interviewer; he
will give you hints if you are on the right path.
This article is compiled by Vikram Goyal. Many Many congratulations to Vikram for his selection in
Directi. If you like GeeksforGeeks and would like to contribute, you can also write an article and
mail your article to [email protected]. See your article appearing on the GeeksforGeeks
main page and help other Geeks.
Source
http://www.geeksforgeeks.org/directi-interview-set-1/
Amazon Interview | Set 14
Team : Transportation
Location :Hyderabad
Q2. Swap the alternate nodes in a singly linked list( not the data);
Q3. Minimum no of coins required to get the given sum. Coins are given in a sorted array.
Shrikanth 20 50 60
Kiran 30 80 90
Q1. Print the level order of binary tree such that each level should print in a different line
Q2. Push() and Pop() methods of stack are given. Write a function to get the minimum of stack in O(1)
time
Q1. Connect nodes at same level in a binary tree( may not be a complete binary tree) without using
recursion
Q2. Sort the linked list which contains only 1,2,3 numbers in a single pass
Q2. Given a linked list contains even and odd numbers. separate the list into two lists contains
odd/even numbers.
Q3. Given a 2D matrix which contains 0’s and 1’s. Given two points of matrix whose value is 1. Find
the path(with only 1’s) between the given points
Q1. Given a large file which contains m rows and n columns. Given a column no, sort the column in
such a way that corresponding rows also sorted
Q1. Print all pairs(sets) of prime numbers (p,q) such that p*q <= n, where n is given number
Q2. Given a binary tree, if parent is 0, then left child is 0 and right child is 1. if parent is 1, then left
child is 1 and right child is 0. Root of the tree is 0. Find the kth node value which is present at Nth
level
This article is compiled by Shrikanth. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-14-2/
Amazon Interview | Set 15
For the position SDE I.
I had an online test through interviewstreet and following were the questions:
http://www.geeksforgeeks.org/archives/9999
http://www.geeksforgeeks.org/archives/8615
http://geeksforgeeks.org/forum/topic/microsoft-interview-question-for-software-engineerdeveloper-
about-arrays-10
http://www.geeksforgeeks.org/archives/1155
F2F Interview :
1. Generate all valid permutations using ‘(‘ and ‘)’. Valid permutation is the general definition of
valid sequence of the opening and closing brackets.
I told him a solution where we would generate a combination using a recursive solution and prune the
cases where a valid combination is no longer possible. The solution was fine and not that difficult.
But the interviewer was very interested in knowing if I can calculate the complexity of the solution.
He gave me some hints but it was just not striking me. I told him my approximate answer. We moved
on.
The solution would seem simple. But since the matrix is N*N, the interviewer wanted some tricks to
reduce the complexity of the write operation on the matrix.
I told him a solution where you can initialize the matrix with all zeros and only write 1 for the
ancestor cell using a modifies recursive solution and linkedlist.
He was fine with the solution
F2F 2:
1. Find the maximum weight node in a tree if each node is the sum of the weights all the nodes under
it. Obviously tree nodes can have negative weights.
2. Kadane’s algo
F2F 3:
eg:
Tree is:
1
2 3
4 5 6 7
would become:
1
2-->3
4--->5--->6--->7
F2F 4:
Detailed discussion on projects I did in college and about my interests.
This article is compiled by girlforce. If you like GeeksforGeeks and would like to contribute, you can
also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-13-2/
Amazon Interview | Set 16
I recently appeared for amazon which came to our campus. Here is my experience.
Shortlisting Round.
There were 20 MCQ and 2 programming questions. Each correct answer carried 1 mark and -0.25 for
a wrong answer. Programming questions were:
a. Given a number with the number of digits in the range of 10-50, find the next higher permutation of
the number. If such a number doesn’t exist, return -1.
b. Given an array of strings, you need to find the longest running sequence of a character among all
possible permutations of the strings in the array.
INPUT:
ab
ba
aac
OUTPUT:
a,3
T1
a. Given link list segregate odd elements first and even elements afterwards.
b. Given a BST of memory sizes. Find best fit for a memory block of size M.
T2.
a. Given 2 sorted arrays of size m and n+m(with n elements) , merge
them into the latter..
b. Given a character array find the first element that repeats itself.
T3.
a. Given a binary tree connect all nodes in a level through link list.
b. Some question related to share market which boiled down to find maximum difference between
two elements such that second element appears after the first one.
c. What is thrashing ?
I was hired .
The interviewers were very friendly, patient and looked for optimal solution to each question .
I am very thankful to geeksforgeeks for such a great site and the way its maintained.It really helped me
Thanks.
This article is compiled by Ayush. Many Many congratulations to Ayush for his selection in Amazon.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-16/
Software Engineering Lab, Samsung
Interview | Set 1
We recently had SEL, Samsung for Campus Recruitment.
Based upon the total from the above 2 rounds, students were shortlisted for the next round.
Question 2: Given a string, say “GEEKS FOR GEEKS”, print it in reverse manner eliminating the
repeated characters. I know the question is easy. But, they wanted high amount of optimization both
space and time wise.
Technical Round 1:
i) The above two questions were discussed. I didn’t look for some optimization, which interviewer
pointed out.
ii) He asked about the language I was not comfortable with, I replied with C. Then the next question,
Write a function in C to reverse a string in-place. Luckily, I scraped through successfully.
iii) There were questions on OS a C++ like what is deadlock, virtual functions, pure virtual fucntions,
real time OS.
Technical + HR Round 2:
i) He too discussed the Algorithm Written Round.
ii) He asked me to design a class on “Staplers”. Did it good.
iii) Then there were some general HR questions. About my roles and responsibilities at the college,
hobbies, etc.
This article is compiled by Chirag Gupta. Many Many congratulations to Chirag for his selection. If
you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/software-engineering-lab-samsung-interview-set-1/
Directi Interview | Set 2
There was 1 online coding round, followed by interviews.
1st question Sandeep and Pali want to go on holiday. Their parents have given them a list of cities
they can visit. A list may contain a city more than once. Both of them want to go to places of their
parents choice. As they want to travel together, they have to agree upon a common route. No one
wants to change the order of the cities on his list or add other cities. Therefore they have no choice
but to remove some cities from the list. Of course the common route is to involve as much sight-
seeing in cities as possible. There are exactly 26 cities in the region. Therefore they are encoded on
the lists as lower case letters from ’a’ to ’z’.
Input:
1
abcabcaa
acbacba
Output:
5
[question is similar to LCS ]
Interview Round 1
He asked me two questions
1. You are given two array, first array contain integer which represent heights of persons and second
array contain how many persons in front of him are standing who are greater than him in term of
height and forming a queue. Ex
A: 3 2 1
B: 0 1 1
It means in front of person of height 3 there is no person standing, person of height 2 there is one
person in front of him who has greater height then he, similar to person of height 1. Your task to
arrange them
Ouput should be.
312
2. Your are given an array of integers and an integer k of window size, you need to find minimum
value in this window.
Ex. A: 1 2 3 4 5 6 and k = 3
Then output will be: 1 2 3 4
This question is similar to Maximum of all subarrays of size k
This article is compiled by Nitin Gupta. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/directi-interview-set-2/
Nitin Gangahar has long list of achievements to his name and an amazing
placement offer by, arguably, the best company in the world (no prizes for guessing this – it’s Google)
is just one of them. Also, he has been a part of some really interesting research at the University of
British Columbia and he is, at present, a research assistant at the well-known Chennai Mathematical
Institute (CMI). We, at TopTalent.in, spoke to Nitin Gangahar and here are some exclusive nuggets of
knowledge from our conversation!
Team TopTalent.in: We wouldn’t be exaggerating when we say that programming has been a big
thing in your life. How and when did you start with programming? Can you list out some
resources for beginners?
Nitin: I personally started programming when I was in school. Python was my first official language,
though I had seen some code in other languages before that. It depends a lot on when you start finding
it fun – don’t do it if doesn’t seem fun initially. High School is a good time to start learning if you are
interested. A lot of my friends didn’t know about programming till they came to their sophomore year
in university and they are much better programmers than me. So, it doesn’t matter much when you start
off this path.
In this context, I would also like to mention this really inspiring article, one of my personal favourites
– Teach Yourself Programming in 10 years by Peter Norvig.
Team TopTalent.in: Is it important to know multiple languages like C / C++ / Java / Python /
Perl or knowing problem solving concepts?
Nitin: Knowing more languages which work on different paradigms always helps a lot. Eric S.
Raymond was my childhood hero and he once mentioned in this article titled “How to be a Hacker”
(http://www.catb.org/esr/faqs/hacker-howto.html) – It’s best, actually, to learn all five of Python,
C/C++, Java, Perl, and LISP. Besides being the most important hacking languages, they represent very
different approaches to programming, and each will educate you in valuable ways.
Learning a programming language can take years, provided you want to know the ways to exploit the
uniqueness of the language really well. Getting comfortable with the syntax is just the beginning.
Nevertheless, Problem solving concepts are something that each programmer should be well-used to.
For instance, I believe that a good programmer wouldn’t face any problem when asked to code a
breadth-first search or come up with a simple recursive equation for a problem.
Team TopTalent.in: What is competition programming? Can you name some you took part in?
Nitin: Competition programming is more about people than about it being an activity. It’s just about a
group of people who like to challenge others with problems based on programming and math, and
expect others to come up with the solutions. It’s really a fun thing to do, especially if you love solving
puzzles and love solving problems using a computer.
My team mates and I were aiming to go for the World Finals of ACM-ICPC (International Collegiate
Programming Contest), which is one competition that is close to all the people who pick up
competition programming at the university level. At the school level we have, IOI (International
Olympiad in Informatics). TopCoder is a website which is open to all age groups and both
professionals & students are active on it. In addition there is Sphere Online Judge and Project Euler,
which own good collection of problems.
For starters, ICPC is a good aim to fix. Your skill set rises, for sure, when you are solving problems
on such a regular basis, and hence, it helps you to solve interview questions as well. However, one
must keep in mind that the prime motivation for doing competitions must not be to win jobs because it
would be like drawing fixed boundaries around one’s skills.
Team TopTalent.in: What are the benefits of programming in teams? Do you advise a study
group for this?
Nitin: Team programming helps you to learn a lot. My team mates – Ravi and Manu – taught me a lot
over the past 2 years. Manu always possessed a different style of thinking, which helped Ravi and me
learn a lot, especially to develop different problem solving approaches for different kinds of
problems. Ravi taught me how to convert an unknown problem into smaller known problems and how
to apply the training he gained from other places to a new problem. Team programming always helps
you to think of a problem in way different from any approach you would’ve followed in solitude.
It would be great to see more ICPC teams from Indian universities. We started a Google Group for
our students so that they can share and learn. These days, it is decently active but there is a huge
scope of improvement. Study groups might drift a little away from the core objectives as people will
want to do things differently. In my opinion, small and focused teams would be better off vis-à-vis
study groups.
Team TopTalent.in: What steps should campus students take in enhancing the college coding
scene?
Nitin: Forming teams would be a good first step. Local competitions are another great initiative. IIIT-
Hyderabad has been really active in organizing local competitions and the number of teams at ICPC
Regionals from there keeps increasing each year. It’s really amazing to see them grow. An online
group for university students would be another good start.
Team TopTalent.in: What are your tips for creating a perfect 1 page resume?
Nitin: This may sound corny, but the best way to come up with a perfect 1 page resume is to work
hard during your undergrad years and pursue actively what you like to do. More often than not, it
might just get mundane and boring, but then learning and excellence should drive you to continue. If
you can proactively do that, and work for enough number of competitions/projects, you might not win
a lot of prizes and tonnes of goodies, but in the end you would have learnt enough to fill up one page
on a resume.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks
Source
http://www.geeksforgeeks.org/nitin-gangahar-on-the-many-benefits-of-competition-programming/
TransBit Interview | Set 1
Procedure: 1 written test, 1 paper coding round, 2 technical + HR round.
1st Written Test: This was really a good written test including C/C++, OS , aptitude, DS and Algo.
1. You are given two strings like where first string is like “a?b$c+ “, here A? means either A comes
zero time or more than one time B$ means either B comes one time or not occur C+ means either C
comes zero time or more than one time. The second string is a normal string, check whether the
second string follows the first string pattern.
2. You are given a M x N matrix of non-negative integer, you need to find a square K x K matrix such
that sum is maximum in that square matrix. (0
3. You are given a matrix of integers and your task to find an element which is maximum in the row
and minimum in column.
7. What you know about java. How much time will you take to learn java? How java is better than
C++, where java is appropriate as compare to C++ and where C++ is more appropriate then java.
Write a sample code in java to perform task (question no. 3)
Rest I forget, there were two more questions on Real life application.
1. You are given a matrix such that it is sorted in row as well in column. You need to find an element
“k” in it with minimum complexity.
2. A sorted, rotated array was given and need to find an element in it (he was surprised when I wrote
that code in single scan in O(logn) time complexity).
This article is compiled by Nitin Gupta. Many Many congratulations to Nitin for his selction. If you
like GeeksforGeeks and would like to contribute, you can also write an article and mail your article
to [email protected]. See your article appearing on the GeeksforGeeks main page and
help other Geeks
Source
http://www.geeksforgeeks.org/transbit-interview-set-1/
Microsoft Interview | 13
Microsoft has mainly 2 written test followed by 2/3 interview including HR round.
1st Online Written Test: This written test was easy, only C/C++ (easy questions) and some of OS
and Microprocessor question were there, Total count was 20.
2nd Online Test: In Second round, there were two problem to code (they provide us editor, Pariksha
Lite)
1. WAP to print last 10 lines of given string. If string has less than 10 lines then print whole string,
lines are separated by ‘\n’ . [Ans. There are two app. (i) Top to down (ii) Bottom to up ( this is
efficient ) ]
2. A Binary Tree is given, print nodes value, level by level separated by ‘\n’ [Ans. Level Order
Traversal ]
1. WAP to print the first unique character in a given string, make sure your program should run for all
corner cases as well. {Ans. It is easy, use hashing with counting method, time and space complexity is
O(n) and O(1)}
Then he told me how you will test your program followed by the test case.
2. You are given a square grid of nxn, you need to print the circle form by it in clockwise direction.
for example
12
45
then output : 1254
123
456
789
then output: 2684
[Ans. It is easy to code using two successive loops. Have a look a similar question “Print element of
matrix in Spiral Form”, Refer Geeksforgeeks]
2. At 10:30 what is the angle between hour and minute needle. [ you can do it ]
3. Puzzle: you have two eggs and 100 story building; find the top floor from which both of the eggs get
break.
4. WAP to word by word reverse a given string. Ex. Given string is “Hey hi how ru ?”. then print “?
Ru how hi hey”. Test your program for corner cases. Write test cases for your code and what happens
if the given string is too long without separated by space that cannot be accommodate in given
memory . [easy to answer]
5. Convert Singly and Doubly sorted linked list to BST and optimize it.
[Can be solved in O(nlog(n)) and O(n)]
1. Wap to find paths from root to any leaf such that sum is equal to given sum.
{ans. It is easy to do, use logic of root to leaf path}. Rest I forgot..
This article is compiled by Nitin Gupta. Many Many congratulations to Nitin for his selction. If you
like GeeksforGeeks and would like to contribute, you can also write an article and mail your article
to [email protected]. See your article appearing on the GeeksforGeeks main page and
help other Geeks
Source
http://www.geeksforgeeks.org/mircosoft-interview-13/
Symantec Interview | Set 1
Interview Type: Campus Placement
Procedure: 1 written test followed by 2-3 interview round.
Written test: It was online, consist 20 questions of C/C++, Data structure , Algorithms , Operating
system, Unix network programming, Networking and aptitude.
1st Interview
This interview was tricky; he asked my following questions.
1. Tell me about yourself.
3. Design classes for File and folder structure and write procedures.
5. What is interface? How will you design it, advantages and disadvantages and all
6. Real life example of Circular Linked List, Linked List, Circular Queue and Binary Tree.
(ii) How far Haridwar from Roorkee, how much time it will take if I go by bus and by walk.
(iii) Why Chapatti are round, why moon is spherical, why shape of bread is rectangular etc.
They were testing my bluffing knowledge and sharpness of my mind and how you bluff accurately.
This article is compiled by Nitin Gupta. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks
Source
http://www.geeksforgeeks.org/symantec-interview-set-1/
Nvidia Interview | Set 1
Following is my interview experience for NVIDIA internship.
Round 1:
Round 1 was a combination of HR and Technical.
In this round, I was asked about myself and about my Project. The interviewer was all the time asking
about my project during 20 min (because my project was related to NVIDIA), and in last 15 minutes,
he asked me simple questions on C/C++.
Question 1 You are given two Vectors of number, how will you get Dot product? [Dot product of
vectors :)]
Question 2: How will you allocate dynamic memory for two dimensional array
Question 3 : Do you Know ASM Language (I said very little). So he asked me to do Question 1 in
ASM (I have told him basic logic that how can we do it in ASM)
Now he asked me, if Numbers in Vectors are n=16 bit long then the resultant Number of bits?
[Ans: 3n-2 where n is number of bits in numbers]
Round 2:
1. Difference between Macro and Function [he required a deep knowledge of it, so I
answered in terms of Compile time execution, run time execution, Stacks and Instruction pointer
(Program Counter)]
2. Write a function to calculate Compound Interest with restriction. [I told him sorry sir I forget
formula of it, so he gave me formula for compound interest, t = P.(1+(r/n)^nt]
3.You have a silver rod of 7 inches, now a person visit your home and ask for 1 inch of rod every day
in a week. How much minimum number of cuts required in a Week? [Ans. Is in power of Two 1,2,4
(can you find why? Try ok)]
Round 3:
This round was totally based on my project and two aptitude question asked to me at last
1. You have given a number such that
N = 1! + 2! +…………+58! now what is the reminder after dividing it by 56?
[Ans. apply 56 divisible method (break 56 in two co-prime number 7 and 8) then divide by them and
calculate it ]
2. You have Given a Cuboid Cake and a little child comes and cuts a little cuboid piece of cake ,
Now your task is to divide the remaining Cake in One shot in two equal Parts [first I gave him 2
wrong ans. he said me ‘try again’ and at last, I have him a correct ans. Answer:- Cut the cake with
line joining the mid-point of that rectangle and cake.
Finally I asked two questions related to the new release of Architecture Keplar. The interviewer was
cool guy.
This article is compiled by Nitin Gupta. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/nvidia-interview-set-1/
Adobe Interview | Set 4
Date Of Interview: 3rd December 2012
Written Round
The written round consisted of three sections 45 min each. The first was an objective type which
consisted of 30 MCQs on basic Mathematical and Logical problems. Then there were 2 subjective
papers each consisting of 10 questions. One was based on C programming and the other on basic
engineering concepts.
Interview Round 1
Model a datastructure for a DFA that takes an event as parameter and performs a desired action.
Write a code that efficiently counts the total Set Bits in a number.
Write a code that efficiently calculates X power n where x and n are integers.
Write a code that efficiently calculates the nth term of Fibonacci series (He wanted a logn solution).
Interview Round 2
There are 25 horses and a track which can race 5 horses at a time. Find the top 5 horses in minimum
number of races. Assuming best horse always wins.
Interview Round 3
What do you know about Volatile keyword explain with an example code.
Declare an array of function pointers that return a pointer to a func that in turn return a pointer to a
char array.
Given a Roman notation of a number convert it into its decimal number. Write a function to do this.
Given a string, find the length of the longest substring with distinct characters.
Interview Round 4
HR Round: Normal HR questions
HIRED!!
Many Many congratulations to Saransh. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-set-4/
[TopTalent.in] Exclusive Interview with
Ravi Kiran from BITS, Pilani who got
placed in Google, Microsoft and Facebook
Even if we were to search around the world, it would be a truly difficult job to find someone like
Ravi Kiran. As a Computer Science Graduate of BITS Pilani – Pilani Campus, he successfully
bagged job offers from an astounding three companies – all being some of the best and most
admired companies in the world – Google, Facebook and Microsoft. We, at TopTalent.in, managed to
talk to this amazingly humble genius, who hails from Hyderabad.
And before we forget, Ravi has also agreed to share his resume with our users so as to help them with
their preparation. So don’t forget to grab a copy by logging in. Here is the exclusive interview in
its original form.
Team TopTalent.in: What were the similarities and differences between Google, Microsoft and
Facebook Interviews?
Ravi: All three of them share the prestige of being some of the best tech companies in the world.
As you would expect, their interviews are designed to ensure the recruitment of top talent.
An obvious similarity amongst their interview processes (for undergraduates, at least) is them
being vastly algorithmic in nature.
There are multiple interview rounds in each recruitment process. For Microsoft there were 4 while
Facebook conducted 3. For Google, I was a previous intern and, hence, faced just 2 rounds. Another
noticeable thing was the presence of design questions in one of the rounds by both Microsoft &
Google. However, by no means, can this be a generalization to the interview process of any of the
companies. At the end of the day, this only reflects how each of them is aiming to assess a candidate’s
potential to the greatest amount in the shortest period of time.
Team TopTalent.in: How did you choose between Google, Facebook and Microsoft?
Ravi: The more thought I put in the decision making process, the more confused I got. One of the
major things I believed was that none of them was going to be a bad decision, so it was always safe
to pick any one of them and not go wrong. Ultimately I chose Google, since I liked it as a company. I
must confess that it was mostly a gut-feeling based decision.
Team TopTalent.in: What is the kind of skill-set that companies like these, are looking for in
candidates?
Ravi: Even though I’ll keep one of the companies in mind, that is Google, to answer the
questions further on, I can safely say that this answer of mine applies vastly to the three of them.
The skill-set sought out is that a candidate must be creative, so as to come up with smarter and newer
solutions to problems, which are algorithmically very strong and don’t waste time solving already
solved ones. The candidates are supposed to be, obviously, good at programming so that they can
give shape to their ideas in the form of real code.
Team TopTalent.in: What should one keep in mind while creating a resume for these tech
companies?
Ravi: There are a lot of good references on “What makes a very good resume?” I had searched the
same, and stuck to whatever made the most sense. I highly recommend a 1-page crisp resume, so that
it’s easier to make an impression when someone glances at it for about 3 seconds (I’m guessing that
the time spent by a higher-up person on a single resume is nearly that)
In addition, it’s very important to make the resume highlight qualities and projects that provide enough
reason to believe why you would make the perfect candidate for the job. Prior programming
experience and other achievements would be useful to mention, to further your chances of making a
good impression.
Team TopTalent.in: Your advice to all the students out there who’re aspiring for job offers
similar to yours?
Ravi: I think it’s important to enjoy the field of work, and apply to only the companies that align with
one’s interests. In the long run, it would be hard to work in case the work doesn’t go with your
interests, even if the company is as nice as three mentioned above. I had never aimed to get into any
of these companies, and it has only been a consequence of the activities that I was actively interested
in (like competition programming, random problem/puzzle solving, etc) and thoroughly enjoyed.
Team TopTalent.in: What’s the difference between the work allotted in the Indian Office and
the US Office?
Ravi: I will speak about this question with respect to Google, since I have an experience in both the
offices. The work isn’t really any different across the offices. If you have a good project idea, you’re
always welcome to begin on it, and take it forward irrespective of which office you are from. I
myself have had the chance to intern with a very good team back in Bangalore. Work in MTV is going
really great too. That being said, the US office has more diverse project choices to offer, merely
owing to its larger size.
Team TopTalent.in: How can freshers/pass outs apply to these tech giants off campus? What’s
the process involved?
Ravi: Applying off campus is usually a simple process in these days. Most of the companies have
websites for application process, wherein one can just submit his/her resume, and expect to be
shortlisted. It is important to highlight the efforts of other companies that are providing interview
opportunities, through performance in online programming contests.
HR personnel of almost all companies are on a constant lookout for talented programmers, and
students performing well in the online programming contests have great potential. A good chunk of
people also get an interview call through the employee referral route.
Team TopTalent.in: And lastly, what are you working on at Google and how has the experience
been so far?
Ravi: I work in the Search Infrastructure team at Google, and the journey has been great so far.
Google’s a fun place to work for, and they ensure to provide one of the best work conditions possible
for an employee. It is very surprising how they provide so many amenities – for having fun and
indulging in non-work related activities and interests – but at the same time manage to provide some
really challenging work.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks
Source
http://www.geeksforgeeks.org/toptalent-in-exclusive-interview-with-ravi-kiran-from-bits-pilani-
who-got-placed-in-google-microsoft-and-facebook/
Amazon Interview | Set 17
Online Written round :
5 programming questions. You have to answer within 2 hours.
1. Swap two nodes in a linked list
2. Find kth smallest element in a binary search tree
3. Longest increasing subsequence in an array
4. One DP program
1st round :
1. Find whether given tree is BST or not
2. Boundary traversal of a tree
3. Print the border nodes of the tree
2nd round:
1. There are n number of points in a two dimensional plane. Find two nearest points
2. There are n number of points in a two dimensional plane . Given a point find k nearest points to it.
3rd round:
1. Given a matrix with random numbers in it , If a location has 1, make all the elements of that row
and column as 1
2. Given a matrix, find whether you can form the given number in
4th round:
1. Write a program to list all the possible words from the given set of data in the same order. ( eg :
given word : nokiamobile O/P : nokia mobile : given word : samsung O/P : 1. SAMSUNG 2.SAM
SUNG(considering sam as a word) )
2. Given two trees , find whether they are from same set of dataset or not.
3. Thread pool implementation.
This article is compiled by Yogesh. Many Many congratulations to Yogesh for his selection. If you
like GeeksforGeeks and would like to contribute, you can also write an article and mail your article
to [email protected]. See your article appearing on the GeeksforGeeks main page and
help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-17/
Category: Interview Experiences Tags: Amazon, Interview Experience
Works Applications Co., Ltd. Japan
Interview | Set 1
At 8:30 AM on 17th Dec., I heard my name from the recruiter, and that was the starting of a long
technical interview. I was the first one to be called for the interview. The interview was a live-
coding interview, where I needed to code on Eclipse, and that coding practice was to be seen by the
recruiter on the other computer connected with mine. To mention, Recruiter was very nice in nature,
and very fresh (as it was the first interview, that day) at that time. He started asking me about my
programming and technical interests. I told him that I love to do programming in C and Java, ad DS
and OS are my favorite subjects. Then he asked me, the very first code, it was just a modification to
be made to the programming assignment which I had submitted during the All India IT Talent Contest.
Then he asked for one more modification. Modifications were to add two more functions of finding
least 10% elements at any time in the Data-Structure and to reverse the Data-Structure at any time.
Then, he given me a fresh program to check, whether a given string is a sub-string of another given
string. Firstly I suggested normal O(m*n) solution and then he told me to optimize it. Thanks to
geeksforgeeks that I studied, KMP algorithm of pattern matching there and re-modified the code to
O(m+n) complexity. The he asked me a problem about segregating zeroes and ones in an array. Then
one problem was related to reduction of strings (consisting of a, b & c) & by replacing two chars
with the third one. Then he asked me a program on finding longest monotonically increasing sub-
sequence in an array. Again thanks to geeksforgeeks that I solved it in the normal fashion followed by
the Dynamic Programming solution. Then he asked me to print all such sub-sequences possible, not
only the first one. Then he asked me for making changes to the code, considering the fact that input-
values are Hexadecimal string not the Decimal values. I was not known to any predefined functions
capable of converting Hexadecimal string to Decimal value. So I wrote my own HexToDec and
DecToHex functions, and thus completed all the changes suggested by the recruiter. Finally due to my
good performance in the interview, recruiter was very happy regarding this. He congratulated me for
this & wished me best of luck for the next round.
Next round of interview was more about the basics of CSE. He asked me many questions from OS
(semaphores, process, deadlock, virtual memory etc.), one question about B Tree and B+ Tree and
some questions from multi-tier & client-server architectures. This round also went nicely. Then there
was an aptitude test consisting of questions from Logical Reasoning, Data Interpretation, Probability,
P&C and simple Quantitative Maths. It was an average test, so I attempted almost all questions.
Generally all the people who reach to this round, clear it, as only some people clear those tough
technical interviews.
Finally I reached to the HR interview, where interviewer asked me many questions about my areas of
interest, thinking behind relocation to some other country, family background and about my teaching
interest to The Enlightenment club members of NIT Agartala. Finally, after considering performance
in each round, She offered me a position of R&D Engineer at Works Applications Co., Ltd. I thank her
for offering such a lucrative offer. Then, she told me more about the company and its working
environment through her presentation.
I thank Works Applications Co., Ltd., geeksforgeeks, T&P Cell, my parents, my didi, my teachers, my
department, my institute NIT Agartala & my dear friends for all their guidance and blessings so that I
could get such a nice placement. At the end I should say that “where there’s a will there’s a way”.
This article is compiled by Saurabh Jain. Many Many congratulations to Saurabh for his selection. If
you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/works-applications-co-ltd-interview-set-1/
Microsoft Interview | 14
My name is Ravi Chandra. Today I have attended Microsoft interview in Bangalore. I was referred by
a consultant. Interviews were conducted for various positions in various teams in Hyderabad
development center.
I was not able to clear the first round. But let me share the question I faced to the readers of
geeksforgeeks.
Question:
All the phones stores contacts in some way. Primitive phones has less memory and less processing
power. So design a data structure which stores the contacts. This should use as less memory as
possible and support the algorithm to run efficiently. Basic operations on this data structure is given a
number, how to lookup contact name and vice versa.
Initially I gave a hashmap solution. But he said hashmap operations are costly because of collisions
etc… and asked me to provide a better solution. I proposed a linear search. But he wants a better
search algorithm.
Unfortunately the better answer struck me when I came out of the interview room.
That solution is like this. Assume each contact record has unique index value. Let us maintain two
sorted arrays of indices one based on phone numbers and one based on names. So the space used is
less and search runs in O(log n).
Since the phone is of limited features, the number of contacts are also limited, typically 500 to
1000 contacts. And the contact length will be limited, assume it is 64 characters.
A phone contains atleast two types of memory, flash and RAM. Flash stores software and persistent
data. RAM is used for processing.
There are various data structures to implement efficient searching. Quantitatively, as per our
hypothetical feature phone of 1000 contacts, each of 64 characters long, we need [1000 * 64 *
Nodesize] for the trie (an approximation). It is in the order of few kilo bytes. Where as we usually
have RAM of few mega bytes.
If trie seems to be costly to the planned RAM, we can use ternary trie or compressed trie. Or even
we can use radix based searching as someone pointed.
Since RAM is costly, we can allocate fixed size (say 1000) continuous blocks in flash memory to
store these contacts. All we need is a dynamic search feature to access these contacts. Trie can be
built in RAM whenever the user initiates search feature. Or even, since the data is constant, trie
can be stored statically inside flash memory itself. During contacts update, bring that trie to RAM
when search feature is called.
Note that a contact means set of data, not just phone number. It also include person name, contact
number (one or more), group, assigned speed dial number, picture, etc… Be data centric while
designing data structures. In the current case, search is simple feature wrapped over this data
structure. Every end of successful search in our trie data structure will point to matched contact
structure stored in the flash memory.
It is purely hypothetical thinking. Actual implementation will be even more complex based on
required features. I hope it will be enough for interview discussion. Get sufficient details of
question from the interviewer before jumping to answer. If you are on right track, the interviewer
will help with some hints.
This article is compiled by Ravi Chandra. If you like GeeksforGeeks and would like to contribute,
you can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks
Source
http://www.geeksforgeeks.org/mircosoft-interview-14/
Amazon Interview | Set 18
Amazon visited our campus on 16,17 and 18 Dec.
20 MCQ + 2 CODE
MCQ- mainly Aptitude, C-output questions, OS- unix related and DBMS
CODE-
…1) Binary complement of a number.
…2) Easy question related to bets
ROUND 1:
Around 15 min discussion on my image processing project
ROUND 2:
1) Convert postfix to infix in which the result must be having minimum number of braces i.e apply
braces whenever necessary.
2) Given a binary tree print the sum of elements on same axis (for all axis).
Elements on same axis are for e.g.: root, root->right->left, root->left->right
3) Design hash table with following operations you are given with a good hashing function..:
insert() –O(1)
find()-O(1)
delete()-O(1)
traverse()-O(n)..(where n is the number of elements in hash not the size of hash)
4) Given an array find a sub-array with sum=0
5)
for(i=0;i<n;i++)
for(j=0;j<n;j++)
cout<<a[i][j];
for(i=0;i<n;i++)
for(j=0;j<n;j++)
cout<<a[i][j];
out of these 2 which one will be better
I was asked to write the complete code for all the questions.
ROUND 3:
1) Given memory in the form of chunks if one process is reading any chunk, then any other process is
not allowed to write but it can read, if write lock is on, then any other process is not allowed to read
or write, now process can have lock on any number of chunks (continues) and other process
requesting read or write can even request for memory that does not have the same starting address as
the process who has locked the continues chunk memory.
Now we have to design a DS for representing memory and then design isRead() and isWrite()which
will return Boolean values true-if read/write can be performed vice versa.
2) Permutation of a string with and without repetition of characters.
3) Given an array of numbers if we start deleting numbers from end of array, then we have to tell the
maximum element of the array after deletion in O(1).
I was asked to code all the questions.
ROUND 4:
1) Around half hour discussion on my intern project which was with an e-commerce company.
2) Given a linked list with one extra arbit pointer we I was asked to make copy of linked list..
http://www.geeksforgeeks.org/a-linked-list-with-next-and-arbit-pointer/
he asked me to write the full code for method 1 in the above link.
I am very thankful to geeksforgeeks It really helped me a lot for my preparation. Keep up the good
work guys
This article is compiled by Sahil. Many Many congratulations to Sahil for his selection. If you like
GeeksforGeeks and would like to contribute, you can also write an article and mail your article to
[email protected]. See your article appearing on the GeeksforGeeks main page and help
other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-18/
Amazon Interview | Set 19
I recently had a set of interviews with Amazon.com and listing below the questions. The day had
around 15-20 of us at their office and the whole process took close to 12 hrs.
A cross-matrix is a one in which all the diagonal elements are same and not repeated anywhere
else.
a. Kadane’s Algo.
Had read the answer once in some book and duly told him have heard it.
I remember we needed to use Min Heap but his constraint was using a continuous stream.
He was very much interested in whether I could identify the complexities correctly.
a. Given a linked-list and 2 integers k & m. Reverse the linked-list till k elements and then traverse
till m elements and repeat.
I am not sure what happened and why I fell off on such an easy question, but you just can do
something like that in the last round.
b. An array of elements have been given. Find for each element, first max element to its right.
Wrote the code, however he was not able to check the same as took a lot of time.
Before this round, I had good hope of getting selected, but no one can give such a bad last interview
and get selected and hence after 2 weeks got a rejection mail.
This article is compiled by Mohit. If you like GeeksforGeeks and would like to contribute, you can
also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-19/
[TopTalent.in] Interview with Sujeet
Gholap, placed in Microsoft, Google,
Samsung, Goldman Sachs & Tower
Research
It’s not every day that you come across a person who has achieved so much in life at a very young age
which others can only dream of achieving in their entire lifetime. His simplicity and positive attitude
speak volumes for his recent success after facing some tough times. This is the story of Sujeet Gholap,
a IIT Madras grad who received record breaking 6 offers from some of the best companies in the
world namely Google, Microsoft, Samsung (US), Samsung (IN), Goldman Sachs and Tower
Research. We at TopTalent.in had a chance to interact with Sujeet about his success, preparation,
interviews and some hardships. This interview is an excellent example of how a small town boy can
achieve greatness and how you can do it too.
Also, Sujeet has agreed to share his stellar resume with our users which can help you with your
resume and preparation. So, don’t forget to download his resume by logging in.
Team TopTalent: Can you tell us a bit about your background before joining IIT Madras?
Sujeet: Sure. I hail from a small town called Kallam from Osmanabad district of Maharashtra. I
studied in a local school in Marathi medium till 10th standard. I always thought people from cities
would do much better than me as I studied every subject in Marathi. My mom and dad teach at a local
college there. I am currently pursuing my B.Tech in Computer Science and Engineering at IIT Madras.
In IITJEE 2009, I secured an all India rank of 184
Team TopTalent: Can you give us a brief account of your interview experience for these
companies?
Sujeet: All my interviews (except a couple) were technical interviews. Almost in each one, I had to
tell what I did during my internships at Yahoo! and Facebook, what projects I have worked on. Many
questions followed a similar monotone : arrays of integers, do something with them, biased coins and
their tosses, trees and recursive algorithms, writing code on paper and explaining it to the
interviewer, solving mathematical and logical puzzles etc. Interviews varied from very easy to very
challenging. Some interviewers were impressed by JEE rank and CGPA while some did not give it
even a second glance. Some interviewers were interested in the projects I did and asked detailed
questions about it, while some were just interested in whether I can solve the problem they have
given me.
Team TopTalent: So, how did it feel when you landed six massive offers on that day?
Sujeet: It felt nice and gave an ego boost when people referred to me as “the guy with six offers”.
People I barely knew, smiling at me and congratulating me! I was on an all-time-high. Jumping around
and laughing all the time. It was such a kick that the next day, although it was a normal and fine day, as
it was down compared to previous day’s high, I was actually a bit gloomy!
Team TopTalent: What was going through your mind when you had to choose one out of those 6
offers?
Sujeet: I was supposed to finalize on a company by afternoon and I was in the state of utter
confusion. Whether to take Google, which is the dream job of most of the programmers or to take
Samsung, whose software division is nascent and where my contribution and impact would be much
larger, visible and maybe even play a key part in company’s direction or to take Goldman Sachs, the
challenging job which I always wanted to get a taste of or to go with Tower Research, the highest
paying Indian job (twice as high as the second highest) which also involves inviting challenges and
lots of programming. I was realizing that it wasn’t really a good idea after all to go for so many
options. I was wondering whether I would have been better off without a choice, as all these
companies were such that I would have accepted the offer without giving it any thought at all had it
been the only offer. I finally decided to go with Google.
(Wasn’t really a surprise for us. Google seems to be the first choice for most Indian programmers)
Team TopTalent: How did you prepare for these interviews? What suggestions can you give to
our users who might have similar interviews lined up?
Sujeet: I was lucky that I had discussed about similar questions before, and hence was able to make
it through the interviews. I was quite attentive in class which really helped me a lot. Any questions
which were not algorithm intensive questions and were more or less straight knowledge based, I
could just recall the answer straight from the class when the professor taught that particular topic!
Being friends with the right people and forming a peer group with a common interest is something
which was critical to my success. I used to solve coding challenges with Arijit who had a very good
Topcoder Rank. I would think about how I would solve those problem, if I get it, I would call him up
and discuss the answer and ask for more.
In terms of suggestions, I would say be an active member of topcoder, keep solving programming
problems in other places too if you want like spoj, usaco. I wish I had taken these things seriously and
honed my algorithmic programming skills. Be thorough with Introduction to Algorithms by CLRS and
do problems on one of the above mentioned sites.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks
Source
http://www.geeksforgeeks.org/toptalent-in-interview-with-sujeet-gholap-placed-in-microsoft-google-
samsung-goldman-sachs-tower-research/
Amazon Interview | Set 20
Recently got interviewed with amazon Hyderabad for SDE1.
Written
1) Given a BST, along with left and right pointer for a node, it has forward and backward pointers,
convert the tree into Doubly linked list using these extra pointers.
2) A = {5, 3, 8, 9, 16}
After one iteration A = {3-5,8-3,9-8,16-9}={-2,5,1,7}
After second iteration A = {5-(-2),1-5,7-1} sum =7+(-4)+6=9
Given an array, return sum after n iterations
First f2f)
1) Check given BT is BST
2) The cost of a stock on each day is given in an array, find the max profit that you can make by buying
and selling in those days
3) In matrix A[m][n] each row is sorted and each column is sorted, write a function which checks
whether a number exists in this matrix or not.
4) Given a string, find the longest sub sequence which contains only unique characters.
Second -f2f)
1) Convert a BT into SUM BT(each node values = sum of left and right node)
2) “I get thousands of emails daily”, find all anagrams in each email and print the count of all
anagrams in each email.
My solution was using a trie and a hash function to increase the counter at each node in the trie.
Hash function will return the given word in a sorted manner, he asked me to code which was tedious
but gave a rough draft.
Initial set up cost would be big but the same trie can be used for any email by making all counters to
zero.
Third f2f)
1) He talked almost for 45 min regarding my project and asked how we implement it. I was also
working on web services in my current company, so they were more interested in asking questions
there and want to know how well I implemented there.
2) A design question of chess int board[8][8] each value in the matrix represents a character. 1-9
number represents all whites and 11-19 represents all blacks.
Given a pawn at (x,y) print all possible moves. Assume whites are index 0 and blacks are at index 7.
Fourth f2f)
1) There is ternary tree in two dimension space(one plane). Print all elements that are visible from
right side of the plane(If you see along y axis plane)
eg) In the following answer would be (1) (5) (8)
————————(1)—————————————
—————-(2)–(3)–(4)–(5)——————————
———-(6)–(7)–(8)—————————————–
2) Print these elements in a zig zag order, first level1 and then level n, level 2 and level n-1 and so
on.
In simpler words print rightmost ending element in each level of a ternary tree.
My approach was take two queues, enqueue root in Q1 and while dequeueing enqueue its childeren in
Q2, while shuffling elements from one queue to another store the last element in doubly linked list.
While printing, use this double linked list, remove from head and then tail, till it becomes empty.
Fifth f2f)
1) Find jth element in ith row of a pascal triangle
1
11
121
1331
1 4 6 4 1… and son on. pascal(4,2) should return 6.
initially I told BST with insertion deletion of order log(n), then he told me to
3) Evaluate a mathematical expression 2*3+(5-6/2), something like this, with ope
Each f2f interview will be of 50-60 min. In each f2f round they will ask reason
These questions might take up more than 15-20 min and in the rest of the time yo
If you answer you will get one more question which is an advantage
Source
http://www.geeksforgeeks.org/amazon-interview-set-20/
Amazon Interview | Set 21
Recently I have gone through 10 rounds of interviews of my dream company Amazon for SDE1 and I
got selected. My only resource and library for preparation was GeeksforGeeks, which is the best
website for tech preparation, if you aim for big shots like Amazon, Microsoft, etc. I was not too
confident to attend interviews. The interview experiences blog gave me courage and coding
experience to crack all rounds. Please do follow this site for every update, and suggest your friends to
follow if they try for job change and if they aim for big companies.
2. Two numbers represented as linked lists. (Bigger than integers). Return a linked list which is the
product of the given two linked lists.
1->2->3->Null (123)
2->3-Null (23)
O/P: 2->8->2->9->Null
2. In Linked list, Node has two pointers, one points to next node, other points to arbitrary node in the
linked list. Write a function to return a new list which is clone of the given linked list.
3. An array is sorted and rotated by k times. Find an element in an array. (efficient and logarithmic
time solution is expected)
3. Searching an element in 2D matrix which is sorted in row wise and column wise.
1234
2345
3456
4567
5 6 7 8 Find an element in it.
4. Difference between merge sort and quick sort. How do you improve quicksort (think about in
selecting pivot element).
6. How to store a set in memory, what ADTs do we use and what are tradeoffs for each ADT.
4th Round(35min):
1. Algorithm to construct a tree given Pre and In order traversals.
2. About the most critical situation in the project you went through. How you did it. ( he needs
complete explanation of the scenario)
3. If he gives the same scenario as an interview question, how will you improve code quality and its
complexity.
4. About SDLC you followed. Which one do you like and why.
5. Do you have any questions to ask ( very important one- ask something about projects they work,
etc. Good sign )
F2F Round 2 (with Developer 60 min):
1. Tell me about yourself.
2. Zigzag traversal of binary tree. (more optimal solution is expected from you).Complete code
should be written and they will check later.
3. A robot is there in 2D space, which can move to its left direction. You are given with an array
which are moves of robot, which starts from origin(0,0). Find the rectangle covered by it.
I/P: { 2,3,4,5,6,1,3,5,5} starts at (0,0)
O/P: rectangle points: ( -4,4 ) to (4,-2)
4. Casual discussion about hiring process.
2. Vertical sum of a tree. (Column wise sum – can find same one in geeksforgeeks)
2. Write a function to check syntax of opening and closing braces whether they are proper or not.
3. Same question if you have k types of braces( ‘(‘ ‘[‘ ‘{‘ ,…. K types) All are of same priority.
4. Same question if you have k types of braces( ‘(‘ ‘[‘ ‘{‘ ,…. K types) All are of diff priority.
6. Return count of above combinations without using algorithm for printing them.
2. About project.
3. Why you are leaving prev company, What will stop you there.
4. Set of strings are given in a dictionary order. The problem here is order is not as our alphabetical.
It may be different. C may come before a,b, x may come before d,c. etc. You will have to find the
order of characters by using given input. (topological sort – complete code is required to write)
5. Binary search tree into Sorted doubly linked list (Expected Inplace algorithm)
3.In a position to tell complexity for code you are going to write.
4.First tell the algorithm or approach and proceed with writing code.
This article is compiled by Ranganath. Many Many congratulations to Ranganath for his selection. If
you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-21/
Microsoft Interview | 15
I recently had interview with Microsoft and i have been selected.
I am really thankful to geeksforgeeks site which provides preparation material for technical
interviews at one place. And credit of my selection also goes to my friend “Ankit Tripathi” who
helped me a lot in my preparation.
Written Test: 30 MCQs based on Algorithms & logical aptitude and 2 coding problems.
Telephonic Interview: All questions related to your resume & projects and some behavioral
questions.
Round 1:
Ques1. Write code for run -length encoding of a given string in-place (without using any extra
memory).
Sample Input: aaaaaaaaaabcccccc
Output: a10bc6
Ques2. Write code for a function which converts a given integer to a string. (Use only one for-
loop).Check for all the boundary cases.
Ques3. Suppose you are going to organize a party from 9:00 am to 20:00 pm. You have invited ‘n’
number of guests for the party. You are given the arrival time and the departure time of all guests.
Every time a new guest arrives, you give him a glass of wine and when he leaves, you take the glass
back. If someone has left and returned the glass, you can give the same glass to a new guest who has
just arrived.
Based on the given schedule for guests, determine the minimum number of glasses required for the
party. A guest can come or leave at any time, but you are given the fixed schedule. Write code for the
given problem.
Round 2:
Some questions related to resume and subjects studied in the curriculum.
Ques1. How can we do a Tree Traversal without using a stack (not even the stack for recursion).
Write code for an in-order traversal without using stack. What would be the changes in the function if
we want to do a pre-order or post-order traversal?
Ques2. Write code for finding loop in the singly linked list and fixing it.
Ques3. Given a linked list with two pointers, one is next pointer and another is a random pointer
which can point to any node in the list (forward, backward or itself), you have to make a copy of this
list without tempering the original list. Write the code for the same in O(n) time complexity.
Round 3:
Ques1. Give different possible approaches for Checking whether two strings are anagrams (with and
without using hash tables). What are the possible advantages and drawbacks of each approach? Write
code for the approach which involves first sorting the two strings and then matching character by
character (O(nlogn) approach). Which sorting you will use and why? Write test cases also.
Ques2. Write code for counting the number of inversions in an array in the minimum time possible.
What could be different possible approaches?
Ques3. Given two huge numbers represented as linked list, write a function to add them and return a
number in the same format.
Ex: 950 represented as 9->5->0->NULL
150 represented as 1->5->0->NULL
then, the output should be 1->1->0->0->NULL
Ques4. We have ‘n’ people in a party, out of whom only one can be a celebrity. And he may or may
not be present in the party. A celebrity is known to everyone but he does not know anyone. All other
person may or may not know each other. If a person ‘A’ knows ‘B’, it does not implies that ‘B’ also
knows ‘A’. You can ask only one question to someone ‘Do you know this (‘X’) person?’ and he can
only reply in YES or NO. Your job is to find the celebrity in minimum number of questions.
Round 4:
First he asked general questions from resume.
Ques1. Write code for finding the least common ancestor of two given nodes in a binary tree. ( both
recursive and iterative approach).
Ques2. Which data-structure you will use for implementing the ‘malloc’ and ‘free’ functions? (You
have been given with a pointer which points to a large chunk of memory).Write full codes for
implementing these two functions.
Each face-to-face round duration was approximately 1 hour. Results were declared after 4 days of
interviews. Every interview was an eliminating round. Questions were not very hard but they were
very keen on accuracy and efficiency of code (it should run on all possible input cases).
This article is compiled by Monika Bisla. Many Many congratulations to Monika for her selection. If
you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/mircosoft-interview-15/
D E Shaw Interview | Set 1
Total 3 rounds. 1st written followed by 2 face to face and every round was ELIMINATION one.
1st section: 20 aptitude questions and was really hard. Avg no of questions solved is 4.
2nd section: 20 (C++ & Java) oops related questions and other output questions too. (level was
good. G-Facts)
In C++: mainly Virtual functions, virtual destructor, copy constructor, initialiser list, virtual
inheritance questions, inner classes etc.
In java: mainly inner classes, Base reference and Child object concept, overriding questions etc.
Out of 99, 22 students got selected. They were mainly from IITs, IIITs, NITs, Amazon, Microsoft,
ADB etc.
Rapid fire questions Mainly from OOPs concept of C++, Data Structures & Algorithms, O.S
3rd Round: Face to Face. Mainly tried to confuse everyone It was fun. (1:15 hr)
Mainly related to my present work. As I was working in java field, using Spring & Hibernate, so they
asked me few basic questions of Spring & Hibernate. Not in depth.
Java:
(1) Can static method be overridden? Why?
I knew the answer so explained in detail.
(2) This is good one.
class Employee
{
int age;
String name;
Date DOB;
}
Now if i call:
myFun(obj, “name”);
then this function should return name of Employee from object “obj” which was passed as parameter.
So based on name of attribute value, it should return that object’s attribute value.
Operating System:
(6) What is Zombie process? Write code to create Zombie process.
(7) What is Orphan process? Write code in C to create Orphan process too.
(8) One query. Given a table having attributes stud_name, English, phy, chem., maths. Write a query to
display the name of student in descending order of their aggregate marks.
(9) What is IPC? (Asked from my friend).
(10) There are N points in space. Find whether two given points are connected or not. This is a graph
question. Modified Floyed Warshall’s Algorithm will work. Other good algorithms are also available
in GeeksForGeeks. (Asked from my friend)
Results declared after 3-4 days. Out of 5 students, 2 of them got selected finally. I was one of the
lucky guys.
Special Thanks to you GeeksForGeeks team. I am following this site since 1 year. This is my
favorite Geek Site. Now I got very good offer from D. E. SHAW. The way you have organized your
site is awesome. The algorithms you provide are neat, efficient & easy to grasp. Though whole
GeeksForGeeks content is very good, but I would recommend other Geeks to specially follow
GeeksForGeeks algorithms & G-Facts.
This article is compiled by Shahnawaz. Many Many congratulations to Shahnawaz for his selection.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/d-e-shaw-interview-set-1/
[TopTalent.in] In Conversation With Nithin
On What It Takes To Get Into Goldman
Sachs
Goldman Sachs is well known for their lengthy interview process. There’s no denying it. GS
interview process is really, really tough but it’s certainly not impossible as applicants have proved it
in the past and so has Nithin who hails from Bangalore and is studying at NITK Surathkal. He got an
offer from Goldman Sachs for a position based in India. He spoke candidly with TopTalent.in on how
he got his dream job at Goldman Sachs and what helped him win this unique opportunity many would
die for. When asked about how he felt after knowing that he was one of the two lucky candidates who
were selected, a humble Nithin responds, “I was really excited and was bursting with joy. It was a
“Eureka” moment for me. The feeling was just fabulous!” The interview acts as a filter to determine
if you have the necessary skills for the job, if you are motivated enough to do the job day in and day
out, to figure out if you will thrive in the company’s culture and if the company is a good fit for you.
It’s best to first figure out why you want to get into this company by questioning yourself about all
these aspects. As Nithin mentions, “Unlike other companies, there was no aptitude test. Candidates
were shortlisted based on their Resume and CGPA. CGPA does matter but generally they were
looking for spikes or an X factor in a resume. Top 10-15 from each of the circuit branches
(Electronics/Communication, Computer Sciences/Information Technology) were selected for the
interview process.”
GS interviews are quite grilling and highly technical and the interviewers get the best out of you.
“There were 6 rounds of interviews, 5 were technical and 1 was an HR interview. The questions
were mostly focused on algorithms and concepts of probability”, he recalls. As we have heard GS
has a consensus based hiring process in which all team members would interview you and you get
selected only if all of them vote positively on you. Successfully navigating through 6 rounds of
interviews is highly commendable indeed. So what made Nithin tick through all these rounds and
what can others learn from his experience? Well, he puts it straight, “A good knowledge in data
structures, design and analysis of algorithms and probability (also Mathematics in general) is very
much needed. Also, the ability to communicate thoughts and ideas, in a clear, concise manner, is an
indispensable skill that’ll be useful in all interviews.”
Preparing for your GS interview requires knowing your resume inside out, determining your key
selling points and practicing your about yourself pitch. But what’s the X-Factor GS always talks
about? Nithin believes that more than arriving at the right solution, it is the approach you take that
really matters to them. He Says, ” I brought up different concepts to solve the questions and I think
that really helped me get through. I just never gave up on any problem. Always, put your maximum
effort and keep in mind that the interviewers do not always expect you to come up with a perfect
answer.”
So, how much preparation should one put in and what would be his suggestion to others who are
aiming at achieving a similar feat? In his words, the plan seems simple and straight, “I started off with
revising the concepts I had learnt through the courses which I had taken in the past few semesters.
Also, I had taken a couple of online courses during the summer and it really helped. I strongly suggest
everyone to take the Algorithm Courses from – Coursera, Udacity and MIT Video Lectures. Apart
from revising the concepts, I solved problems from ‘Cracking the Coding Interview’ and CodeChef. It
really helped me streamline my thought process for the problems posed during the interviews.” As
Nithin plans to join Goldman Sachs in their Strategies Division, we wish him all the best for this
opportunity to wok with some of the smartest people in the world.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks
Source
http://www.geeksforgeeks.org/in-conversation-with-nithin-on-what-it-takes-to-get-into-goldman-
sachs/
Microsoft Interview | 16
I was interviewed for Microsoft App-Ex Team. I was selected. I am really thankful to
GeeksForGeeks site which provides preparation material for technical interviews organised so well
Round1:-
a) Implement your own atoi() function(To convert string to integer) cover all the cases including
negative integer.
Round2:-
a) You are given an array containing only 3 type of characters let say a,b,c write a program to sort the
array having these. Eg abcaacbbaaaaccc sort it. I gave standard 3 flag solution then he asked you are
complicating it you can use other method then I gave counting method.He asked me to compare the
complexity of both methods.then discuss leads to while calculating complexity we compare number of
iteration only or total calculation in the program.
then he asked if we have let say k type of character then which method is good the count one or three
flag one.
b) Implement T9 dictionary. how T9 works is : let say if I press 223 it should give all the possible
valid words in suggestion Eg bad,cad,aad etc. give datastructure to store valid words etc.
Round3:-
Then He gave a problem related to his team. In weather app, you have a number of weather stations,
give datastructure and all to find the nearest weather station from a city.
Then He gave the brief about what his team work and all .
Round4:-
This was with GM of App-Ex team India.
a) It was a design question. You are given a list of components you have to write design for rendering
those components in container.Layout can be left aligned, right aligned, center aligned. You design
should be extendable means if new layout comes you should modify your code as least as possible.
Use concept of OOPS.
This article is compiled by Vishal Gupta. Many Many congratulations to Vishal for his selection. If
you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-16/
Amazon Interview | Set 22
I was recently interviewed for SDE1 position in Amazon Bangalore. 1 online coding test
followed by 5 rounds of F2F onsite interviews.
1
2 3
4 5 6
7 8 9 10
No each bucket is resting on 2 buckets. I will add water in the top bucket(number 1), after filling the
bucket completely access of water will spill to the left and right bucket. Need to write a function
which will return water in nth bucket after I will add x L of water in bucket number 1.
float getWaterInBucket(float x, int n);
2. Given an mxn matrix. Each entry is a room. Rooms containing “L” are locked. No one can enter a
locked room. Rooms with “G” are guarded rooms. Distance of a room from a Guard is defined as the
minimum number of rooms that are encountered for the Guard to reach that room (Guard can move in
all allowed 4 directions at max). Find the room that is farthest from all guards. Expected time was
O(mn). (Hint: BFS)
This article is compiled by Shredder Woods. Many Many congratulations to Shredder for his
selection. If you like GeeksforGeeks and would like to contribute, you can also write an article and
mail your article to [email protected]. See your article appearing on the GeeksforGeeks
main page and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-22/
[TopTalent.in] Rapid Fire Interview With
Trisha Roy About Her Job Offers from
Nomura and IOC
Nomura and Indian Oil Corporation are two completely different companies with completely
different profiles and still Trisha Roy, a chemical engineering graduate from BIT Mesra managed to
land job offers from both of them. Nomura hires recent graduates from some of the top colleges like
St. Stephen’s, BITS Mesra, IITs, NITs etc. Nomura has a strong presence in India and offers a wide
range of financial products and services. Nomura normally looks for analyst profiles in investment
banking but from engineering colleges it’s usually for a technical profile either to create software to
help other analyst make smarter trading decisions or testing profiles to improve upon already existing
software. In an interview with TopTalent.in, Trisha sheds some light on the Nomura Recruitment
Process and what you should do to avail such an opportunity (apart from using TopTalent :D).
1. TopTalent.in : What was the reaction when you first got selected and how did your parents
react?
Trisha : Well, considering that I already had a job, I was happy and satisfied, but not ecstatic
altogether. My parents however, were very glad. My basic emotion at the moment was contentment.
Trisha : The hiring process consisted of a written aptitude test, followed by three interviews, two
technical and one HR. The written test consisted of a quantitative section, a verbal ability section,
and a section on Logical Reasoning. The first technical interview comprised of puzzles, basic
questions on finance, some problems on programming and some questions about internships. The HR
round was fairly simple and predictable. The second technical interview primarily revolved around a
slightly complex programming problem.
3. TopTalent.in : Which was the toughest question and how did you answer it?
Trisha : I was asked to write a code/algorithm for a chess game in the last interview, and not being a
Computer Science or Information Technology student, I was initially a little reluctant in going ahead
with the problem. However, I started simplifying the problem to a code for a single King and a single
Pawn, concentrating on protecting the king from all directions. The interviewer too helped me along
the way by giving certain hints and directions, and eventually, over the pleasant interaction which
lasted about twenty minutes, we had before us a well written algorithm for the question.
4. TopTalent.in : What according to you was the company looking for in candidates?
Trisha : I think the primary thing they were looking for was smartness and strong analytical skills.
They wanted people who, when faced with tricky and perplexing situations, can do better than giving
up right away. They wanted street smart and confident people, who had the inherent ability to quickly
and efficiently develop decent programming logic.
5. TopTalent.in : What tips you can give which might help other freshers applying similar jobs?
Trisha : I will suggest that future aspirants practice solving some mathematical puzzles before
appearing for the interview. They should appear very confident and composed throughout the entire
process.
6. TopTalent.in : What was that one thing which you think might have helped you over others?
Trisha : I believe my confidence might have worked in my favor the most. Moreover, I am usually
very good with p7.uzzles and analytical questions, which I think was apparent, and might have played
a vital role in my selection.
Trisha : As far as I am concerned, I would get bored without challenges. Hence, I look forward to a
very competitive yet healthy work culture at Nomura, that enables me to acquire sufficient domain
knowledge in the field of analytics, business and finance.
8. TopTalent.in : Given that you have two offers now (Nomura and Indian Oil) which company
are you planning to join and why?
Trisha : Though I am still consulting some seniors on the matter and have not made my final choice
yet, still I think I will probably join Nomura. That is so because considering my future aim of doing
an MBA in finance, I believe my work-experience in Nomura will give me an edge over IOCL during
the time of admissions.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks
Source
http://www.geeksforgeeks.org/toptalent-in-rapid-fire-interview-with-trisha-roy-about-her-job-offers-
from-nomura-and-ioc/
Amazon Interview | Set 23
I was recently interviewed for SDE1 position in Amazon Bangalore. 1 online coding test
followed by 5 rounds of F2F onsite interviews.
Code was required.I gave o(n) time complexity solution for it using 1 hash table and Doubly Link
List.
2. Give a Building with n floor. A person can take 1 step or 2 step to climb. Find the number of ways
to reach nth floor. Code was required
2. Given an binary tree. Traverse it in zig-zag manner. Code was required.Solved using a 2 stack.
3. In a snake ladder game without snake and ladder :). If some one is playing then we have to
find probability to win the game of any player. Condition of winning is if you are on 96 and 5 comes
in dice then you loose the game and If you are at 96 and 4 comes then only you will win the game. But
you cant use dice more than Y time.
Three days later I was informed that I was not selected. With below mail :-
Thanks for your interest in Amazon. We appreciate you sparing time towards discussions with
us. After the detailed discussions with you and internal discussions thereafter, we regret that we do
not have a suitable opening at present that does justice to your aspirations and capabilities. Hence we
would not be able to take it forward at this juncture.
With your permission, we will retain your details in our database and would get in touch with you,
should there be a suitable opening in future.
I am still not able to find the correct reason behind it. And Now I am frustrated.
This article is compiled by anonymous user. If you like GeeksforGeeks and would like to contribute,
you can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-23/
Microsoft Interview | 17
Recently i was interviewed for Build Team Engg. role in Microsoft hyderabad. I was selected.
I am really thankful to GeeksForGeeks site which gave me motivation and will to prepare for the
company, with the help of material on the site only I got selected.
Written:-
3 D.S questions
Q1 – Rotate an array by K.
Q2 – Reverse a link list. If you are able to reverse a link list than reverse the K node’s of link list.
Q3 – Find the pair of values in the array whose sum is equal to K.
Second Round –
Some general discussion about my projects and some curriculum subjects.
Q – Two numbers are stored in link list, need to add those two number.
I was also asked to write the test case which breaks the code.
Q – how does the telephone directory search of nokia phone works. If i give a name it should get me
the contact number and vice versa.
Third round –
Some general discussion on the projects.
Q – I was asked how search of windows work and asked to give a good indexing scheme for that.
Fourth Round –
Some general HR question like 1. why this company? 2. Why leaving your old company?
Q1 – Given an array which contains a number in majority (i.e. A number occurs more than 50% times
in the array) need to find it.
Q2 – Given an array which is rotated N times(N is unknown),I need to search a number in it.
In each and every question they were looking for an efficient solution and if I was getting stuck
somewhere they were also giving hints.
This article is compiled by Love Gupta . Many Many congratulations to Love for his selection. If you
like GeeksforGeeks and would like to contribute, you can also write an article and mail your article
to [email protected]. See your article appearing on the GeeksforGeeks main page and
help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-17/
Microsoft short-listed candidates based on their Resume and there was no written test. Complete
process included 3 interview rounds
This article is compiled by Nitin Khandelwal. Many Many congratulations to Nitin for his selection.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-178/
GS Labs Interview | Set 1
I had GS Labs Pune interview on 6th Apr 2013. They called me in the morning 9am. It was good
Saturday morning. Reached on time.
Good experience.
This article is compiled by Shantibhushan Sale. Many Many congratulations to Shantibhushan for his
selection. If you like GeeksforGeeks and would like to contribute, you can also write an article and
mail your article to [email protected]. See your article appearing on the GeeksforGeeks
main page and help other Geeks.
Source
http://www.geeksforgeeks.org/gs-labs-interview-set-1/
I was 90% sure that I would clear the interview but I got rejected. The only reason I felt I was
rejected was that the interview process was immature. The interviewer interviewing was a guy with
1yr of work ex expecting solution in the manner he wanted, which was pretty unexpected from a
technology giant like amazon.
Every round of Amazon would have basic question like what you do etc. But all that is just formality,
it doesn’t count since one interviewer stopped me in between and said we have less time lets talk
about problem solving(Which was again not expected from technology giant)
Also, for those writing written this month, the written round would have the same questions as I have
listed below. So please solve this, before going for written
a) General code for coin denomination problem where the input was an array containing the coin
denomination and the sum we want.
Telephonic Interview:
If you miss one edge case, you are out of the interview. This is what they check and nothing else. They
don’t check your logic, they only see if you write proper code. So always start with brute force and
write proper code.
– Only catch here were the edge cases and nothing else
F2f inteview(round2)
a) It was basically on writing multi-threading code(Write multi-threaded code for Enqueue of Queue
using linked list)
c) Window Problem(In an array, find the minimum of the set in a given window). There are many
solutions using hash, brute force. But the dequeue answer is what he was expecting.
a) Given a doubly linked linked, delete the occurrences of duplicate element from it. ( One miss of
edge case and out again)
(for eg) If you write, temp->prev->next = temp->next without actually adding the condition, if(temp-
>prev) then temp->prev->next = temp->next
b) Given a matrix with ordered rows and columns(Rows are sorted 0’s followed by 1’s). Find the
row with maximum 0?s(linear time)
I answered it
c) DataStructure with Insert O(1), Deletion O(1) Search O(1) and ReturnAnyElement O(1)
Again answered this using augment of hash and doubly linked list
d) Given a tree with negative and positive numbers, return the root with maximum sum in its sub-tree
F2f interview(round-4)
a) It was basically a design interview where I was told to some OOPS design
b) Given a stream of 0’s and 1’s(You Tube). Find the first occurrence of 1 in it. Then the question was
changed to a string instead of a stream.
Finally, after giving 100% it was reject. So according to my experience, if you dont give 100% you
are out or else it is ur luck that you get through amazon’s process.
Moreover, currently they have started exploring candidates by sending two interviewers which
actually means that the one is new to interviewing and other is experienced. Hence, basically they are
playing with interviewers.
If you want the answers for questions, please comment I will post it.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-24/
HCL Interview | Set 1
I recently had interview at HCL Bangalore.
They said it was scheduled interview and called at 10:00 AM. When I reached there were around
100 candidates waiting. They asked to wait in a room. I had to wait for 5 hours before my turn come.
In between they asked we can have lunch at the cafeteria. Food at the cafeteria was very bad. I was
fleeping sleepy after having that food ;):
Then met interviewer. He was taking taking interview of 6 candidates at the same time. He gave 4 set
of programs to every candidate and asked to solve that.
1) Find the Merge point of two linked lists.
2) Swap two bits of integer.
3) Reverse individual words of the sentence.
4) Reverse sting without using temp string.
He didn’t asked about the project exp. Over all it was a bad experience at HCL Bangalore. Sitting
idle for 5 hr was horrible.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/hcl-interview-set-1/
IIIT-Hyderabad but today Prasoon Mishra is one of the most well know names across engineering
colleges across India. Last week we got a request from one of our readers that he and his friends want
us to Interview Prasoon and today here we are fulfilling their wish.
This really tells us how much people are waiting in anticipation for his interview. So, we went a step
ahead, we not only would like to present his interview but we also have his resume for you to
download.
So click here to download his resume by logging in. Here is the much awaited interview of Prasoon
Misra as he shares his thoughts about his interview experience.
TopTalent: Firstly, how do you feel when so many world class companies are trying to woo you?
Prasoon: I am greatly overwhelmed! I never imagined such a scenario, so I am delighted that so many
companies considered me worthy of an offer. It feels good to know that I did things right. And, it’s
always a treat to see your hard work rewarded.
All these companies are highly reputable and they are very selective in their hiring, but a lot of
engineers get hired from across the world. So, its important to keep things in perspective and not get
carried away. I can join just one company, so all these offers are equivalent to just one good offer.
And hence, at the end of the day, I see it as a good job opportunity.
TopTalent: Which company are you planning to join and how did you make that decision?
Prasoon: Yes, that was a very tough call. It was extremely confusing. They are all top tech
companies, and each had a lot to offer in terms of the role, work and responsibility. Google, given
their array of products – it’s a crime for an engineer to decline their offer. Walmart & PocketGems
have quality work and good growth opportunities. Amazon also offered a very good profile. But, I
chose Facebook because I feel that it is a better cultural fit for me at this stage. Even after their IPO,
they are trying to preserve their startup culture, and continues to offer a lot of opportunities . That just
nicked it in the end!
TopTalent: Can you give us a brief account of what you felt was the toughest interview?
Prasoon: Its hard to pin-point a single tough interview. Each company had its own style. Facebook &
Pocketgems had very intense and focused rounds, revolving around coding/algo and system-design.
They were looking for speed and accuracy. At Google, as can be expected, some really tough algo
questions came up. I am unsure about the complete correctness of one of my solutions, even now. In
another round, I was able to convince the interviewer that his solution had the same flaws as my
solution. So, that was a confidence booster. Walmart though, was a bit unexpected. In a design round,
my initial solution was built around a string algorithm. But, the interviewer pointed out some counter-
cases. So, by relying on his hints and the counter-cases, some probabilistic techniques got
incorporated into the system. At the end, the interviewer informed me that my final solution was a
model in machine-learning. So, I feel that mathematical aptitude helps in more ways than just
algorithm design.
Prasoon: Well, a strong understanding of data structures and algorithms, along with fast-and-accurate
coding skills are the primary requirement. And companies pay particular attention to the quality of
code -> neat, short & easy to understand.
Moreover, a good aptitude in Computer Science is also desired. The fundamentals of OS, DBMS,
distributed systems, design patterns, etc, often get applied indirectly in the design rounds. In this
regard, I feel that a basic understanding of common systems like search-engines, spell checkers,
trends, etc, helps one greatly.
And, companies inherently dig for creativity. The above mentioned skills are just tools to come up
with smart solutions.
TopTalent: Whats your advice to students who are aiming for similar placement offers as yours?
Prasoon: Do not get burdened by the hype surrounding these jobs. And after that, I think its extremely
important to enjoy the subject and the process of preparation. In my opinion, there is an element of
luck involved with interviews, and candidates must acknowledge it. Hence, they must not over-
pressurize themselves. And, all wise proverbs about success strictly apply.
Prasoon: One must understand that the resume is ones first impression. So, it’s important to be
precise and accurate in terms of what one wants to convey. A lot of tips are available on the internet,
and one can pay heed to them. In terms of the content, I chose to write projects that had good depth,
and discard the lighter ones. I feel that this enhances the strength of the resume.
Other than these, one must prepare oneself to have a detailed discussion on everything that is
mentioned in the resume.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks
Source
http://www.geeksforgeeks.org/google-facebook-amazon-walmart-pocketgems-all-fighting-for-
prasoon-mishra/
Amazon Interview | Set 25
Hi, This is Pandu. About 1 month back I had attended Amazon Interview In hyderabad, it was total of
8 rounds which includes 2 telephonic and 6 face to face and the whole process was lasted about 25
days because of unavailability of all the interviewers. The whole was very painful for me as before
and after attending interviews on each interviewing day, I had to spend with some tension & anxiety. I
was interviewed for SDE 2 position
The following are the questions:( For all the algorithmic questions , working code is required, they
would take those papers and discuss in their internal meeting after all the rounds)
Face to Face round 1(with SDE 1): (after 4 days of 2nd telephonic. 3 faces to face rounds were
taken on same day and lasted about 5 hours)
Q1) Given a sorted array and a number write a method that returns the number of occurances of given
number
Q2) You have given a dictionary of an alien language in which letters are same as English letters but
their order is different.
Your task is sort the letters or give relationship b/w letters using that disctionary. note: the dictions
may conatain 1 to n words.
Face to Face Round 4 ( With Hiring Manager): ( after 5 days of last 3 f2f rounds)
Q1)Discussion about my project details
Q2) Design Question: Design Clustered caching system for an web site like Amazon.com.
In which millions of web servers deployed over the globe and only one inventory Database system
Q3) Design question: Design only Train search functionality of IRCTC
Face to Face Round 5 (With Bar Raiser): ( same day following Hiring manager interview)
Q1) Discussion about my project and Challenging task
Q2) Design Question: In an online teaching system,there are n number of teachers and each one
teaches only one subject to any number of students.
And a student can join to any number of teachers to learn those subjects.
And each student can give one preference throuch which he can get updates about the subject or class
timings etc.
Those preferences can be through SMS or twitter/facebook or email..etc.
Design above system and draw the diagram for above.
Q3) coding and algorithm: There is a N-ary tree in the 3d Space. and you are standing on right side of
that tree . Print the only
those nodes when you looked at that tree.
( which is like printing rightmost node in each level of that tree. He would not tell this, you have to
conclude this by drawing a tree like that).
After writing the code for above one, he was asked me to print them in an order in which 1st one
followed be last one followed by 2nd first one followed by snd last one..etc.)
Face to Face Round 6(some one who is in very high level, guess director to a technology):
(After 1 week of last interview)
Q1) Lots of discussion on my current project. Different behavioral questions were asked during the
discussion.( about half n hour discussion)
Q2) Given a cube of size N. which was constructed by N^3 number of 1 unit smaller white cubes.
Now you dipped that cube in a black color paint and taken out.
after that how many cubes are still in white color. Prove your answer( by writing mathematical
equations)
Q3) There are N bolts each of which different size and N nuts, they are also with different sizes. and
each bolt fits with exactly 1 nut.
Give an algorithm that combines those N bolts and nuts into N pairs of Matched bolt and nut.
HR told me on last interview day that I would be notified by the result within two working days as
already the whole process was delayed for so many days. I had waited for almost 1 week and send
them mails & called them about my candidature but did not get any response. I was almost lost hope.
But, Finally after 8 days of last interview, got a call that I was offered SDE1..( I guess, They were not
completely satisfied by in design part but I did better in algos, problem solving and coding part and
as a result I was offered SDE 1). In the end I rejected to join at Amazon as I got another competitive
offer.
This article is compiled by Pandu. If you like GeeksforGeeks and would like to contribute, you can
also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-25/
Amazon Interview | Set 26
Hi, I am Mayur Kale,I was recently interviewed for SDE1 position for Amazon in our campus and got
selected. Geeksforgeeks helped me lot. I prepared only from Geeksforgeeks.org. I am very thankful to
Geeksforgeeks team.
2. Given binary tree, if we draw a line from root then we have to print all nodes on that line.
Code for both questions was required and some other discussion happened..
code for all questions required and nice discussion was there…
He was very impressed with my answers…
-one puzzle
A champagne pyramid is a pyramid made of champagne glasses , each of equal capacity say , n. The
pyramid begins with one glass at the top level , two glasses at the second level , then three below that
and so on up to infinite levels. A level x of the pyramid thus has x no. of champagne glasses.
A steady stream of champagne is poured down from the top level,which trickles down to the lower
levels. What is the distribution of champagne in the glasses at a given level i.
(I told I know this puzzle then he moved ahead..)
-Give a Building with n floor. A person can take 1 step or 2 step to climb. Find the number of ways to
reach nth floor. Code was required
In evening they told me result and I got selected in amazon. It was very nice experience for me.
This article is compiled by Mayur Kale. Many Many congratulations to him. If you like
GeeksforGeeks and would like to contribute, you can also write an article and mail your article to
[email protected]. See your article appearing on the GeeksforGeeks main page and help
other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-26/
Amazon Interview | Set 27
Hi, I was recently interviewed for SDE1 position for Amazon and got selected. I have 1.5 year
experience in java. Geeksforgeeks helped me lot. I am very thankful to Geeksforgeeks team.
Following were interview questions-
Round 1 (Telephonic):
1. There is a dictionary already implemented. Write a method, which takes input String without space,
to prints all subsets of the input string which is present in dictionary.
Example: Dictionary – a*
………….Input- aaabaa
………….Output- a,a,a,aa,aa,aaa,a,a,aa
2. There is a dictionary already implemented. Write a method , which takes input String without
space, to replace the characters from the strings which are not present in dictionary with –
Example: Dictionary – a*
………….Input- aaabaa
………….Output- aaa_aa
Interviewer was cool. Did not code properly (lots of bugs were in code), but gave good approach for
first question. For second question solution sent in a mail.
Round 2 (Telephonic):
2. Write a program to return nearest elements from a binary search tree for input element.
This round was very good. Interviewer was very happy with my approach for both questions. Code
did not have big bug.
This article is compiled by Neha Gupta. Many Many congratulations to Neha. If you like
GeeksforGeeks and would like to contribute, you can also write an article and mail your article to
[email protected]. See your article appearing on the GeeksforGeeks main page and help
other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-27/
Amazon Interview | Set 28
Hi, I was recently interviewed for SDE1 position for Amazon, Hyderabad but was not able to make it
through. Although I wasn’t selected but it was a good experience and GeeksforGeeks has been very
helpful.
Round 1 (Written):
There were four questions which had to be submitted in a time span of two hours. Questions were:
1. Given a character string, display the characters that appear more than once in that string.
2. Rotate a matrix 90 degrees to right
3. Convert a BST to DLL.
4. Find kth largest element in a given BST.
Round 2 (Telephonic):
1. First question was to get two numbers fro a BST whose sum was equal to k. I answered it using a
preorder traversal to get a sorted array and than starting two index from both ends to find if two
elements with sum as k exist or not. He than asked if it can be solved without using an array or extra
space. I tried solving it by traversing from two ends of the tree in preoder and reverse preorder
fashion and it took some time to code. Dry run of the code seemed to be right but I wasnt sure.
Anyways the best way of not using extra space can be to convert tree to DLL (in space) and use the
same technique as used on array.
2. For second question I was asked if I had heard the question before or not. Question was that a a
matrix is given with its rows and columns sorted and an element is to be searched in that matrix. I had
heard the question before but had not solved it and told the same to the interviewer. After thinking for
a while I could get an algo by starting at the rightmost element of the first row. If element if bigger we
move down or else we move right. The solution was fine but he doubted that I had solved it earlier.
3. He asked to write a program of finding the square root of a number without using library functions.
I had done it before and told him the same. I used Newton-rapson method to get the solution but he
wanted it through something on the lines of binary search. I almost got the solution but may be I was
running out of time so he dropped the question there only and asked me to dictate the solution of 2nd
problem.
Two days later I got a call that I have cleared my telephonic round and have to be present in
Hyderabad for further rounds(four). Arrangements done my Amazon and I appeared for the further
rounds on 27/4/2013 in their Hyderabad office.
Onsite:
Round 1 (Technical):
1. First question was to find the vertical sum of a binary tree. I told him the solution using and
array/hash. Whenever we move left we decremented the index while moving right we increment the
index. The solution looked fine to him but he wasn’t very comfortable with negative indexing. So he
asked for another solution using doubly linked list. Initially I wasn’t getting it but when he gave some
hint I was bale to solve it but it took some time to cover edge cases. With the final solution he looked
convinced.
2. Next question was to have Stack operations of Push, Pop, and FindMax in O(1) time. I started
doing this using only one index of max variable but than I realised I needed max index at all levels so
gave him a solution using two stacks. One having the element and the other having the corresponding
max index. He looked convinced with the solution.
Round 2 (Technical):
1. In second round there were two interviewers and coincidentally one of them was the same guy who
took my telephonic interview. First question was related on how to chose the ‘related’ items list
whenever a product is displayed on Amazon website. the problem was to find the least related
product for a given product. Initially I answered using n-ary tree but told him that we would have
duplicate entries. He asked for optimized solution so I suggested using adjancy-list nut finally
realized that it can be solved using graphs. They were convinced and asked to code. I solved it using
a Queue so while traversing a matrix we pushed in the elements in the queue with their level of
relation. They were convinced with the solution.
2. Second question was to delete an element from doubly linked list. I solved it but missed out on and
edge case where the element to be deleted is not present in the list. I added that check later.
3. Third was that for a given BST invert the signs of the elements and finally have a new BST. It
clicked my mind that after sign inversion it will be a mirror tree and gave the solution for the same.
Till this time feedback looked fine.
Round 3 (Technical-Managerial):
1. The next interviewer was senior guy and asked me about my work. Explained him in detail.
2. Later he asked me that for a given binary tree having three address fields i.e. left, right and bfs
successor, left and right fields are filled and the successor field is to be filled. I solved it using level
order traversal with a queue but he wanted solution without using extra space. I was taking time to
solve it when he gave hint about keeping track of the parent. After this hint I was able to solve it with
few conditions missing but with his intervention I was able to give a working code (as looked to him
and me).
Round 4 (Technical-Managerial):
1. There were two interviewers. First question was tell me about yourself and your work.
2. Given a m*n matrix, we need to find the number of ways by which a bot can reach the (m-1,n-1)
block if bot can move only right and down while starting from (0,0). I gave him a solution using DP.
Build the recursion tree showing the final solution. He didn’t ask to code but asked to finds the
recurrence relation. I got stuck I don’t know why. I guess this was the start of decline. he gave some
hints and I was finally able to write it, still.
3. For a given binary tree and a key, prune the tree with all the paths (root to leaf) that have sum less
than or equal to k. I was able to solve it with some hint. The solution looked convincing.
Four days later I got a mail stating that “Unfortunately, we are unable to take your candidature
further, at the moment. However, your credentials are extremely impressive and we wish to retain
your details on our active database. We shall get back to you as soon as another similar
opportunity opens up.”
This article is compiled by Rohit. If you like GeeksforGeeks and would like to contribute, you can
also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-3/
Amazon Interview | Set 29
I am very much excited for sharing my experience for Amazon, i went through 6 rounds and really
enjoyed a lot for facing all of them and i feels like in each round that GEEKSFORGEEKS is the one
the best site which gave me lot of ideas for solving the problems, This is THE BEST site for coding
for getting good questions and also for improving our skills and creating our base SOLID.
2) Count the number words words + spaces + special chars in a given string
Solved three successfully with all cases but for one some cases was missing because of network
issue i was facing time problem.
For all i need to write the code, and i was feeling like i was doing fast and being on expectations of
the interviewer, he was so happy with me.
3rd Round >> FACE TO FACE (It was nice, it went thru 1hr)
1) Write a code for inverting the values of BST and return the new tree’s root
(In place i have to do this, first i have given solu. with O(n) space with O(n) complexity )
2) Finding the element in O(m+n), in a sorted matrix which is sorted in row as well as in column.
(I said i know this, so i just told the approach and we skip that !!)
4th Round >> FACE TO FACE (It was Amazing, it went thru 1hr 30 mins)
5) One very nice question, i need to calculate the area for rain drop which will be holded for bar
graph(Its basically a very real world problem, i love to do that, even i did mistakes but they guys are
really awesome they helped me out to get rid of my problems)
5th Round >> FACE TO FACE (It was Damm Amazing, it went thru 1hr 15 mins)
1) I need to write recursion function for a robot which has to move from one location to other location
in a grid.
In recursion i took time to write the base cases, but finally with some hints i was able to make it.
2) I need to code for k-heavy path approach and also need to write its recursion.
There also i was continue taking to the interviewer and clearing my doubts and using the hints given
by him. Finally i was able to code it and do the recursion also.
Every time i need to write the recursion in mathematical form and calculate the Complexity also like
we have to do normally for detecting the complexity.
3) Project Question !! Scalable problems !! Dealing with N dimension study and mathematical
problems, even covering my whole resume.
Finally he was very happy and said to me that you need to think proper then code or design, rest is
awesome !!
6th Round >> FACE TO FACE (It was with the Hiring Manager,i guess, it went thru 45mins)
1) He asked me about my whole projects and lots of about my resume and my challenges faced till
now, it was good to explain all those.
2) He asked me to design an approach which will search all the valid combinations of a given string.
I have given some approaches like implementing TRIE, and explained the pros and cons for it and
also the complexity of it.
Then i modified it and explained the Other approach which is better than the above by using HASH
MAP and INDEXING with buckets if valid words.
We had lots of discussion on it. and Finally he said we are looking for guys like you.
Finally i have the offer Letter From Amazon and He asked me for Coffee Or Cold Drink. I Have taken
Coffee.
Finally a Gold Medalist 2yr Exp. guy who is doing a very nominal job, got a Right place to work
which is AMAZON !!
Heartly Thanks To GeeksForGeeks Community And Their Coding Stuff Which is available in Site !!
This article is compiled by Pushpendra Mishra. Many Many congratulations to Pushpendra. If you
like GeeksforGeeks and would like to contribute, you can also write an article and mail your article
to [email protected]. See your article appearing on the GeeksforGeeks main page and
help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-29/
[TopTalent.in] Interview with Rizwan Hudda
Who Was offered The Highest Package In
India By Tower Research
Tower Research Capital LLC is a financial services firm located in New York that specializes in
quantitative trading and investment strategies. Founded in 1998, Tower develops proprietary trading
algorithms by using rigorous statistical methodology to identify non-random patterns in the behavior
of markets (Phew!). Hence for obvious reasons, Tower Research is staffed by employees who are
highly proficient in Mathematics, Computer Programming, Physics, Law, Economics, Engineering,
Finance. Tower Research recruits smart individuals mainly from premier institutes like the IITs with
either of the above mentioned backgrounds.
We have interviewed some of the most amazing people in the past who have received job offers from
world’s best companies with salaries unheard of, but nothing beats Rizwan Hudda who graduated
from BITS Pilani and IIT Kanpur and would be joining Tower Research’s India office very soon for a
salary of INR 44 LPA. That’s right, you must have seen newspaper articles with US salaries
converted into Rupees but this is nothing like that, which is exactly what makes Rizwan’s
achievement so unique. Just to put this in perspective, Microsoft for example offered 55 LPA
(converted to Rupees) for engineers joining their Redmond office while 14 Lakhs for the same
position from their India office. The rest we would leave for our intelligent audience to decipher. And
not to forget, we are only taking into consideration all the offers made to engineering college grads
just out of college.
As always Rizwan has also agreed to share his stellar resume with our users. So click here to
download his resume by logging in. Read the candid interview with Rizwan Hudda as he talks about
how he got the offer and how you can do it too.
TopTalent : What’s it like to interview for the post of “Strategist” at Tower Research?
Rizwan: It was a unique experience, all the interviewers were very friendly. I was given different
math puzzles to test my problem solving skills and math aptitude. I got hints when I was completely
stuck, they would let me know if I was going in the correct direction, etc. I was asked lot of questions,
all of them were of this format mainly: Design the most efficient algorithm for task X ? or formally
prove mathematical claim Y?.
I really enjoyed the whole experience of giving the interviews. It was much more interesting
compared to the regular SDE interviews because most of the questions asked in tower interviews
were unknown to me before. I would say the interview process was super candidate-friendly.
TopTalent : Can you describe the hiring process and what exactly you would be working on?
Rizwan: There was a written test on campus a couple of days before the final interviews. On the day
of final interviews, there were 3 interviews, candidates were eliminated after each round. My job
description would be to use Math/Stat/Algorithm skills to analyze the financial data, and design/test/
deploy high frequency trading strategies for the company. I am expecting it to be a challenging and
interesting role.
Rizwan: I practiced the math questions at gurmeet puzzles and CSE blog a week before the interview.
They helped me get an idea of the kind of questions asked in the interviews, and build some
confidence. Also, I am semi-active in competitive programming hence was in touch with
algorithms/coding. I was one of the winners of the All india programming contest conducted by
Tower research capital, I think that worked well in my favor.
TopTalent : What would be your suggestion to other aspirants who are aiming for something
similar?
Rizwan: Well, first of all practice the questions from sites that I suggested. These are some really
good sites and the questions are quite challenging. It’s always good to keep solving such questions on
a regular basis to be in the groove. Also, being attentive in class and revising your course work does
help a lot. In particular discrete mathematics, algorithms text books are something worth looking at
before going for the interview. Finally, participating in online competitions like SPOJ, Codechef etc
has been extremely useful for me and I would urge others to participate in the same if you aren’t doing
it already. It really helps in understanding how competitive you can be and where do you stand
among some really smart people.
TopTalent : How many coding competitions have you won till date?
Rizwan: I have always participated in a number of coding competitions from college techfests,
company contests to competitive programming platforms. I have mentioned most of competitions that I
have participated, in my resume. Some of the competitions that I have won include All India
Programming contest O(log n) – Oct 2012, MNIT Code of the Day (10 day contest) – Oct 2012 and
Yahoo HackU IITK (Team contest) – Aug 2012
PS: If you think there are others who have received similar packages in India, we would be glad to
interview them. Please email us the details at admin [at] toptalent [dot] in
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/toptalent-in-interview-with-rizwan-hudda-who-was-offered-the-
highest-package-in-india-by-tower-research/
Amazon Interview | Set 30
I have attended the interview for Software Development Engineer position and got the offer from
Amazon.
I spent a lot of time in GeeksforGeeks going through the precise and simple explanations of complex
problems, which helped me to sharpen my mind. Really, its a great work by the geeks and I am happy
that I am a part of it.
Round 1 : Write a program to solve the below problems. (Time 1.30 hrs)(Written Test)
1. Given a string in the form of a Linked List, check whether the string is palindrome or not. Don’t use
extra memory. Give the time complexity. The node structure is
Class Node {
Char data;
Node next;
}
2. Given a Binary Search tree along with the parent pointer, find the next largest node for the given
node. Give the time and space complexity. The node Structure is
class Node {
Int data;
Node left;
Node right;
Node parent;
}
3. Given a sorted array which is rotated n number of times. Find out how many times the array is
rotated. Time complexity should be less than O(n).
4. Given a matrix mxn, where all the rows were sorted, print the elements in the matrix in a sorted
order.
….a. I gave a solution with O(mxmxn) time complexity.
….b. He wanted a solution in O(mnlog(m)) time complexity and gave a hint to use heap.
….c. Code for the same.
4. How you will handle the conflict with the team member?
7. Given a floating point number, write a program to convert it into a string. The number of digits after
decimal point can be more than 1000.
3. Given a Binary tree, connect all the leaf nodes in the form of a doubly linked list. Don’t use extra
space.
4. A scenario was given about two robots and its functionality. Write a program which will be
running in both the robots which will perform the specified functionality.
5. Given an integer, find the next largest integer using the same digits as in the given integer. For
example, if 12345 was given, the program should return 12354.
Round 5 :
1. Tell me about yourself.
2. Explain what you have done in your previous company.
4. What are the developments you have done and what impact it will be having?
6. Questions on threading.
Source
http://www.geeksforgeeks.org/amazon-interview-set-30/
Google Interview Experience for Technical
Operations Specialist[Tools Team]
Adwords, Hyderabad, India
My Google Interview Experience, [Hope this is helpful]
I am AnandhaKumar .P – 2012 IT pass out from College Of Engineering Guindy, Anna University.
As many of the enthusiastic 2012 engineering passed outs, i too applied for a job in Google jobs
page. I know that its very difficult that a resume gets noticed by google.
Suddenly one fine day i got a call from Google HR saying that they are interested in my profile and
asked me if, i was ready to go with the interview process[Come on! who will say no for Google]. I
was surprised.
Questions
1. Given a source array of integers with possible duplicates and a target integer, write algorithm to
find out 2 numbers in source array whose sum is equal to target integer.
http://www.geeksforgeeks.org/write-a-c-program-that-given-a-set-a-of-n-numbers-and-another-
number-x-determines-whether-or-not-there-exist-two-elements-in-s-whose-sum-is-exactly-x/
USERS
– user_id
– team
MANAGERS
– manager_id
– team
If I am a manager, write a select statement to retrieve the work of all users who belong to my team.
The mapping of user to team and team to manager are defined in the USERS and MANAGERS table.
3. In a Chrome extension, which file contains the most important information of the extension like
version, pattern matches, etc.
4. There are three rooms, and there are Princess, Flowers and Snake in those rooms. The doors of all
the rooms have incorrect nameplates. i.e., the nameplate for the princess’ room is not Princess.
Similarly, the nameplate for the Flowers’ room is not Flowers. You need to find the room of the
Princess without going to the room of Snake. How do you find?
6. What are some of the most popular Data interchange formats when using APIs
8. How would you change the format of all the phone numbers in 1000 static html pages?
9. If you had an opportunity to design the Google Suggest system, please let us know how you would
approach it and how you would execute the plan in terms of settings up systems like(data stores or
databases, indexing services etc)
10. How do you find out if a number is a power of 2? And how do you know if it is an odd number?
Write code in the language of your choice.
Since i have prepared for tech interviews like amazon, i was able to do it good.
My sincere thanks to geeksforgeeks[You r doing a great Help]. My entire preparations are only from
this site.
After a week i got a call from HR and informed that i cleared the first round .
Then after two days i was told that i will have a telephonic interview with one of the google
developers from adwords team .
There were two interviewers on phone. First they asked me to run through my resume.
A basic math question that, even a school student can solve. But in that tension i was not able to do it.
I took some time and finally gave him a answer. I myself knew that it would be wrong. But
interviewer said great lets move on to next question[just to boost up me – good person].
My actual job role revolves around developing tools for the the ad review team which will
review the ad and reject illlegal ones. So third question was related to that .
He told me that as i am from a tech background, i need to explain him technically wat will i do. He
also said that he did not need the actual solution. They will just see the way i approach the problem.
That an existing problem and they are open to suggestions.
3) In google adwords there are about 30 million ads from 42 lanuages . Wat will i do review the ads
and reject ads that do not comply with specific rules .
Regarding the criteria under which google bans a ad as illegal – i discussed about different criteria .
a) designing a autobot which will automatically click ads link and check whether it is redirecting to
correct page or not . Autobots are used by hackers to get money for the ads they posted . I suggested
that by designing similar autobot we can validate the link.
For trademarks also i discussed using similar datastructures and the interviewer was ok with my
answer[i thought].
He said that “We are done with here . The HR will contact u later ” and asked any questions “i asked
few questions about the work they do in google” . and finally i finisehed with “Hope u r enjoying in
GOOGLE ! ” He said “Of course yeah !”
I thought that i did the first and third questions well but screwed the easy second question . i am sure
that i will not get selected for the onsite interviews because of that . I told to myself ” dont worry yar
! u r not lucky enough to join google !”
Thank you for your interest in Google. We carefully reviewed your background and experience,
and though we do not have a position that is a strong match with your qualifications at this time,
we will be keeping your resume active in our system. We will continue to use our database to
match your profile with new opportunities and will reach out to you if we find an opening for
which you may be qualified.
Thanks again for your interest in Google’s careers and unique culture; we hope you will remain
enthusiastic about our company.”
I write here because when i got fixed for interview with google for the tech ops specialist role. I
searched in net about the interview experience for that post. But i couldn’t get it. all i got was the
interview experiences for software engineer, adwords posts. SO i think that it will be helpful for
someone in future.
This article is compiled by AnandhaKumar. If you like GeeksforGeeks and would like to contribute,
you can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/google-interview-experience-for-the-post-of-technical-operations-
specialisttools-team-adwords-hyderabadindia/
[TopTalent.in] Interview With Nandini from
VNIT Who Bagged an Off Campus Job in
Microsoft
It is not just intelligence but intelligence coupled with inherent confidence is what makes
a person truly remarkable. It is these truly remarkable people who go that extra mile to achieve their
dreams. Nandini Yeltiwar, a student of VNIT Nagpur, bagged a job in Microsoft India, not through
campus placements but through the off-campus employee referral channel. She was happy to share her
experience with TopTalent and gave us some interesting insight into how she landed a dream job in
one of world’s top software companies.
So here is her interview where she talks about the Microsoft interview process and how she landed a
job there. Don’t forget to download her resume by logging in to understand what makes her special.
Nandini: We had applied off-campus through employee referral and we were initially shortlisted
based on our resumes. The first two rounds were an aptitude test followed by a coding round test in
which we were required to give syntactically correct code. The coding round had short basic coding
problems. After each round some applicants were eliminated. People shortlisted from coding round
had a phone interview which had mostly behavioral questions. They went through our resume and
asked us questions on internships. Some of us were even asked technical questions in this round.
Those of us who cleared the phone interview were called to the Microsoft IDC campus in Hyderabad
for the technical rounds of interviews. There were three rounds which focused on each of the different
positions for freshers which are Software Development Engineer and Software Development
Engineer in Test. The technical interviews mainly stressed on data structures and algorithms. One
round was entirely focused on testing. For each proposed code we need design test cases and hence
verify the code.
TopTalent: What skills according to you was the company looking for in candidates?
Nandini: The company looks for candidates who are strong in algorithms and programming and have
good problem solving ability. They’ll start off with simple problems and they’ll keep adding more
conditions to the problem. They require you to be good at optimizing the answer and modify the
solution after each condition that is added. You need to be good in communicating your logic to the
interviewer. In case of testing, they expect you to cover all boundary and special conditions.
TopTalent: What was that x-factor which might have helped you over others?
Nandini: My final year project was on testing a software produced by a company. I feel that this made
me a good fit for the testing profile since I studied quite a lot about testing due to the project. Apart
from this, I had practiced a lot of coding questions, available on Internet and through various books,
before the interview which helped me in clearing technical interviews successfully. I had given quite
a few interviews at campus before appearing for Microsoft, which helped in handling interviews
well.
Nandini: The initial screening was based on our resume. However, the resume is not very important
once you start the interview process, though a striking resume always helps. It’s alright if you do not
have impressive internships and projects. They don’t expect rocket science from freshers. They do
ask questions on the projects and internships listed on the resume in the phone interview so be well
versed with all the projects you mention. You need not have a lengthy resume mentioning every small
thing you did, but a short one having the major things. Whatever you mention in the resume you need
to know it well in order to answer any type of questions on it.
TopTalent: What tips you can give which might help others applying to similar jobs?
Nandini: I would recommend practice. Improve and practice coding problems, basic data structures
and algorithms. During the interview there won’t be any compiler or syntax highlighter, so be
proficient in writing code on paper or a white-board. Always communicate your logic to the
interviewer. Sometimes they may forgive stray syntax as long as your logic is sound. You will be
asked some testing questions which you need to crack even if you aren’t interested in the Testing
profile. For such problems, develop test cases based on the requirements of the software. During
interview keep telling the interviewer the ideas or the way with which you are thinking to solve the
problem, this is always appreciated and they can even help you in case you get diverted from the
proper way of solving.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/toptalent-in-interview-with-nandini-from-vnit-who-bagged-an-off-
campus-job-in-microsoft/
Microsoft Interview | Set 19
I recently got interviewed for a position in Microsoft, following is my interview experience.
Round 1 (Telephonic):
Started with my introduction followed by my work in existing company.
1. Given a circular doubly linked list, delete a given element. He was looking for all the corner cases
Round 2
1. Given an integer array find largest sum of elements which is continuous (kadane algorithm), Later
asked to make code changes to find the array also. Also asked to give test cases for the same.
2. Given a design of an application, comment/recommend the changes to be done
Round 3:
1. Given two linked lists check if they intersect??
2. Test cases to test an ATM
Round 4:
1. Find least common ancestors of a binary tree ( I said I know this, he moved to next question)
2. Check if one array is subset of other ( discussed different methods like hashing, sorting ), asked to
write a sorting function also
3. Design questions related to the team they were interviewing for.
Finally I got an offer from Microsoft, they are very pleased with my performance. All the
interviewers are very friendly. Thanks a lot geeksforgeeks, with out your help this would not have
been possible.
This article is compiled by Chandrakanth. Many Many congratulations to Chandrakanth for his
selection. If you like GeeksforGeeks and would like to contribute, you can also write an article and
mail your article to [email protected]. See your article appearing on the GeeksforGeeks
main page and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-19/
Fab.com Pune Interview Experience
1) Started with telephonic interview –
a) Find the occurrence of first 1 in an array and the array contains only 0s and 1s in sorted manner.
b) Design a datastructure to get minimum path between computers and printers in a network.
Printers are getting dynamically added to our model.
I really liked their interview process because it was very much different from other big companies
like Amazon, Adobe or Microsoft who actually tests your mugging skills. If you go without any
preparation, still your logic will make you clear their interview. I did get an offer from fab.com.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help.
Source
http://www.geeksforgeeks.org/fab-com-pune-interview-experience/
1st Round – Written test to be completed in 1hour 20 mins containing questions on C++, SQL and
Aptitude questions. The questions were really tough and considering the level of questions one might
feel that the company is really technically sound. But believe me as you read you are going to get
shocked.(Hint: For Aptitude questions, Please do a reverse solving, because you get 30 mins for 15
apti questions)
2nd Round –
1) Given a matrix with row sorted and column sorted, find the number given
3) What is copy constructor ? Write its syntax ? Brief about virtual functions and real time use case of
it.
This round is the most funniest – Believe me the interviewer was the Vice-President of the company
and he did not know the basics of Operating system. It was kind of very irritating to talk to such
people in the interview. If their package wouldn’t have been good, I would have made him realize the
current era
3rd Round –
2) Write a code to crash OS ( After listening to this question, I was shocked ? What does he actually
want ?) I tried to answer this. Then finally he says write calloc in an infinite loop ( Now you all get
and believe me this is a technical answer from the vice president of technology division of GoldMan
Sachs and in US they compare them with Google. LOL)
This is not it. This was actually the super day where they filter people from the crowd.
4th Round –
a) Implement a max stack using one stack(Hint: Use amortized analysis) and don’t use two stacks to
solve it( I solved using two stack and finally optimized space and he told me to write the complete
code
b) Question on Trie data structure – I don’t remember the question but it was a direct question
5th Round-
a) Find the number ABCD such that when multipled by 4 gives DCBA.
6th Round –
b) Take the 4 men across the bridge and only 2 can cross(simple puzzle)
c) Measure 90 and 50 kg of sugar using 7 and 2kg of weight and you can use the beam balance only
thrice.
7th Round –
b) Asks the puzzle of heavy coin and told me to generalize the same. I solved the puzzle and
generalized it.
Again the manager was the vice president, who dint know what a ceil function was since the
generalized version of this puzzle was ceil(log n to the base 3)
Finally after so much rounds, he says will you join the support profile ? I was like what a support
profile. I told him no and believe me my interview was 95% correct. So please be aware of GS, they
call for C++ and they finally offer support role.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help.
Source
http://www.geeksforgeeks.org/goldman-sachs-interview-experience/
Adobe Interview | Set 5
1st Round(Written Test)
Consists of three sections with each section 1 hour to solve. Hence the written round was for 3
hours. I really liked the written round since it consists of everything starting from writing code(LCA,
GCD, Middle of Linked list), Number conversion, Reduction of Boolean functions, Prefix to Infix
Expression and evaluation of expression algorithm and finally aptitude.
The written round consists of more or less everything one could imagine and it is far better than other
companies like Amazon or Microsoft. But of course, Adobe does repeat questions .
Adobe’s Interview Process was very good since in this month, I had given interviews of Amazon,
Samsung, GoldMan Sachs and Fab which I have already shared with GeeksForGeeks. What I Like
about their interview was their way of perception, they were judging people based on thoughts and
not just bookish answer. In fact, one of the interviewer was rejecting people if you give a book
answer.
a) Heavy discussion on Merge Sort, Amortized Analysis of Heap Sort – Made me solve recursion
etc
b) Made me write the complete code for dictionary of words(Trie data structure)
This interview had only one question and it went on for atleast 1 hour. It was a OOPS Design
question
a) Serialize and deserialize the object in an optimized way( I gave him the idea of Spill overflow
etc). I actually took a deep dive by optimizing in bit level) . After the algorithm, he made me design a
library such that if there are 100 clients to my lib, it should be maintainable and flexible.
It was a subjective answer but since I have 2 years of Work ex in C++. I did give him a nice design.
4th Round(Tehnical)
c) And then discussion started on my projects. It was again depth of C++ programming
5th Round(Puzzles)
a) Only puzzles were there in this round. And all the puzzles could be found on net
6th Round(Technical)
a. Considering algorithm wise I explained him repeated doubling and linked list implementation.
b. Design wise, templatized the answer with heavy use of virtual functions to make the code
generic and maintainable over a period of 2 years. Debate on what should Pop return when we
templatize it ?
b) Reverse a string word by word in place without using the swap function. The string in not-
editable. This question was tricky as he kept building the question with constraints. But I really
enjoyed it
7th Round(HR)
Finally after many interviews I got through Adobe. I did have offers from other companies but Adobe
was paying well. I thank Amazon for rejecting me else I wouldn’t have even sat for Adobe
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help.
Source
http://www.geeksforgeeks.org/adobe-interview-experience/
Amazon Interview | Set 31
Recently I attended the Amazon walk-in and got selected for the position of SDE I.
Written test:
1. Write a code to convert tree to DDL(assume tree node contains pre, next pointers and set as null
intially.)
3. Find the sum of elements in after nth iteration for below operation on array.
iteration2: 0 -7 8 sum= 1
Hiring Manager:
1. Find the nearest leaf node from given node in binary tree..
use post order traversal.. like LCA in binary tree
2. Find the first k largest numbers from large file size. Explain solution for
Tech:
1. Design N-ary tree, to make sure that lock and unlock operations can be done with minimum
complexity (height of tree)
a node can be locked when its ancestors or successor are not locked.
we can a unlock a node a any time.
2. a[] = {a,b,c,d,e} b[]={f,g,h} result should be = af+bg+ch+df+eg
Tech:
1. Design a tree, in which a root can have unlimited children and write a code to print each level in
separate level
2. Print the anagrams present in a huge file (each line in file contains one word and you didn’t have
any constraints like limited memory etc..) for a give string
Like all Amazon interviews in GFG, here interviewer more concerned about edge cases and perf perf
perf perfect code.
Thanks a lot GEEKS FOR GEEKS and my dear friends Ramesh, Purush, Jhadey for helping me in
preparation.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help.
Source
http://www.geeksforgeeks.org/amazon-interview-set-31/
Amazon Interview | Set 32
I would like to contribute for GeeksForGeeks by sharing my experience of Amazon Interview
process. This was for a SDE position in Hyderabad. I have almost 2 years of work experience in
Samsung.
Input #00:
When riding your bicycle backwards down a one-way street, if the wheel falls of a canoe, how many
ball bearings does it take to fill
up a water buffalo?
Hello Howard.
Output #00:
e6
al 7
a3
Hlo 2
Qs-2) http://www.geeksforgeeks.org/construct-a-special-tree-from-given-preorder-traversal/ –
Variation of this one
Qs-3) http://www.careercup.com/question?id=12998667
Qs-4) Rotate an M*N matrix by 90 degrees. There was no function given in this case. Everything
should be assumed by you only.
I solved 4 questions with all test cases while for another 1 only 10/15 test cases passed.
Qs-2) A person can jump 1 or 2 steps. No of ways of reaching the top of n stairs. (Try for O(1)
space.)
Qs-3) Find the longest substring in a string with exactly 2 unique characters. The substring should not
contain more than two different chars.
Expected = O(n)
I answered all the 3 questions and was confident of receiving the call for onsite which I did.
F2F ROUND 1:
Qs-1) The question was to print a tree vertically. Please note it was not asked to get the sum at each
vertical level. We have to print nodes at various vertical levels starting from the leftmost vertical
level to the rightmost vertical level.
I suggested array of vector then a hashing. Finally I gave a solution based on DLL.
Qs-2 ) Only approach was asked on how will you save a binary tree in a file( Not a BST)
F2F ROUND 2:
Qs-1) First I was asked to design a Data structure with O(1) insertion and O(1) search. I told about
hashing. Then he told me to get a random number from the current list of numbers which have been
inserted into my Ds. So I maintained an array storing pointers to the hash table.(Assume no Collision,
he told so).Then he said O(1) deletion also. I was stuck on this I was not able to make both deletion
and getRandom in O(1).After Some Discussion he moved on.
Qs-2) He told there is a range, defined by a min val and a max val. In a given array I had to find all
elements within the range. I told him its only possible in O(n).We have to look at each element. Then
he told me to assume array as sorted. Then I used Binary search for finding indexes of ceil of min and
floor of max to find the elements in the range.
This round went ok for me.2nd question i wrote proper code with all edge cases, but in first I got
stuck a bit.
F2F ROUND 3:
Qs-1) In a binary tree, a complete path is defined as a path from root to a leaf. The sum of all nodes
on that path is defined as the sum of that path. Given a number K, we have to remove (prune the tree)
nodes from the tree which lie on a path having sum less than K.
Note: A node can be part of multiple paths. So we have to delete it only in case when all paths from it
have sum less than K.
I was able to solve the problem and write correct working code for this.
(Hint : Think of a bottom up approach.)
Note: Values in tree can be -ve also.
Qs-2) A robot problem: No. of ways to reach from 0,0 to m,n in a m*n grid. I had to tell recursive
function only. No code required.
This round went very good for me. The first question was a bit tricky but solving it raised my
confidence.
Qs-1) This was mostly a HR Based round. A lot of questions about my previous work, my initiatives,
challenges I faced and many other questions.
A simple question on matrix was also there. Fill rows and cols with ones if a 1 is present in that row
or a col. Code also required.
Question based on shipment and orders etc. Eg: What all things to take care in b/w of order placed
and item shipped. What all factors and things you will consider.
I was being interviewed for transportation team. So questions based on it.
F2f Round 5:
Qs-1) In a binary tree, return true if all leaves are at same level and return false if all leaves are not
at the same level.
Qs-2) An array is given which is first increasing and then decreasing. Find the pivot element. Need to
take care of all the edge cases.
This round went well for me. Mostly this round was on soft skills. I did well in coding questions and
wrote proper code for both.
I would like to thank GeeksForGeeks Team for being a great help for me.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help.
Source
http://www.geeksforgeeks.org/amazon-interview-set-32/
Amazon Interview | Set 33
I recently attended a walk-in for Software development Engineer (SDE- 1) at Amazon, Bangalore.
As I was from the same city, there was no phone interview. I have listed down all questions that I
remember.
Interviewer just started off with questions without introduction and stuff.
1) Given a singly linked list, swap every 2 nodes, for odd number of input; retain the last node as it
is.
Eg: Input: 5 13 15 18 20 11 6 7
Output: 13 5 18 15 11 20 7 6
I was asked to write the code straight-away.
Wrote the same, verified boundary cases and discussed.
2) Given a binary tree, find the number of pairs where sum of 2 nodes’ values equal to k
Eg:
1
2 3
4 5 7
2) Given a function isGreater, compare user defined objects and then return the object that is greater
than all other objects.
Twist: obj1 > obj2 and obj2 > obj3 does not mean obj1>obj3
I asked for the use case for the same, as I was not convinced with the problem.
He gave an example of games/ 1 team winning another.
Discussed the approach and then wrote the code.
3) Given an input sentence, output the non repeated words in the sentence.
If the interview feedback was bad for any of these, the candidate was eliminated. If at least 1 of these
went well and other “not sure”, then too candidate is called for next rounds.
What are the things that you’re not good at and need to improve?
Serialization of Binary tree. Given 1 traversal is it possible to re-construct the binary tree.
1) Given a n (large number) lists of customers who visited n webpages on n (large number) days,
design a data structure to get customers who have visited the website on exactly “k” days and should
have visited at least “m” distinct pages altogether.
Was then asked to improvise the solution as much as possible
Round 5: Coding, Algorithm and data structures (Technical round with a senior developer)
2) Given a 2 dimensional array sorted vertically and horizontally, search for an element and return
true if the element is present. (Algorithm, Code and Complexity)
Example
1 5 13 29
11 16 25 38
45 49 52 57
51 54 59 66
There are ‘n’ gold boxes placed in a row, each having different number of gold coins.
2 players play a game, where the motive is to collect the maximum number of gold coins. Each player
can see how many coins are present in each box, but can get a box from either end only, on his turn.
Design a strategy such that Player1 wins (Assuming both players play smartly)
I got the hiring call after couple of days, after my last round of interview. They said feedback was
very positive and they’re happy to hire me.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help.
Source
http://www.geeksforgeeks.org/amazon-interview-set-33-2/
[TopTalent.in] Interview with Manpreet
Who Got Offers From Amazon, Hoppr,
Browserstack, Reliance via TopTalent.in
Manpreet, a graduate from BITS Pilani, has an inspiring tale for all those who believe that campus
placement is everything. After applying for companies like facebook and google and having hard luck
with all of them, he continued his research as a short term scholar at Carnegie Mellon University. He
then, after his research, registered withTopTalent.in and he now has offers from Hoppr, Browerstack,
Reliance and Amazon. He finds it hard to select one. He finally narrowed it to Amazon with a lot of
difficulty. Read on to see what Manpreet has to say about his journey so far.
I am an Information Systems graduate from BITS Pilani,Pilani Campus. My work has been focused
mainly in the Computer Vision Research. I worked in Central Electronics Engineering Research
Institute Pilani. After graduating I continued my research as a short term scholar at Carnegie Mellon
University. After coming back to India I worked to scale my brother’s startup. On creating strong
foundations for the company to grow, I had to move on with a job. Hence I prepared and applied to
companies through TopTalent.
TopTalent: Can you describe the interview process for Hoppr, Browerstack,Reliance and
Amazon?
Hoppr : The first round was an online round with questions on algorithms. I was asked to solve any
one out of three questions in one and a half hour. Somehow I found the questions quite intuitive and I
was able to solve all three questions in the same time and hence the interviewers got impressed and
without taking any further rounds reverted on phone with an offer.
Browserstack : This was the most realistic interview I ever gave and that’s why I would share some
details. The first telephonic round was algorithms/OOP based. They were moderately tough, just the
kind of questions which are expected. The second round was coding on collabedit platform. I was
asked to write optimized code and scripts for problems. The interview didn’t have any time bounds
but the most distinctive part was that they took into account everything, from optimization of algorithm
to its output. The third round was a face to face interview involving hacking around the platform.
They allowed me to search online and gave me ample amount of time to solve the problem. Again just
simulating the environment how one actually faces in real job. The last round was HR round with the
Co-Founder of the company.
Reliance: There were two telephonic rounds related to product management. One round was focused
on writing a rough business plan. The manager was an intelligent MIT graduate. He discussed at
length with me about products reliance could launch to capture Indian market.
Amazon: The interview process was quite standard with 5 rounds. All of them were face to face
with algorithms questions. The first two rounds were with senior developers. The last two rounds
with the hiring managers were quite interesting because apart from my technical skills, I had to use a
lot more skills gained in my brother’s startup as well as research.
TopTalent: What was the toughest question you encountered and how did you tackle it?
The toughest question I encountered was by browserstack, which involved interacting with the
browser through code. I had no experience with anything related to web development. They allowed
me to use internet and gave me ample amount of time. I broke the problem into parts and solved step
by step, found some snippets, found some libraries, patched everything and to my surprise it worked.
This question was asked to measure person’s performance in a real job scenario where it’s not all
about coding skills but much more than that.
TopTalent: What advice would you give to others who are looking for similar opportunities?
I guess one should have perseverance and never lose hope. I had appeared last year for lot of
companies like DeShaw, Google, Facebook, Flipkart and got rejected from all of them. That’s way I
was able to know about my weakness and started working on them. Hence my suggestion is try till
you succeed. Registering with TopTalent.in paved my path to success. This saved me from the
annoying spam of walk-in interviews for voice processing etc. I applied for multiple jobs on
TopTalent and got call from more than half of them, which to my thinking is quite a good conversion
rate.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/interview-with-manpreet-who-got-offers-from-amazon-hoppr-
browserstack-reliance-via-toptalent-in/
Amazon Interview | Set 34
First of all, a very very big thanks to whole team of geeks for geeks. It is because of them only that I
was able to crack the interview process of amazon and get a job in my dream company.
1. Given three linked lists,where each linked list represents a number, add the three lists and return
the resultant list.
5->1->2->NULL
9->1->NULL
7->2->2->NULL
Output :: 1->3->2->5->NULL
2. Given an array and two numbers x and y, find minimum distance between two numbers x and y.
assume that x and y always exist in array and it may be that x and y are same also…
2. Given an array consisting of both positive and negative numbers, 0 is considered as positive,
rearrange the elements such that positive and negative numbers are placed alternatively, constraints
are that it should be in-place and order of elements should not change.
Question 2: given a matrix of size m * n, place k students in such a way so that cheating in an exam
could be minimized…. Was asked to just explain the approach, no code required.
Question 3: suppose a online chat between customer and serviceman, serviceman wants to reply to
customer as soon as possible…suppose text which is to be sent as reply takes 10 sec for being typed.
How can he make typing faster ?
My answer was using autoprediction feature, by which he will need to type less number of characters,
so typing will become faster..
Then question was extended to how to store the words for being used in prediction…
I answered a trie data structure which allows prefix matching..
Then question was further extended to write a code to traverse all the words stored in dictionary in
lexicographic order..
Question 2: Suppose a student needs to implement a bst structure to solve a problem, but instead he
used a linked list…. Then give an example of input sequence, in which his implementation works…
new value will always be added at beginning of a linked list.. so. Basically at each step after
insertion , root of bst and head of link list should point to same node. I was asked to provide the
sequence.
This article is compiled by Arun Jain. Many Many congratulations to Arun. If you like GeeksforGeeks
and would like to contribute, you can also write an article and mail your article to
[email protected]. See your article appearing on the GeeksforGeeks main page and help
other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-34/
Amazon Interview | Set 35
On-campus, 1 MCQ round, 2 coding rounds, 4 face-to-face rounds.
1. Given an array,find minimum distance between two given integers in the arrays. Note that the two
given integers may be same.
3-7-0-8
2-1
5-4-2
ans– 4-2-7-1
explanation- 3708+21+542=4271
1. Given an array containing both positive and negative elements, arrange in such a manner — 1
positive number, then 1 negative,then 1 positive and so on. If number of negative numbers are
more,extra numbers should be kept in end and vice versa. Note the order of negative and positive
elements should be same in the modified array and you are not allowed to use any extra space
2. Given a binary tree, replace each node value by sum of its children value.
Round 1
1. Level order traversal and then level order traversal in spiral form. Only algo, no code
2. Given a dl representing the spiral level order traversal of a binary tree,convert it to a binary tree
inplace. In Last level, nodes will be either to the right or left only. complete code in C
eg 1-2-3-4-5-6-7-8
o/p--
1
/ \
3 2
/ \ / \
4 5 6 7
\
8
Round 2-
very few technical questions
1. Given an array which is first increasing and then decreasing,how will you search an element?(only
algo)
2. Convert a n-byte integer from little endian to big endian.(code was required)
Round 3
Round 4
After some personal questions, the interviewer asked some technical questions as well
1. Suppose we receive requests for a page, but we want to ensure that max no of request per sec is
‘x’. If there are more than x requests,what will you do?
We want a continuous flow. How will you do that?
2. Suppose in a system, some processes are already running. Now when an user will give new task(or
process), he will give a list of processes his process is dependent upon. Some of those may be
running, some may not be running right now. You have to ensure that there is no contention, i.e., If a
process, Pj is dependent on process Pi,
Pj should not execute along with Pi. How will you ensure that? Complete algorithm with code was
required. The interviewer went on complicating the problem.
At last I used graph and 3 hashmaps to solve the problem. He was ok with it.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help.
Source
http://www.geeksforgeeks.org/amazon-interview-set-35/
Amazon Interview | Set 36
1 round (20 MCQ + 2 coding question)
3 face to face round, 1 telephonic interview.
Q-2) Given an array of positive numbers, find the maximum sum of a subsequence with the constraint
that no 2 numbers in the sequence should be adjacent in the array. So 3 2 7 10 should return 13 (sum
of 3 and 10) or 3 2 5 10 7 should return 15 (sum of 3, 5 and 7).
I was able to give him a DP solution with a Parent array which stores thee index of the parent of
every element,i hd put -1 for the first element,at the end I backtrack the array to find the all the
elements.
Q-1)
n1 pairs of “{} ” brackets
n2 pairs of “[] ” brackets
n3 pairs of “() ” brackets
I have to find the all valid combinations of all the pairs. I have to write the working code of it.
I gave him the solution with recursion and stack.
Interviewer asked some basics Questions on Design patterns, OOPS and OS,after the big Discussions
of all the Questions he asked 1 coding questions.
1st Question
————
There is a string, in which all the spaces are removed, we have to find the original string with the
help of a machine which takes input a word checks that it is valid or not.
Telephonic Interview
————————————-
Q-1) tree to doubly link list. O(n) and in-place solution is required.
Q-2) A array of N elements, we have to replace all the elements with nearest greater which is present
on the right side of that elements. O(n) is required.
If you like GeeksforGeeks and would like to contribute, you can write article and mail your article to
[email protected]. See your article appearing on the GeeksforGeeks main page and help
other Geeks!!
Source
http://www.geeksforgeeks.org/amazon-interview-set-36/
Yahoo Interview | Set 3
I would like to express my gratitude towards the GeeksforGeeks team, whose help saw me through to
Amazon’s interview rounds and getting placed at Yahoo.
After my final round, an hour later the results were announced. I and another one of my peers got
HIRED
This article is compiled by Pratyay Banerjee. Many Many congratulations to Pratyay. If you like
GeeksforGeeks and would like to contribute, you can also write an article and mail your article to
[email protected]. See your article appearing on the GeeksforGeeks main page and help
other Geeks.
Source
http://www.geeksforgeeks.org/yahoo-interview-set-3-2/
Morgan Stanley Interview | Set 1
Morgan Stanley campus placement for post IT analyst.
I really really thank geeksforgeeks for sharing very good questions for placement preparation.
If you like GeeksforGeeks and would like to contribute, you can write article and mail your article to
[email protected]. See your article appearing on the GeeksforGeeks main page and help
other Geeks!!
Source
http://www.geeksforgeeks.org/morgan-stanley-interview-set-1/
Morgan Stanley Interview | Set 2
Written Test:
10 aptitude and data interpretation questions, questions based on language of ur choice(C/C++/Java),
questions on basic Computer skills.
I was able to do only 2-3 out of 10 apti questions…and almost all C questions and Computer skills
questions.
Some questions:
Apti:
1) A person need to weigh 5 balls (weight30.So the person weigh two balls together (ie. Weigh all
possible pairs)..the values of weight of all possible pairs were given and we need to find the lightest
ball
2) Given 3 boxes with A having 2 white balls 3 blue balls, B having 1 white 4 blue and C having 4
white 1 blue. Find out the probability of picking 2 white and 1 blue if one ball is picked from each
box
3) In how many ways can 4 balls be distributed in 3 distinct boxes when each box may have any
number of balls. Also, 2 balls are identical
4) A simpler version of Einstein puzzle
5) Data Interpretation Questions –given two graphs interpret data.
C /Computer Skills:
All questions were easy. Mostly output based
1) printf(“%d”,sizeof(“”));
2) Question on hashing and quadratic probing
3) Question on binary tree
4) Given base address of array, find array[5][6]
5) Question on number of comparisons in binary search
6) Questions on size of union /structure and there memory layout
Coding Round:
We had to write 4 codes on paper in 45 mins:
1) Given a dictionary, find all the words which are anagram of each other
2) Given a sorted array and a number ‘c’ . find pair of numbers such that a+b=c
3) Given a sorted array .remove duplicates from it
4) Given a binary tree T1 with millions of node and another binary tree T2 with hundred of
nodes.Find if T2 is subtree of T1.
questions were easy, but time was less
Tech Interview:
1) which platforms u use?
2) tell some commands of linux
3) how to kill process
4) how to send some specific signal to a process using kill
5) how to see process created by specific user
6) how to check memory utilization of all set of process
7) how to check CPU utilization of processes(which is consuming highest)
8) questions about my Intern project
9) what u have done in android?
10)
while(1)
{
void * a = malloc(1024*1024);
}
How many times this loop will run on a 2 gb ram and a 8 gb ram.
11) how 4gb process can run on 2 gb ram
12) why we use 8 gb ram if we can manage with 2 gb ram
13) given n servers and a scheduler which take messages and send it to one of n servers.
Also given the percentage in which the messages should be distributed among servers for load
balancing. Give a algorithm on how will u decide the destination server of a message which has just
arrived.
14) What functions are there in class automatically..write copy constructor signature. Why reference
is used as argument.
15) At last I asked him about Glass-Steagall Act which lead to birth of Morgan Stanley. He explained
me for 10-15 min
Shortlisted 9 out of 21
Group Activity
Divided into 2 groups and each group was given some set of pictures initially..Some pictures were
specifically given to individuals and others were common. We as group had to come up with a story
using those images.After 5 min some more pictures were given to us and we were asked to add those
images also in our story. All the discussions we had in the group was heard by them.
At last, in 5 min we had to tell the story as a team with each person talking about the part of story in
which his specific picture fits in.
Tech Interview:
1) Design Reservation system(long discussion) :
I designed Database for it and did lot many changes in my initial design. We discussed different
issues which made me changing my design at various places.
How will u manage situation where two person see same seat number available and proceed for
reservation at same time. I told him about transaction and locking, he said from which point of
reservation will u lock and allow only one transaction to proceed.
I gave all kinds of possible answers but he was unsatisfied, I gave analogy of transaction from ATM
and transaction from Net banking at the same time..and he asked me to tell the answer as to how to
handle this situation.
At the end when I was not able to come up with something really working (other than locking the
attributes), he said that these problems are very complex and do not have simple solution, he just
wanted to see my thinking and asked in if I know about observer pattern.
6) SQL queries :
Given three tables Student(sid,…) ,Class(cid,….) and joining table Student_class(sid,cid)
Find all students names taking no class
I did it using ”not exists” and subquery but he said subquery is not allowed
I told him that we can use “except” ,but he said no
Then he gave hint as join and I told him to do outer join and he was satisfied.
HR round:
1) Tell me about urself
2) Intern project
3) Project other than intern project
4) Asked about extra circular activities. What all those awards written in my resume actually means
5) Asked a question, explained the whole situation without paper and pen :
In short the question was how will u have distinct values of product names from the array of product
class which contain product names as well as other attributes.
I told him to use Set, then he asked how it is implemented in java, I talked about hash set, he asked
about specific function of class (whose hash set is made)
Which is called internally…which I did not know…and told him about simple hashing of strings and
he was satisfied and told me the answer as hashcode function
He said how will u use threading in same problem and improve performance again I told me all kind
of things like to have two thread which traverse the array in opposite direction(one from beginning
and one from end ) and maintain the set as global variable
He said what if there are multiple such arrays..
6) I asked him about the frameworks they use and he went on explaining for 15 mins (of which I could
not get much) and said how come u did not had any question in ppt. He was enjoying a lot in telling
me all kind of things and wanted people to ask more questions at ppt and show interest
If you like GeeksforGeeks and would like to contribute, you can write article and mail your article to
[email protected]. See your article appearing on the GeeksforGeeks main page and help
other Geeks!!
Source
http://www.geeksforgeeks.org/morgan-stanley-interview-set-2/
[TopTalent.in] Interview with Ellora Nath
who got a Job Offer from EBay
Ellora Nath is certainly not your average woman. From being a board topper to a pageant contest
winner she has done it all. She is also one among the very few people to be selected for ISB’s Young
Leaders Programme. If that wasn’t enough she recently bagged an envious job offer from Ebay. In a
candid interview with TopTalent she talked about the interview process and why she chose Ebay over
other companies to kick start her career.
As usual, you might want to download her resume by logging in to understand what made her stand
out and how you can do it too.
1. What makes eBay so special? Why did you decide to join eBay?
Ellora: When we sit for campus placements, the process is mostly dominated by the pressure of
getting ‘a’ job, usually not ‘the’ job. When you choose ‘the’ job, it should be aligned with your
interests; domain, work-life balance, location and so on. I took the plunge mainly because its a great
fit. eBay is one of the best e-commerce companies globally and is hailed as a great place to work for.
Besides, retail therapy has always proven good for us women, it excited me to be behind the scenes.
Ellora: The process commenced with a written round. Some 40 odd questions and a design question.
Shortlisting followed. I had 4 rounds after. Two technical rounds. Two techno-behavioral round if I
might call it. They were taken by the Director and the Hiring Manager respectively. I escaped the HR
but more often than not that is the norm. You can expect an HR round before the final yes.
3. What was the toughest question you encountered and how did you answer it?
Ellora: Well I wouldn’t say one question, but stress on the fact that it was a very comprehensive
interview. I had some of Data Structures, Databases, Algorithms, Operating Systems, Linux
commands, puzzles everything thrown at me. Questions spanned across domains and just surface level
won’t cut it. I remember one where they gave me a scenario involving some transactions between the
sellers and buyers. I had to elucidate my understanding of the databases involved and there were
some complex SQLs for retrieving desired data.
Ellora: Campus placements and off campus drives. I got lucky with a call from the HR for the
interview but one should hang out at their websites to find open positions. eBay has a very strong
referral programme too. You could leverage that.
5. Can you talk about what resources did you refer before the interviews?
Ellora: Some DSA-OS-DB slides I had as a takeaway from college. Also websites like careercup
and geeksforgeeks has good preparatory material. I had also gone through everything in my resume
(projects, particular algorithms, slight technical details mentioned) before my interview with the
hiring manager. That really helped.
6. What were some important factors according to you that made you stand out?
Ellora: I think it was just my day. I was well prepared. Having a job in hand ensured i wasn’t a
nervous wreck. Mostly, know your stuff well and hold your ground in front of the panel.
7. Currently, what are you working on and how has been the experience till now?
Ellora: I am in the Buyer Experience Team at Ebay as a Product Development Engineer. My work is
JAVA Based, we work on ebay specific technology stacks. Its been an awesome one month. We have a
swanky new office in Bangalore now and the employees are really well taken care of at ebay. You’ll
definitely start buying a lot more from ebay, post job. Good luck to everyone applying.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/toptalent-in-interview-with-ellora-nath-who-got-a-job-offer-from-
ebay/
Amazon Interview | Set 37
Interview Experience for placements at AMAZON.
It consists of 1 online round (20 MCQ + 2 coding question) and 4 F2F interviews.
Online Round 1:
20 MCQ 1 question each from OS, pigeon hole principle, probability, DBMS, networks, NP problem
and other questions from C/C++ input output and logical question
22 from batch out of 300 students were selected for F2F interviews
Interview Round 1:
As they were short in time as it was 9 at night so they asked me single coding question.
Que 1: Given an array of n numbers with repetition of numbers. You need to find the max length of
continuous sub array with at max 3 unique elements.
For eg
array: 1 2 3 1 4 3 4 1 2
ans: 6 (3 1 4 3 4 1)
Solution: Time complexity O(n)
Extra Space O(1)
Interview Round 2:
They asked me 3 questions but I am not remembering the 2nd one. Sorry for that
Que 1: You are given two binary trees. You need to tell that if one tree is rotated 90 degree and
placed at bottom of that tree and each leaf nodes at max depth of two trees will meet each other or
not.
for eg:
lets assume () as a node
Tree 1
(1)
/ \
(2) (3)
\ /
(4,5)
node 4 and 5 are overlapping
Tree 2
(1) (4)
/ \ \
(2) (3) => Rotated one (2) (3)
/ \ /
(4) (1)
So it returns true as node 4, 5 of tree 1 is overlapping with node 4 of tree 2
Firstly I was asked to give algorithm then when i gave he asked me to code it
Solution: Time Complexity O(n+m) (where n and m are nodes in tree 1 and tree 2 respectively).
Space Complexity O(n+m)
Que 3:
Suppose u given normal deck of cards 4 suites and 13 cards of each suite in which one card is
missing
you are picking a card one at a time and sees that card and putting it aside
Find the suite and number of missing card.
Then he said change the number of suites to K (very very large you cant add till k)
and N numbers (again very large numbers)
Interview Round 3:
It was an easy round for me atleast but not for others
Que 1: Find the palindrome of a given number without using extra space
Que 2: 100 floors and 2 egg problem changed to 50 floors and 2 eggs
Que 3: You are given array of numbers which increasing first then decreasing. Find the greates
number.
eg: 1 2 3 4 5 4 3
answer: 5
Solution : Time Complexity O(logn)
Space Complexity O(1)
Interview Round 4:
He asked me about my myself apart from coding and as I said “Hacking” so we discussed about
hacking a lot.
He also aksed me about my projects
Then he gave me a puzzle:
Assuming I have a chessboard (8X8)
a knight is placed at (x,y) and he moves N hops
Find the probabilty that he will be inside after N hops.
On a condition that if a knight moves outside then he will remain outside he cant come inside.
For eg. (x,y)=(0,0)
n=2
probabilty=(12/64)
4th round was type of HR as he wants to know about myself and how I do different things.
If I stuck in a position what will I do.
If your boss says that you have to do X and you are not satisfied with this then what will you do and
how will you approach.
After that I waited for 3 hours and I got selected with 4 of my friends
Hope this will help, I try the possible way to support you.
This article is compiled by anomaly404. Many Many congratulations to him. If you like
GeeksforGeeks and would like to contribute, you can also write an article and mail your article to
[email protected]. See your article appearing on the GeeksforGeeks main page and help
other Geeks
Source
http://www.geeksforgeeks.org/amazon-interview-set-37/
D E Shaw Interview | Set 2
Type : Off campus (Bangalore) (0-1 yr experience)
Role : Software Developer @ Hyderabad campus
Duration : 2 Days
Total Candidates : ~200
Split Up of Rounds
1) Online test (40 mins & 40 questions) | MCQ’S | .25 negative per question
Difficulty Level – Intermediate -> hard
20 Aptitude – Basic Quantitative Apt questions which they ask in CAT
20 Technical – C,C++ & JAVA related | Finding output | Basic Concepts | Finding bugs in the code
Approach – Need to be quick , if u have an idea make a guess , try to answer as many as possible
Number Remaining – ~100 students
Questions –
4) Interview with a different guy ~ 30 mins | I had not studied | Screwed this up
Questions –
1) Intro about me
2) Why leaving existing job n stuff ?
3) Puzzles (3) – Solving the standard Hourglass puzzle | Count 7 mins
– The Hat puzzle ? who is wearing the black hat
– Tower of Hanoi Modification
4) OS concepts – Threading | Deadlocks | Paging | etc
5) Databases Questions – Transactions | ACID | etc
6) Code the Algorithm – LIS modified ,
Get the peak point in stock market data ,
Max sub array sum in circular array
Few more basic algos
7) C++ /JAVA questions
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/d-e-shaw-interview-set-2/
Cisco Interview | Set 1
The interview process consisted of 4 rounds.
The aptitude questions had a good mix of probability, speed and time, clocks, numbers, mixtures, time
and work etc.
Tip: For clearing aptitude rounds, make sure you have great speed in solving quantitative aptitude.
This is what differentiates you from the rest of the lot.
The C questions were very conceptual. Unlike other companies, it did not have output tracing
questions. It had questions on asymptotic complexity, recurrence relations and the like.
Tip: For clearing C questions, practice dry-running of complex codes, you’ll be able to trace better
during the test.
The questions from Electronics were not so easy to crack for Computer Science students. However, if
you brush through basic concepts before exam, it will be relatively easier to even guess the right
answer: P
The questions revolved around logic gates, FET, thermal runaway, voltage-current characteristics of
diode and the like.
Tip: Since there is no negative marking, make an intelligent guess and mark all questions even if you
aren’t very sure of the answers.
After you clear the written test, there will be a select few you need to compete with. Make the most of
this chance.
I was interviewed at around 8 pm. Most of you will begin to feel tired even before your interview
starts, but just hang in there and gather all your energy that you have. Keep your mind fresh.
This round went on for around 50 minutes for me. A few of the questions were:
After I wrote the code, the interviewer wrote a piece of code and tried telling me that his code was
simpler, hence better – but I immediately found a flaw with his code (the headptr wasn’t handled after
reversal). He wasn’t really expecting that out of me, so he stopped for a minute and added a couple of
lines to make his code alright
· Write a code & pseudo code to find the minimum spanning tree
· RSA Algorithm (very intricate questions from here – what is the significance of phi(n) etc)
· Trace route program implementation (Detailed questions about TTL), ping etc
· IP Headers
· Network Protocols
· Euclidean theorem
A lot more questions were asked that covered OS, Networking, Data Structures, C, and C++
This was again a technical pen and paper coding round. A few of the questions were:
· The interviewer asked me to write a code for the famous game Brainvita (Those who you who
haven’t played this game can look up http://www.youtube.com/watch?v=GSWI4ZSq6q8 to
understand about it)
This was a very lengthy program (handling all boundary cases) which required a very in-depth
understanding of 2-D matrices.
This required concepts of masking and bit-wise operators. After I came up with a code to do the
same, I was asked to reduce the space complexity to O(1). 2 minutes of thinking and I managed to do
crack it !
The interviewer applauded me for coming up with the most optimal solution possible for this that is
used in the industry.
A few more questions on OS were asked and the interviewer was pretty satisfied with the answers.
–> Remember to comment and indent your code even when you are writing the code on paper
–> Keep your code legible- don’t scribble. A neat code shows you are confident and clear about your
code
–> Dry-run your code alongside before you ask your interviewer to review it
–> If you don’t get the logic in the first shot, just THINK ALOUD and let your interviewer know how
you approach to solve the problem
–> Even if you know the code from before-hand, don’t show that to him, work it out in front of him
such that you are doing it for the first time.
–> Ideally, you should start from the brute-force solution and then progress to optimizing the time and
space complexity. This shows an in-depth understanding of complexity analysis.
Here your communication skills will be put to test. I love public speaking and having been a
Toastmaster for 3 years now, this was a cake walk for me. I thoroughly enjoyed this round though this
was at 1 AM in the night (morning :P)
I was asked about my future plans, the leadership responsibilities I have held and my learning
experience out of them.
This round was mostly based on resume – my accomplishments as a Toastmaster and how managed to
stay on Rank 1 throughout my academic life etc. (Basically it was all about me)
Tips:
· Make sure you have actually done whatever is there on your resume
· Do NOT even give the slightest hint to the interviewer that you might be even remotely
interested in further studies right now (I am assuming that since you are sitting for placements- you
don’t want to go for higher studies right now)
· Be prepared with 1 strength and 1 weakness of yours
· Speak confidently
· DO NOT be rude/ sarcastic with the interviewer. It might be a stress test , so just maintain your
calm
· Be prepared with questions to ask them when they ask you – Do you have any questions?
(Sound intelligent and sensible – ask about your job responsibility/ work culture etc.)
· SMILE
Your own Resume -Make sure you know every bit of it (including the Objective – which
should be self-written)
Company website
And finally, results were announced at around 2 AM—— but trust me it was totally worth the wait!
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/cisco-interview-set-1/
Google Placement Questions
MCQ Questions: 20 (+4, -1)
Subjective Question: 1
2) Two n-size arays are given . n1 in decreasing order and n2 in increasing order. If c1 is time
complexity for n1 using quicksort and c2 is time complexity for n2 using quicksort. Then –
a) c1 > c2
b) c1 3) If there is a N sorted array then what is time complexity of finding 2 no.s having sum less
than 1000.
a) O(1)
b) O(n^2)
c) O(n)
d) O(logn)
4) There are some process . In which of the scheduling algo CPU utilization is minimum. If I/O burst
time is 90ms and CPU burst time is 10ms.(question is very long to remember)
5)
7) Let w(n) and A(n) denote respectively, the worst case and average case running time of an
algorithm executed on an input of size n. which of the following is ALWAYS TRUE?
a) A(n) = Omega(W(n))
b) A(n) = Theta(W(n))
c) A(n) = O(W(n))
d) A(n) = o(W(n))
8) Consider a complete undirected graph with vertex set {0, 1, 2, 3, 4}. Entry Wij in the matrix W
below is the weight of the edge {i, j}.
0 1 8 1 4
1 0 12 4 9
W = 8 12 0 7 3
1 4 7 0 2
4 9 3 2 0
What is the minimum possible weight of a spanning tree T in this graph such that vertex 0 is a leaf
node in the tree T?
a) 7
b) 8
c) 9
d) 10
9) In the graph given in question 8, what is the minimum possible weight of a path P from vertex 1 to
vertex 2 in this graph such that P contains at most 3 edges?
a) 7
b) 8
c) 9
d) 10
10) A hash table of length 10 uses open addressing with hash function h(k)=k mod 10, and linear
probing. After inserting 6 values into an empty hash table, the table is as shown below.
|0| |
|1| |
|2| 42|
|3| 23|
|4| 34|
|5| 52|
|6| 46|
|7| 33|
|8| |
|9| |
Which one of the following choices gives a possible order in which the key values could have been
inserted in the table?
a) 46, 42, 34, 52, 23, 33
b) 34, 42, 23, 52, 33, 46
c) 46, 34, 42, 23, 52, 33
d) 42, 46, 33, 23, 34, 52
11) How many different insertion sequences of the key values using the same hash function of question
10 and linear probing will result in the hash table shown above?
a) 10
b) 20
c) 30
d) 40
12) The recurrence relation capturing the optimal time of the Tower of Hanoi problem with n discs is
a) T(n) = 2T(n – 2) + 2
b) T(n) = 2T(n – 1) + n
c) T(n) = 2T(n/2) + 1
d) T(n) = 2T(n – 1) + 1
13) Given three semaphores, S0, S1 and S2 initialized as S0=1, S1=0, S2=0 and processes P0, P1
and P2.
P0 : while(true)
P0, P1 and P2.
P0 : while(true)
{
wait(S0);
printf(“ 0 “);
Release(S1);
Release(S2);
}
P1: while(true)
{
Wait(S1);
Release(S2);
}
P2: while(true)
{
Wait(S2);
Release(S0);
}
Find out how many times the process P0 executes printf statement.
a) At least twice
b) Exactly once
c) Exactly twice
d) Exactly thrice
{
if ( a == b ) { S1; exit(); }
else if ( c==d ) { S2; }
else { S3; exit(); }
S4;
}
Given 4 test cases, find out which one among the following covers all the 4 statements
T1: a, b, c and d are same.
T2: a, b, c and d are all distinct.
T3: a == b and c != d.
T4: a != b and c==d.
a) T1, T2 & T3;
b) T1, T4.
c) T2, T4.
d) T1, T2 & T4.
19)
gcd(n,m)
{
if (n%m == 0)
return n;
n = n%m;
return gcd ( m, n);
}
20)
void f(char * x)
{
x++;
*x = 'a';
}
int main()
{
char * str = "hello";
f(str);
cout
a) hello
b) hallo
c) allo
d) empty string
SECTION B – Subjective Question
2) (Telephonic round 2)
a. Given list of songs. How would you shuffle it? (Code)
Soln: Gave various approaches from naive to optimal. The optimal one was similar to shuffling of
array of ints.
b. Give list of words. Print all anagrams together. (Code)
Soln: Used Hashmap with key as “sort(str[i])” and value as List which is anagrams.
3) 3: In-house 1
There are various varieties of clothes (say shirt). Varieties are based on parameters like pattern, size,
colour, etc.
a. What will be your input format so that it can store all values of all parameters?
List<List<String>>. Each List<String> denotes values for a particular parameter
b. Design a class for a shirt for the same requirement.
c. You have to return all different types of shirts that can be formed based on various combinations of
input parameters. (Code)
d. Assuming you have all types of shirts available. Now there are various queries like:
i. Show all types of shirt having colour “red”,
ii. Show all types of shirt having size “small” and pattern “check” etc. etc.
So how will you store I/P so that this requirement can be fulfilled efficiently?
4) In-house 2
a. Given a Binary Tree. Assuming each node denotes some x,y coordinate. root node denotes (0,0).
Write a code to display coordinate of all nodes.
case (i): Tree is complete and no node’s x-coordinate is overlapping. (i.e all nodes will expand along
x-axis so that no node overlaps). (Code)
o(0,0)
/ \
o(-1,-1) o(1,-1)
/ \ / \
o(-2,-2) o(-1,-2) o(0,-2) o(1,-2)
Here we can see that many nodes are overlapping over x-cordinate.
b. Design a DS to perform
Insert
Search
Delete
get Random
All in O(1).
Soln: Focus on Delete and get_Random. On further analysis, only get_Random was required to me
modified. Only a bit of tweak will serve the purpose.
5) In-house 3
a. Given array of ints. Assuming total no. of elements is even. Need to tell whether this array can be
grouped in sets of pairs such that sum of each pair is divisible by K.
eg: 0,2,4,8,12,20,18,4 and k=4
so (0,8), (2,18), (4,20), (4,12) is one such set in which sum of each pair is divisible by k. (Code)
b. There is a vertical rod. Discs of various radiuses are inserted in it. When we will try to take out
any disc then 1st all the discs above it has to be taken out. Taking out a disc and putting it back is
counted as one step.
Considering this, what will be the minimum no of steps in which these discs of various radius can be
stored in sorted order in the rod.
Only minimum no of steps was required. “How to sort” was not required. (Approach)
c. Given array of ints. find ar[i],ar[j] such that j>i and ar[j]-ar[i] is maximum. Famous problem.
(Code)
b. Given two arrays of ints of size m and m+n in sorted order. merge it inplace. Famous problem.
(Code)
c. Given string.
Qusn: Find the char occuring max no of times.
Soln: Simple one. Take auxillary array of size 256 and maintain frequency of each char. Scan
auxillary array and get the required char. O(k+n) where k=256 here.
Counter Qusn: Why O(k+n)? Why can’t it be O(n) only?
Soln: At the time of maintaining freq of each, compare to get max freq char also. No need to travel
aux array again. O(n)
Counter Qusn: What if memory size is only 100 bytes?
Soln: Detailed one.
Counter Qusn: Assuming updating freq of each char takes 1sec, so it will take N secs roughly. How
can we improve it?
Soln: Use multi threading for parallel programming.
Counter qusn: Will there be any issue?
Soln: In case one aquires lock, other one that needs lock will go in waiting. This adds extra time and
so can take more than N secs.
Counter Qusn: How to improve this?
Soln: Detailed one.
And many more such counter questions.
b. One +ve point and one -ve point from amazon india site.
c. Was prepared for this and already did some pre analysis on the site.
Many more such HR questions.
d. Analysis of thought process:
Assuming a new building is going to be constructed for IT official purpose. 75 floors. You are
builder. This building will be on lease for diff companies.
i. How many lifts you will add in that building?
ii. At which floor each lift will stop?
Note: At each step, I had to identify the required data after analysis and then only data for the same
was provided.
Soln (i): (As it is totally based on thought process, so counter question from your side is good point)
1. No of Lifts are determined by many factors. Major factors are height of lift and no of persons
working in that building.
2. I was knowing height of building. To calculate no of persons, I asked size of each floor. It was 100
sq m each floor.
3. Each floor will have cubicles and other rooms and passages. Assuming 70% of total area is used
by cubicles.
4. Each cubicle will have 4 persons. After calculation it came to be 40 employees per floor. So 3000
employee in whole building.
5. Next analysis was: In most of the IT company, the in/out timing is flexible. Generally in time is b/w
9:00-11:00 and out is b/w 5:00-7:00.
6. We have 2hrs of window in which all employee will use the lift. So no of lifts will depend on this
factor also.
7. After calculation, it came out to be approx 9 lifts (which was a good no according to him).
Soln (ii): Now the qusn is at which floor each lift will stop.
8. AS we don’t know how many companies will be there in this building at any time, so it is
advisable to provide equal chance for employees on the basis of floor no. rather than on the basis of
company.
9. Best way would be to minimise the no. of stops of each lift.
10. This can be done by giving each lift equal no of floors on which it will stop.
11. It can simply be calculated as 75/9= 9 (round off).
12. So 1st lift will have floor buttons b/w 1-9, 2nd will have b/w 10-18 and so on.
13. This approach was best (according to him) for current scenario.
14. Remember that each floor should get equal chance and we don’t know how many companies will
be there.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-38/
VMWare Interview | Set 1 (MTS-2)
VMWare interview for MTS-2 position.
I Telephonic round
1. Given an array of strings. Find the maximum prefix among all the strings.
Ans: First told about tries. Then went for trivial answer saying compare all the zeroth indices then
first indices.
2. Similar to kadane’s algorithm
3. I forgot this Q.
4. Monty Hall puzzle.
Ans: Told the ans as 1/2 after taking 5 mins. Tried to prove using probabilites but could not able to.
I F2F round
1. Given an unsorted array, find the max j-i such that j > i and a[j] > a[i] in O(N).
Ans: Told trivial solution in O(n2). Then used DP but still O(n2). Then told using sorting approach in
O(n2).
Could not able to solve even after giving 45 mins of time as it is not trivial answer.
2. Given a rectangular cake and 3 persons have to share it. First person took a rectangular cut. How
will you cut such that remaining two people
will get the same amount?
Ans: First told horizontal cut where interviewer surprised with the answer and asked for different
solution.
Then told cut along a line such that it touches center of mass of both the rectangles.
II F2F round
1. Given k-sorted lists. How will you sort the list in to the new whole array?
Ans: Standard Q. Then asked about time complexity.
4. He is the same person who interviewed me for telephonic. So asked once again about Monty Hall
Puzzle.
Ans: Proved this time with probabilites.
5. http://www.allinterview.com/showanswers/15001.html
Ans: Simple Question
IV F2F round
This is with the manager. This is like rapid fire where interviewer keeps on asking me questions
which has either one or two line answers.
Typical HR questions. At that time only he told that they are going to give offer. Did not negotiate at
all as they offered me decent.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/vmware-interview-set-1-for-mts-2-position/
Fiberlink (maas360) Interview | Set 1
I was shortlisted for fiberlink interview. Following was my experience.
1. Online test, one question, 60 mins. Given an array with marks for ‘n’ students. (The size of array
will be ‘n’). Given the marks secured, you have to find out the rank of that student. Also note that
array can duplicate marks(means same marks can be obtained by multiple students). The program
should be time and space optimized.
Onsite:
Round 1: Given a building with infinite number of floors. The number of rooms on each floor are
10,5,10,5.. and so on starting from the ground floor. The room number starts from 1 and keeps on
increasing. Given a room number, find the floor on which room lies and the position of room from the
left.
Very simple.
Other questions from previous projects.
Prob1: Given a queue. Every time an insertion or deletion happens, a new version of the queue is
created. At any time, you have to print any older version of the queue with minimal time and space
complexity.
123
456
789
*0#
You can start from any number other than ‘0’. You can move to the next number the way a chess
bishop moves. You can go back to the same number. Any number should not contain * or #. Generate
all possible six digit numbers.
Round 4 HR:
1. Why you left your job?
2. Current CTC, expected CTC.
3. How soon you can join?
4. What do you expect from this job.
Final verdict:
Disqualified !!! Surprising for me. Because I didn’t miss even a single question. Was able to solve all
of them. The only thing I feel that went wrong was when I asked about company workload, oncall
stuffs and all. They got an impression that higher workload was a concern for me which was not the
case actually.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/fiberlink-maas360-interview-experience/
Cisco Interview | Set 2
I recently got interviewed for a position in Cisco. The organization came to our college as part of
their University recruitment program. The following is my interview experience. Hope this would
help you !!
Round 1
This was aptitude + technical round. 20 question from aptitude and 30 questions technical. We were
given 60 minutes to solve the question. NO NEGATIVE MARKING.
The aptitude question were relatively easy. There was a cat and tunnel problem. A question on Venn
diagrams was calculation based, 4 different event on Venn diagram. Some questions on ratio and
proportion, probability, and arrangement, time and work, time speed distance, number system. One
can easily crack this section if one has practiced questions from any quantitative aptitude practice
material.
The aptitude part was such that many were able to crack it, but the technical part was the actual make
or break part. The questions were vary basic questions but from a wide variety of areas such as
electronics – analog and digital. Questions on FET, BJT, MOS, K-map, microprocessor, networking
etc, along with data structures, operating system, and algorithms were there. These questions touched
the basic concepts of all the areas we had studied in our curriculum so far.
The algorithms question was based on time complexity. Say there is a program whose time
complexity is O(n^2.5), then which of the following can’t be true. Following this there were four
statements, of which three said that the time would grow proportional to Round 2
My first technical interview round- around 1 hour 15 min. The interviewer glanced at my resume.
First question- tell me about yourself
Then he came onto the projects. He asked question on what I did in the project, how I did it and what
all I gained from it.
Then some questions on networking basic-7 layers of networking, OSI architecture, difference
between frame and packet, routing and switching.
Then he asked Kruskal minimum spanning tree algorithm and its application in networking. Then
some question on bit magic- counting set bits in an integer, finding absolute value of integer, some
questions on OOP- encapsulation, polymorphism. Then what is data encryption and its difference
from encapsulation. Encapsulation in Java. Polymorphism in Java example.
Round 3
My second technical interview round- around 45 min Again the interviewer came onto projects. He
asked me about cryptography, and data transmission, TCP, UDP.
Why TCP better than UDP? What is flow control and congestion control? How do networks ensure
congestion control?
How does a network ensure that all the packet reach in correct order, which layer is responsible for
it. If you were to do be made responsible for packet delivery in correct order how would you ensure
without the help of any underlying layer. Explain AES, DES and triple DES(I was asked this because
of my project on cryptography). How would you ensure that all your data AES-encrypted is not
decrypted using any other mechanism for a software implementing all three mechanism mentioned
above. I answered some way out but the interviewer kept on finding faults in each of the ways.
Finally he asked me draw my attention on Google, how does it encrypt mails using different schemes
and how client server architecture works, and then I was able to get through to the authorization
technique he was seeking for as the answer along with different port number and process id for
different schemes. This earned me some brownie points. But in the entire interview, the interviewer
kept on dis-agreeing to the answers so as to check one’s confidence level.
Then he asked me to check if string is palindrome or not. Then a question on DP. Then a question on
recursive programming. Then another on in-line functions-their internal implementation and
difference from macros. Some question on OS- processes and thread, what is the difference between
them, concurrency and what is semaphore. What is starvation. What is masters theorem – explain the
underlying cases. I managed to keep my calm till the end and answered many of the question correctly.
Round 4
My third technical interview round- around 30 min. The interviewer asked me about layers in OSI
and IP architecture and complete details of application of each layer along with protocols used in
them. Then he asked me about the NIC -how it works and the internal implementation. What happens
when you connect a pc over a new network. What is CSMA-CD with example.
Quick sort-pivot selection. What is Counting sort. What is hashing. Explain all types pf hashing
schemes. How does free determine how many numbers to de-allocate.
Question on determining the subnet mask over a large network consisting of several sub-networks
with a specified IP range available to ISP.
Round 5
My last round -HR round general questions. How important Is this job fr you? What if you don’t get
it?
What are your other interest? I am the Microsoft student partner of my alma mater, so he asked what
was the procedure. What all were the difficulties? What can you do if I make you the Cisco student
partner. This was followed by my contribution in college events. What kind of expectation you have
from this job and what would you gain, of which you have been deprived of so far. Tell me your one
major quality and link it to recent event
I answered all the question, and he was satisfied with responses.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/cisco-interview-set-2/
Morgan Stanley Interview | Set 3
Morgan Stanley interview experience
1. This section had computer fundamental questions which were easy. It had 10 questions.
2. This was language dependent section. You were allowed to choose any of C/C++/JAVA language
and there were 30 questions in this section. The level of difficulty was moderate.
3. Last section had logical and mathematical aptitude questions. A total of 10 questions.
So in total this round had 50 questions.
1. Exchange kth node from start and kth node from end of a singly linked list.
Example: if the linked list is
5->10->25->45->31->16->23->51 and k=3
Then linked should be converted to
5->10->16->45->31->25->23->51
Boundary cases had to be handled properly.
2. Given a number, you have to find next greater number which has same set of digits.
Example:
If given number is 4765 the output should be 5467.
3. Given a binary tree, you have to print level order traversal of the tree (left child then right child)
but every next level has to be printed in next line.
Example:
If the given tree is
10 15
56 47 12 42
Example:
1 4
2 3
3 2
4 10
5 5
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/morgan-stanley-interview-set-2-2/
Cisco Interview | Set 3
I recently got interviewed for a position in Cisco. The organization came to our college for on-
campus recruitment.
First round:
The first round had 30 technical and 20 easy aptitude questions to be answered in an hour. It was
intended to test how fast you can solve problems. Majority of the technical questions were from
Electronics, Computer architecture, and some questions from C and data structure.
Final HR round:
My friends who attended HR interview told me that it was ‘stress’ interview where interviewer tests
your patience and see how you behave under pressure. About unfortunately I didn’t undergo any
pressure test. The interview was like 3-4 minutes, he asked general questions like “Why CISCO?”,
“How you see yourself in CISCO after 5 years”.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/cisco-interview-set-3/
Written Test 2:
Programming round, 4 questions in 45 minutes
1. Get an array B such that B[i] has the product of all numbers of A except A[i]
The solution is simple using left and right array
2. Spiral level order traversal
3. Longest Common Substring
4. Add two linked lists
Technical Interview 1 :
The interviewer discussed the codes I wrote.
And some additional questions like queue using two stacks , complexity of BFS, worst case
complexity of quick sort and when does the worst case occur.
One SQL query.
Group Activity :
This can be the make or break round, as Morgan Stanley is all about personality and communication
skills. In my case, we were divided into two groups of 5 and were given 10 11 pictures and were
asked to link them and create a story. Your creativity matters here. Advice : Don’t stay quiet, but talk
sensibly.
Technical Interview 2:
1. Design a online e-commerce website like Amazon, Flipkart.
This question requires attention to detail.
2. Given an expression 5*3+10/2 , write a function to evaluate the expression. My solution was to
make a tree and traverse in postorder.
Technical + HR :
The guy was the seniormost among the 8 recruiters.
He talked about my projects, what difficulties I faced, what can I improve more.
One question was..I was given data about students who had taken some subjects.
I had to make a data structure such that if I query for no of students in a subject or no of subjects a
student has taken, the complexity should be less.
Rest was HR.
A big thanks to GeeksforGeeks. This had been my bible for the summer.
One advice: Please don’t mug up the questions from this website. Solve them on your own. It’s the
problem solving ability which is being tested, not your memory.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/morgan-stanley-interview-set-4/
Amazon Interview | Set 39 (SDE)
I recently attended the walk-in process for Amazon Off campus recruitment drive. This was for SDE
position at Chennai. I would like to share my interview experience with Geeks for Geeks.
Written Round :
a) Given a linked list and 2 integers M and N.. Keep M nodes and delete N nodes repetitively till the
end of linkedlist.
b) Given a BST , replace a node value with the sum of all the elements larger than the current node.
I could solve it with Reverse Inorder traversal and an int pointer to keep track of the sum.
c) Given a BST and a value , check if the path sum from root to leaf equals the given value.
b) Given a BT check if there is a BST in it. If it exists print the largest BST in the BT.
c)Given a large file with huge number of words group the anagrams of a word
hai how are you. iahohw done woh.
o/p:
hai ->iah
how ->woh ->ohw
done
are
c) Given a zigzag traversal construct a tree from it. Full working code was asked.
eg. 1 3 2 4 5 6 7 9 8
1
2 3
4 5 6 7
8 9
Solved it with double ended queue.
b) He changed the question to infinite length chess board and if given two knights in a chess board
.find minimum hops required for them meet.
->gave a lot of space and time constraints.
->asked me to write the complete code without STL.
c) if we encode A-1 , B-2 , C-3 , I send a word CAMP encoded as 311316. It can be decoded as 3 11
3 16 (CKCP), 3 1 1 3 16(CAACP) , 3 1 1 3 1 6 , (CAACAF) . given a input encoded string find the
no. ways it can be decoded. (ACODE prob. in Spoj)
311316 – 4
->Could n’t come up with DP solution at first so gave a solution with recursion tree. He asked me
to optimise to avoid unnecessary computations.. Finally Solved it using DP.
f) Given a linked list with random pointers , clone the linked list.
Gave few solutions and he asked me to clone without manipulating the original linked list but with
extra space. Came up with little tweaks using HashMap
Map key is the node and value is the random ptr node.
g) Find the ceil and floor of a value in a given BST without extra space.
if a BST contains 1 3 6 7 9 12
->if the given value is 8 floor is 7 and ceil is 9.
->if the given value is 9 both floor and ceil is 9.
P.S. Be cautious in explaining your projects.
Finally got offer from Amazon after two days. I owe a great thanks to GeeksForGeeks. It helped me a
lot to improve my data structure and problem solving skills. Hope this will help you. All the Best .
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-39/
Cisco Interview | Set 4
Cisco Interview Process:
Round 1:
50 MCQs
Duration: 1 hr
20 – Math Aptitude. 30 – Technical
Technical part included questions from Computer organization, Some problems from OS(finding
logical address), Networks (problem on finding transmission latency), 8085 Microprocessor, 2-3
C++ (finding output/error), MOSFET, Direct Memory Access, etc.
[ I don’t remember any question exactly. But the question paper was very tough!! I did the math well.
But I wasn’t sure of most answers in the technical part. Never expected to get selected! ]
Round 2:
Face to face interview- Technical
Duration: 1 hr
There were questions from OS, Data structures, Aptitude, Networks, and some C questions.
Some questions that I still remember were:
1. Given a sorted array a[] find the pairs of number that add up to x.
For eg: a[]={1,2,4,5,8,15,18,22} x=20
Output: (2,18) , (5,15)
2. Given
unsigned char c=1100 0010; (Note that it’s a variable ; not an array.)
U need to reverse this and and return the resut.
Answer: 0100 0011 (Stored in a variable. No arrays have to be used.)
3. How will you set a bit in a number?
Eg. int i=1110 0001. Set 6th bit.
Output: 1110 0101
4. Given a tree (not a BST), pointers to any 2 nodes in the tree, how will you find their least
common ancestor?
In the above diagram, least common ancestor of the nodes in pink is the one in blue. For the nodes
in yellow, red is the LCA.
For Eg: You will be given the pointers to the nodes in pink. You need return the address of the
node in blue.
Each node has the following structure:
struct node
{
int data;
struct node* left,*right;
struct node* parent; // Pointer to the parent node
};
8. Given an n x n grid,
Say n=3
You are standing in the left bottom corner. You need to reach the destination in the top right corner.
You can move either in upward or east direction (as specified in the diagram). In how many possible
combinations can you reach there? Your answer should be generic to any value of n.
[I did the technical round really well and the interviewer was happy with my performance.?]
Round 2:
Partial HR, Partial Technical
Duration: 45 minutes
Questions were mostly about my areas of interest, projects. As I kept explaining him about my
projects he asked me to write some code snippets for those. And many questions were from OS,
Networks like:
1. When does a process create a child process?
2. What happens in the background when fork() / pthread system call is used?
3. What are the different IPC mechanisms?
4. How does a pipe work? What happens when pipe symbol ‘|’ is used in command line?
5. What is compaction and what are its disadvantages?
6. What are the steps in establishing socket connection in client & server side?
He asked me how much I like network programming and whether I could do it in Linux.
Some questions that were purely HR were:
1. What are the 3 most valuable things you have learnt in your engineering college?
2. How will you convince your team member to accept your idea/suggestion?
3. What will you do if your team member always conflicts your ideas and reports you to the
manager?
4. What kind of job do you wish for?
5. What will make you quit a job?
6. You prefer being in the Technical / Managerial side?
7. Other possible questions from my resume (Responsibilities undertaken, Achievements)
Round 3:
It was a complete HR.
Duration: 50 minutes
Questions were about me, my family, areas of interests, extra-curricular activities, other interests,
projects. He was talking about Cisco for about 20 minutes.
That was all!
On the whole, clearing the written test was the toughest part. Technical – if you are really good at data
structures and basics of networking, OS – it’s easy to crack it !
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/cisco-interview-set-4/
[TopTalent.in] Interview with Pradeep
Verma from NIT Trichy who talks about his
internship at Amazon
Pradeep Verma calls himself just one of those Indian kids but
Amazon usually doesn’t recruit every other kid out there. Pradeep did his internship at Amazon last
summer and not surprisingly got a full time offer from the e-commerce giant thanks to his excellent
performance. In an interview with TopTalent.in he talks about his internship experience and how it
benefited him.
You can also download his resume to see his credentials and understand what made him standout.
I hail from Visakhapatnam, a city in Andhra Pradesh. I ended up with an AIR 6025 in IIT and an AIR
1745 in AIEEE. Now, I am pursuing my B Tech final year in Computer Science and Engineering at
NIT Trichy. My dad works for the Government and my mom is a homemaker. Prior to engineering, I
was not any different from other Indian kids. As I entered NIT, I quickly grabbed some interest into
Computers and worked my way through to get into a Computer Club at college (called DELTA). Apart
from this, I am into many other teams at college conducting and organizing events/fests. I am the
Marketing Chairman for NIT Trichy’s International Cultural Festival, Festember. I pursued research
on “Parallel Algorithms – Task Assignment” for some time and I am expecting to publish a paper on
this topic very soon.
2. Can you describe the complete hiring process? Did your internship help you grab this offer?
Amazon came to our campus to hire interns. The Selection Process consisted of a written test,
programming test followed by two interviews. We were tested on Data Structures, Algorithms and
OOP Concepts during the interviews. I did an intern at Amazon in the summer of 2013 post which I
have been offered a Pre-Placement Offer from them.
3. What project did you work on during your internship?
Amazon, as all of us know is a giant in e-commerce. Something very astonishing about Amazon is the
scale at which they function. At some points the servers at Amazon need to handle something close to
10,000 orders per minute. So in this company, speed and complexity handling is a great challenge
considering the scale at which they function.
My project was along the same lines – I had to bring down the running time of a “process”
[confidential and cannot be disclosed] from 2 to 4 hours to something close to 15 minutes. I used
AWS and Java Technologies to achieve the same.
4. What were the tricky questions you encountered? How did you tackle them?
I was questioned on Data Structures, Algorithms, OOPs and other basic concepts. I still remember
one question in which they asked me to choose a favorite game and give an OOP model for the same.
This is something real and application of what we read in books. This involved a lot of thinking and I
liked the way they asked it. Apart during the intern I required concepts from Operating System,
Threads, Basic Algos and DBMS to complete my project.
I should say I dint put any focused preparation for the above. I went with the flow, grabbed all
opportunities to learn and innovate. I feel what companies look for is an overall well developed
person. So I guess my involvement into a lot of clubs and activities, decent tech knowledge and my
projects got me this opportunity.
Technically, get to know all basics of Algos, DS, OS, DBMS, Networks etc. I would recommend
interview designed books like “Cracking the Coding Interview” by Gayle Lakmann and
“DataStructures and Algorithms” by Narasimha Karumanchi. Apart one great opinion I have is, it is
just not enough to be a good coder, develop in all aspects – Have a decent pointer, grab all
opportunities (you have a lot of them in IITs and NITs), get social, learn some tech, do some cool
projects and any company would be more than happy to have you with them.
A resume is one page reflection of YOU. It is important to customize a resume for companies. For eg
Research projects would interest Microsoft R&D profile and Coding projects would attract
Facebook or Google. And one thing I find in most resumes is people put a lot of unnecessary stuff.
No one out there really bothers if you had won some Bronze medal in a quiz when you were in 6th
Class at School Level. Get to real stuff. Put yourself into a shoe of a recruiter and think what you
would look for in a resume. And it is very important to proof read your resume. Having spelling
mistakes on a resume could be a blunder.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/interview-pradeep-verma-nit-trichy-talks-internship-amazon/
Oracle Interview | Set 2 (On-Campus)
Oracle Interview-Server Tech.
==========
Round 1:
==========
1. Explain Tree traversals. Given a inorder and postorder construct a tree
2. What is fork? How many total processes on execution of three frok statements. Justify your answer
with diagram
3. What are JOINS in DBMS, their types and give examples.
4. Explain backtracking with example of anagram. Draw space diagram for that.
5. Explain quick sort and how it differs from other sorting algos with same run time complexity (like
merge sort)
6. Write a program function for finding no. of levels in a binary tree.
==========
Round 2:
==========
1. Tell about yourself.
2. Explain your project.
3. The JAVA Story: Why java? the difference with C/C++. (Only conceptual, no technical)
He asked abt my perception of server tech and then he discussed what actually is being done in server
tech.
==========
Round 3:
==========
A normal discussion round with HR, who wants to judge your commn skills, confidence, views,
behaviour…etc. JUST be Yourself.
1. Likes, hobbies, fav passtime..
2. Why a year gap?
3. Give some feedback on our placement process.
4. Which part of ppt you liked and why?
5. Do you want to ask something. I asked abt after hiring process. He explained that you will get a
mail from us regarding ur bckg verification. then project preference will be asked. At the time of
joining you will placed in grp.. and will underwent some training.
============
Finally HIRED!!!
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/oracle-interview-set-2-campus/
2) Threads
if(n
6) Complexity?
a) f(i) = f(i+1)+f(i+2)+f(i+3)+1
b) f(i) = f(i-1)+f(i-2)+f(i-3)+1
c) f(i) = f(i+1)+f(i+2)+f(i+3)
d) f(i) = f(i-1)+f(i-2)+f(i-3)
8) Based on java 2 questions, one from Exceptions
9) Preorder is given, we had to find out the postorder
10) Memory management, pa=32bit, la=36bit , frame size=2^12, first page entry, s
11) This question is from GATE CS previous question papers
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-40-campus-round-1/
EA India has been on a hiring spree lately. (Yes, we do keep track) It has
staffed 500+ employees in it’s Hyderabad Office which is being developed for running business
operations and as a rapidly growing studio. When we went about interviewing Rubal who is working
as a Software Developer at EA Games, we knew this would be an exciting interview given the
number of EA games we have played all through these years. In this interview Rubal talks about what
is so special about EA’s culture and shares his views on working in the gaming industry given Zynga’s
performance post the IPO.
You can also download Rubal’s resume by logging in to see what are the skills required to get into the
gaming industry.
1. What makes EA Games so special? Why did you decide to join EA?
Rubal : The first thing that comes to one’s mind when they talk about the gaming industry is the
amount of innovation and creativity that goes into the work. The amount of R&D in terms of
technology and user experience that the developers put in to please the insatiable minds of gamers all
over the world is remarkable. EA over the years has made a name for itself that no one else has in this
business. Right from yearly franchises like FIFA, Need for Speed and Madden NFL to social and
mobile games like those from PopCap – the journey has been tremendous.
My decision to join EA was driven by the fact that I always have been fascinated by games and the
job role aligned with my career interests as well. The thought of being a part of a community of game
developers, who have provided us with captivating experiences through games like Battlefield,
Crysis and Medal of Honor, was more than enough to get me to choose EA.
3. What were the tricky questions you encountered? How did you tackle them?
Rubal : EA’s primary focus was on quality. They focused more on the design and algorithmic
approach. Emphasis was given to the projects and internships which I had done earlier. Questions
were pretty straightforward, but continued into stimulating and exciting discussions based on the
answers – which I thoroughly enjoyed. The first thought that crossed my mind during the interview is
the kind of approach they have towards employees. They are a company that respects an individual’s
point of view and encourages one to voice their opinion.
The key is to be relaxed and calm and understand the Interviewer’s basis behind asking the question.
Don’t lose track of what the question is and don’t get into an endless discussion over proving your
point. Have an open discussion as far as possible, for it would show the maturity you have towards
different opinions on the subject. To summarize, the interview touched aspects of DSA, databases,
networks and operating systems. So having your concepts clear will sure give you the necessary
boost.
4. What is EA Games culture like? How does it impact the overall process of working in EA?
Rubal : The fact that stands out most at EA India is that everyone, right from game QA testers to
the Development Directors are extremely passionate about what they do – and this is what that keeps
you motivated all the time. This I believe is very important to be successful at your work and this sets
working here apart from any other IT firm. We have a dedicated Gaming Room right next to where I
sit and everyone loves to come and show off their gaming skills. EA hence has the perfect atmosphere
that balances both work and play.
5. Given Zynga’s dismal performance do you think gaming industry in general is a good place to
be in from a career perspective?
Rubal : In the gaming industry, we need to look at a way of keeping our customers engaged all the
time. The fact that EA continues to do well year after year is an example of the splendid higher
management it is led by. We are not only working constantly on having the team ramped up on new
platforms to adapt to changing technology but are also have team looking forward towards the future.
There are a lot of risks but the kind of challenges one faces and the amount of learning in one single
project in this industry is novel in its own way. Change is the only constant, and that should be guiding
your modus operandi in this industry and hence to be here you need to be extremely flexible and be
able to adapt to different requirements based on the changes – this is what makes the journey fun!
6. What were some important factors according to you that made you stand out?
Rubal : I think it was the way I conducted myself in the interview that really helped. The emphasis
was not just on getting a satisfactory response but on the approach and on out-of-the- box thinking. I
voiced all my thoughts and discussed my ideas in open and had interesting discussions on all of them.
Moreover, I was very vivid in my explanation when asked about my projects. I was lucky to have had
worked on a game development project and played a major role in my selection.
7. Currently, what are you working on and how has been the experience till now?
Rubal : I work in a business unit which primarily deals in developing and supporting popular EA
labels for multiple mobile platforms. The kind of work varies from updating the gameplay to
upgrading the current services with new technology.
I am currently working on the Apple/iOS platform which requires objective C/C++ knowledge. It has
been 1.5 months and I love every minute of my job. It’s not often that one comes across people who
are passionate about their jobs, and I consider myself lucky for that. If someone were to ask me what I
do for a living – I can proudly beam and say “I make and play games for a living”.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/toptalent-rubal-chadha-playfully-working-ea-gamers-paradise/
Twitter Interview | Set 1
Phone screen – I
1. Fibonacci series without using an array – this is a typical favorite question w.r.t. Dynamic
Programming where you will asked not to use Memoization or any extra storage to store the values of
the previous iterations.
(More complicated version of the same problem: Generate Nth row of pascal’s triangle w/o using a
2D array of dimention N x N)
2. N-ary tree : find if a node exists in the tree with value = x. If yes, return true, else, return false.
Phone screen – II
1. Find the lowest common ancestor of Binary Tree
2. Clone a graph and analyze the time and space complexity (since DFS based approaches leverages
smaller time at the cost higher memory)
if (created.get(oldGraph))
return created.get(oldGraph);
created.put(oldGraph, newGr);
newGr.setNeighbors(nbors);
return newGr;
}
On-site
1. (Boggle – like question) In a 2D array (M x N, in the given ex. 3×3) of numbers, find the strictly
increasing path from the specified origin cell (1,0) to the specified destination cell (0, 2). Array may
contain duplicates, and solution should work with the dups.
2.a. Design a unique hash function for every tweet in Twitter which will be used as part of a service.
2.b. Find if a directed graph has cycles or not. Write a function with boolean return type for the same.
4. Pattern matching using patterns containing chars (a to z) and ‘*’ , ‘?’ and ‘.’
5.a. Describe how would you do external sort -> come to a map-reduce kind of solution. Each
machine has 10M numbers (total 100M), 10 total machines. Each m/c has 20MB RAM and 50GB
memory.
5.b. N-Queens problem: find and print all possible non-conflicting positions for the Queen.
6.a. Given an input binary tree and reference to a Node in the tree, find next in-order successor for the
input node. Output null if none.
6.b. What is the best way to sort a k-sorted array ? Optimize for time complexity.
(My hint: use a priority queue of size k)
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/twitter-interview-set-1/
Amazon Interview | Set 41 (On–campus)
The first round had 20 multiple choice questions covering C programming, Data structures,
Algorithms, Maths and puzzles, and a question from Networking and Operating systems. The duration
of the test was of 90 minutes and marking scheme was +1, -0.25
ii) Find the first non-repeated character in a string. If there are no such chars then return -1.
There were 4 rounds of technical interview, no HR round. Following are the major questions asked to
me in the tech rounds. I had to first suggest the logic, discuss that with the interviewer and then he
asked me to code it up.
Round 1 –
1) Check if a given tree is a Binary Search Tree or not. Simple enough question.
2) You are given an array whose each element represents the height of the tower. The width of every
tower is 1. It starts raining. How much water is collected between the towers?
Eg. [1,5,3,7,2] – then answer is 2 units between towers 5 and 7.
Looks easy, but if you don’t observe well, then you might end up with the wrong logic like I did at
first. Also there are lots of possible corner cases. Luckily I could identify them all.
3) Given an array and a fixed window size X, you have to find out the minimum value from every
window. De-queue was not allowed. So I had to do it using 2 stacks.
Round 2 –
1) Some DBMS questions like how is database stored in memory,how an image stored in database
and a few more questions from it.
2) What is a height balanced tree. Give an O(n) solution to balance it. Then he changed the definition
of a balanced tree as- a tree is balanced if every node in a particular level should have the same
number of descendants (and not only direct children). And every node can have any number of
children. I had to design the class and then write the code for it.
3) Given an array of integers, find an index such that if you split the array into two parts the absolute
value of the difference between the sum of elements in both parts had to be minimum. After giving him
the logic, he changed it to split it into 3 parts such that sum of elements in all of them are equal. I had
to code this one.
Round 3 –
1) There is a sentence that your friend knows, but while giving it to you, he lost all the spaces. You
have to dictionary with you. How would you reconstruct the original sentence using it.
3) You are given an encrypted file. You don’t know the key used to encrypt it. Like A might be
mapped to B, B to some D and D to some other F. But you don’t know this encryption scheme. You
have the dictionary with you. How will you decrypt the file? I suggested lots of solution like
exhaustive searching, then using some variants to minimize the complexity. He gave me just a one
word hint- histogram. So I gave him a logic that counting the frequency of every letter used in the
dictionary. Then replace the most used letter in the file with the most used in the dictionary. And then
compare words with the dictionary. In case of a mismatch back –track and use the second largest and
so on. I also discussed with him that it could also have high complexity in worst case, but he moved
on.
Round 4 –
1) A complete path in a tree is from a root to a leaf. A k-heavy path is a complete path whose sum of
elements is greater than k. Write a code to delete all nodes which are not in any of the k-heavy paths.
2) You have an array whose elements firstly strictly increase and then strictly decrease. You have to
find the point of change.
All the questions in all the rounds required the minimum possible complexity possible (both time and
space). And I had to write the code of my final solution as well. Finally the results came and I was
selected by them.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-41-campus/
Adobe Interview | Set 6 (On-campus for
MTS-1)
I would like to thank the entire Geeksforgeeks team, whose contribution has helped me a lot in my
preparation for the interviews and getting placed at Adobe.
Aptitude Round: 1 hr
PI Rounds-
1. Implement a queue using 2 stacks( average time complexity O(1) for push and pop )
2. Discussion regarding demand paging. Then the interviewer asked me to give a detailed
implementation of demand paging, using object-oriented approach, considering everything from page
tables to swap disk I/O to page replacement policies.
1. This round started with a puzzle: There are two buckets- one having 100L water and another having
50L milk. A spoonful of water is taken from 1st bucket and added to 2nd bucket and the mixture is
stirred, now a spoonful of the mixture is taken from the 2nd bucket and added to the 1st. Compare the
final volume of milk in 1st bucket to the final volume of water in 2nd bucket.
2. Defective ball puzzle: Find defective ball among 7 balls using minimum no of measures.
3. A system sends multiple queries to find all primes between two given numbers. Provide service to
each query in less than O(p) time(p is total no of primes)
Solution: Perform Sieve of Eratosthenes initially and maintain list of primes. For incoming queries,
use binary search to find first and last primes between given numbers.
Solution: For n discs and towers A,B,C as source, auxiliary and destination respectively, consider the
following function:
Else
{
}
}
It will take O(3^n) time instead O(2^n) as in the normal Towers of Hanoi problem.
1. A robot can move forward either 1 or 2 steps. Find no of possible ways to reach nth step(easy DP
problem).
2. Questions regarding scheduling concepts, how cpu burst length is predicted for SJF scheduling,
exponential averaging, etc.
3. The interviewer asked me to implement my own timer service in the user-space. Using system
timer countdown was not allowed, only reading current system time was allowed.
Solution: Create a high-priority helper process P which will have some idea of flow of time(since we
cannot use hardware timer) and hence will act as a sand clock for any process that requires timer
service.
t1=getSystemTime()
do dummy op(which should take very less time)
t2= getSystemTime()
(t2-t1) will be the time unit for P. Whenever any process requires a countdown of time t, it will
communicate with P and request it to send a signal after time t. P will divide t by its time unit and
perform dummy its operation t/(t2-t1) times and then notify the requesting process that the time period
has elapsed.
The interviewer said that the solution was coarse, but still he seemed pleased with it.
Normal HR questions like: why do you want to join Adobe, what were the most challenging situations
you have faced in your career so far, where do you see yourself in 5 years, etc.
After the final round, the results were declared. I along with 4 of my peers were hired!!!
This article is compiled by Biswarup Pal. Many many congratulations to him. If you like
GeeksforGeeks and would like to contribute, you can also write an article and mail your article to
[email protected]. See your article appearing on the GeeksforGeeks main page and help
other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-set-6-campus-mts-1/
Amazon Interview | Set 42 (On-Campus)
Following questions were asked during interview.
1. Given an array, find the longest increasing subsequence of size 3 with max product, all numbers are
positive.
2. Given 3 linked lists representing 3 numbers, add them and return the result as another list (take care
that your method handles overflows).
3. Find the lenght of longest path in a binary tree(diameter). I gave a O (nlogn) solution. He wanted O
(n) solution. did that
4. You are standing at 0 0 and you have to get to i, j. Find the number of ways. Did that with recursion
then with DP. Then he extended the question saying some edges are not traversible. Then edges have
weights, find min weight path.
6. Find the peak in an array, array is first increasing then decreasing. Peak is the max element.
7. Given a binary tree. A complete path is defined as any path from root to leaf. A k heavy path is a
complete path with sum of node values on that path > k node values can be -ve too. Delete all nodes
in a tree which do not lie on any k heavy path.
9. Infinite stream of bits is coming, after every bit comes, you have to determine whether the number
formed with bits till now is divisible by 3 or not, you cannot form the number as it will overflow at
some stage.
10. Imagine a binary tree lying on the floor with nodes as balls and edges as threads, you are given a
pointer to a node. When you pick the tree from that node up what will be the structure of the tree. You
have gravity changing the structure of the tree.
11. An array is given representing the colors of n jars, colors have values 0-99. When two jars are
mixed the resulting volume is same as volume of one jar. Smoke is color1*color2… and resulting
color is (color1+color2)% 100. Keep on mixing colors such that you end up with just one jar with
minimum smoke.
Source
http://www.geeksforgeeks.org/amazon-interview-set-42-on-campus/
Adobe Interview | Set 7 (On-campus for
MTS-1)
First of all, I would like to sincerely thank the entire GeeksforGeeks team for creating and
maintaining such an awesome site. GeeksforGeeks has tremendously helped me in my preparation for
the on-campus interviews and finally cracking the job interview for Adobe.
PI Rounds-
1st Round: 45 minutes
1. Had a general discussion about various data structures. Comparison of BST and hashmap ( relative
advantages and disadvantages ). Applications of each.
3. Suppose we have two functions void g() and void h(). The function h() has been called somewhere
in the body of g(). Now using a debugger, we find that that the program crashes as soon as the return
statement in h() ( at the end of function h() ) is executed. There is nothing syntactically wrong with the
program. How will you debug the code ???
My answer : The function h() has modified the return address on stack.
4. The last question was a puzzle. You have 7 coins out of which one is fake. Find the fake coin in
minimum number of weightings.
3. A robot can walk on 1 step or 2 steps. Find the number of ways in which he can reach the nth step.
I started with the naïve recursive solution. He asked me to draw the entire recursion tree and hence
manually find the answer for n=8. I asked him to make it n=5 I pointed out the overlapping sub-
problems and gave him the DP solution. He also asked for time and space complexities of both the
solutions.
4. This question was related to what he called conditional operator on an image. I had no idea what
that was. So he explained it to me.
A monochromatic image is represented by a MxM matrix Image0. We have another WxW matrix Op (
W3rd Round: 45 minutes
1. Fibonacci series. Just the recurrence relation and derive the time complexity of recursive
implementation.
2. Write a function that takes n parameters and returns an n-dimensional array using those parameters
as the dimensions. The expression a[i1][i2]…[in] should work.
For 1-d array, it’s trivial. For 2-d arrays of dimensions mxn, first create an array of m 1st-level
pointers and for each pointer allocate an array of size n. He asked me to do it for k-dimensional array
where k is a parameter. The real issue was implementing k nested loops, where k is not a constant
value.
I was able to implement it using a single loop which runs from i=0 to i=k^k – 1. For each iteration, I
calculated the various nested loop variables, say par(L)=i mod k^(L+1) , where L=0 represents the
innermost loop and par(0) represents the innermost loop variable. So when par(t)=0 for some t, it’s
obvious that either i=0 or the immediate outer loop, ie the loop L=t+1 has moved on to its next
iteration. So the malloc statement between the loops L=t+1 and L=t has to be executed.
The interviewer was very impressed with the approach.
3. The question started with the interviewer asking me to write a program to print “Hello World”. I
just stared at him for a while. So he repeated the question He then wanted to know what the
compiler does when it encounters the statement #include, whether the stdio.h file contains just the
function declaration of printf or the definition too. Then we had a discussion on static and dynamic
libraries.
Finally, the results were declared and 5 students including me were hired
This article is compiled by Saikat Chakrabarty. Many many congratulations to him. If you like
GeeksforGeeks and would like to contribute, you can also write an article and mail your article to
[email protected]. See your article appearing on the GeeksforGeeks main page and help
other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-set-7-campus-mts-1/
Amazon Interview | Set 43 (On-Campus)
Questions asked in Amazon Interview.
Round 2: Written
1. Find the SQRT of a number.
Three F2Fs.
F2F 1:
1. Given a binary tree, no two adjacent nodes have same color, but all leaves should be in same
color. You can fill only with two colors. Write a function to find whether a given tree can be colored
using above scenario.
2. Given a binary tree, change the right pointer of every leaf node to the next leaf node (right to it but
may be on different level).
3. Given a class with n people,where each people plays a game with all other people. Results are
with you. You have to arrange them in a queue with a condition that, a[i] should have won a[i-1], for
all I, you don’t need to care about a[i-2] . (a[i] may win or lose a[i-2]).
F2F 2:
1. Write prime numbers from 1 to 100000.
3. Question from probability. Given c containers, r red balls, g green balls. Give a condition that if a
guy randomly pick a ball from any of the containers, it should be red.(more probable)
F2F 3:
1. Reverse a linked list iteratively, recursively.(Ice breaking question :P)
2. Given a matrix with 1s and 0s, u have to construct a matrix such that a[i][j]=1, if only every
element in ith row and jth column is 1, otherwise 0. You have to use constant space and O(mn) time
complexity.
3. Maze solve problem. Given a matrix with 1s and 0s, 0 represents free path, 1 represents blocked
area, and you can move in any of the 8 directions. Find the path from source to destination and print it.
Then he told me that he can change destination at run time. And asked me to do for that.
This article is contributed by Karthick Raja R. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-43-campus/
Amazon Interview | Set 44 (For Internship)
The written round was relatively easy. It contained 20 multiple choice questions on basic c,
algorithms and finite automata. Some questions from OS and networking were there too but were
easy. Coding questions were:
1. Find the nodes of the tree as seen from the left view of the binary tree.
2. Rotate the given matrix by 90 degrees i.e. the first row becomes the last column and second row
becomes the second last column and so on.
Interview round 1:
Two questions were asked. One puzzle and the other coding question.
1. Given n coins for two players playing a game. Each player picks coins from the given n coins in
such a way that he can pick 1 to 5 coins in one turn and the game continues for both the players. The
player who picks the last coin looses the game. You have to tell that for given n coins who looses the
game?
2. Given a number n, find the number just greater than n using same digits as that of n.
Interview round 2:
1. Given in facebook find an efficient way to find the mutual friends between you and one of your
given friends.
Hint: hashing, dictionary data structure implementation
2. For two very long numbers given, find the product of these numbers in an efficient way.
Hint: using binary multiplication effectively.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-44-for-internship/
Written Round:
This round consisted of 20 MCQs and two coding questions. We had to complete the test in 90
minutes. The MCQs mainly focused on C and general aptitude. They were easy to solve. The students
having faster question solving skills were in advantage! The two coding questions were:
1. We were given the edges of the graph and we had to find if a cycle exist in the graph or not.
2. Given a binary tree, we had to print all the nodes in the Zigzag order.
Then he asked me if I have any questions. I asked about how to improve. He said that I should blue
practice the problems more and more. I should work more on algorithms rather than solving the
problems relating to the limitations of any language. He even emphasized on the fact that companies
like Amazon are looking for the students having good knowledge of algorithms. He even mentioned
that GeeksforGeeks is a perfect site for preparing for companies like Amazon.
I was not lucky enough to be selected in the 2nd round of the interview but it was a motivating
experience.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-45-internship/
Problem – 1: Given a word and a text, return the count of the occurences of anagrams of the word in
the text.
For eg. word is “for” and the text is “forxxorfxdofr”, anagrams of “for” will be “ofr”, “orf”,”fro”,
etc. So the answer would be 3 for this particular example.
Problem – 2: Given a binary tree with parent pointers, find the right sibling of a given node(pointer to
the node will be given), if it doesn’t exist return null. Do it in O(1) space and O(n) time.
Problem 1: Given a BST, one of the nodes violates the BST property( left-child Problem 2: Two no.s
having equal no. of digits were given in the form of singly linklist. (For eg.- 102 will be given as 1 ->
0 -> 2 ). Add these no.s and return the answer in the form of a singly linkllist. Do it in O(n) time,
given n digit numbers
First I have to dicuss the approach with the interviewer and then he asked me to code.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-set-20-campus-internship/
Amazon Interview | Set 46 (On-campus for
Internship)
Written:
20 MCQ on basics of C, OS, Networking + 2 Coding.
1) Left view of Binary Tree.
2) Rotate a matrix by 90 degree.
Interview (Round-1)
1. You have to find p,q of matrix p*q such that it fill n elements(n given) Such that
a) matrix should be nearest to a square matrix and
b) 0>>n) in O(n) time and no extra space find occurrences of each element in O(n) time only
Round-2
1. You are given row and column wise sorted matrix you have to find and delete an element such that
it is still sorted in O(n) time.
2. Find if sum of any 2 elements in an array equal to k in O(n) time using extra space.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-46-campus-internship/
NetApp is a leading company of innovative storage and data management solutions that helps
organizations around the world store, manage, protect, and retain their data. Even though being in the
enterprise space, Netapp is known for attracting the sharpest minds in the industry. Meet Parag who
got an offer from NetApp and is one of the lucky few to be working from their Bangalore office as a
member of heir technical staff. In an interview with TopTalent.in, he talks about his experience, what
makes NetApp special and why he chose to work there.
1. What makes NetApp so special? Why did you decide to join NetApp?
Parag : NetApp is a “brand name” for storage. NetApp is a company with rich history, a culture of
innovation and a great place to work. It has the perfect work-life balance, great products to work on.
Most importantly its area of work matches my interest, which is File system. But there are many
companies(like EMC, IBM, Hitachi etc.) which have almost same attributes, what drifted me towards
NetApp is its capability of adaptation when it comes to new technology, products are being
developed/modified taking care of new technological advances which are in pipeline and are
expected to be feasible only after 5-7 years. I got a PPO through my internship at NetApp in the File
system group.
Parag : The process started with a written round having total 50 MCQs, 10 Quantitative, 15 Data
structures and algorithms, 15 programming and 10 systems related questions. And after clearing it 2
technical rounds were conducted, and after the shortlisting, managerial round was conducted. And if
everything goes well HR will confirm the hiring. Resumes and consolidated report of the interviews
of all the hired candidates will be sent to Directors having vacancy in their Business Units and they
will choose based on their requirement and match of expertise.
3. What were the tricky questions you encountered? How did you tackle them?
Parag : Most of the questions were related OS fundamentals. Interviewers covered almost all the
concepts of OS like Memory management, Synchronization, Processes and threads, System calls, they
even asked me about my internship project. There were some programming, algorithms and data
structure questions, one need to have deep understanding about all these to clear it. One question was
to emulate the behavior of page table given a program, accessing data from a disk, and the level of
difficulty was increased by changing the replacement scheme and by introducing TLB. The tricky part
here was to play with virtual and physical address space and mapping between them after
consecutive data accesses considering replacement scheme.
Parag : NetApp has a very strong internship and referral programme. They give preference to interns
for NCG jobs. But they do go for on-campus placement to a very limited set of colleges (Almost all
IITs, some NITs, BITS Pilani and some Bangalore colleges). Referral programme is generally used to
hire laterals.
5. Can you talk about what resources did you refer before the interviews?
Parag : As I knew that I will be bombarded with OS and DSA related questions, for OS I referred
“UNIX Internals by Uresh Vahalia” and studied some concepts from “Operating systems by William
Stallings. They are some finest books to build your base in OS, for DSA I referred “Introduction to
Algorithms – Cormen”. I also referred my class notes and slides for both the subjects. There are some
good websites for standard programming questions like careercup, geeksforgeeks and there are some
good forums like stackoverflow, Daniweb to refine or clear conceptual doubts. For programming
questions in C you need to be comfortable and patient with pointers.
6. What were some important factors according to you that made you stand out?
Parag : The most important factor is my teachers who played an important role by helping me
strengthen the basics of all the subjects. Most importantly my mentor who guided me for almost 2 and
half years and helped me gain substantial knowledge which eventually helped me, and also the
projects I did in my college steered me through the interviews. One more very important factor was
my internship project which was related to Delete subsystem of NetApp’s file system WAFL, it gave
me more deeper understanding of file system internals.
7. Currently, what are you working on and how has been the experience till now?
Parag : Currently I am in the Consistency point team of WAFL group, which works on maintaining
consistent image of file system all the time and writing it down to disk so that in case of disruption
user can switch back to last consistent image and hence won’t lose any data. It’s been a wonderful 13
months at NetApp, people here are very cooperative, generous, intelligent, they strive very hard to
make the workplace fun beyond just being a place where people would show up, do their work and
leave. I hope this work environment remains as it is for years to come.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/toptalent-parag-reveals-secrets-getting-netapp/
Amazon Interview | Set 47 (Off-campus for
SDE-1)
Round 1: Written
20 MCQs and 2 coding questions
(1) Mirror a tree.
(2) Given a linked list with next and arbit pointer. Clone the list(Approach + code)
Round 4: F2F(manager)
Discussion on all projects I have done.
(1) Convert a BST in such a way that every node contain sum of it and every greater element than it
(Approach + code)
(5) Deleting a node from LL provided the tail nodes points to mid element. After deletion property
should be maintained(Approach)
(1) Given coins of 1,2 and 5 and given a number N. Find in how many ways you can make the
change(Approach + code)
(3) Your teammate is not sharing required information with you. What will you do?
(4) If you are given 10 requirements and you don’t have to fulfill each and every requirement what
will you do?
(5) Given some languages which one you prefer and why?
(7) If you are about to meet deadline and one of your teammates need some help.Would you cross
deadline to help him?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-47-off-campus-for-sde-1/
Amazon Interview | Set 48 (On-campus for
SDE-1)
Recently, I have been through the interview experience of Amazon India and I would like to share my
experience with everyone.
Position: SDE- 1
Day 1:
Round 1 : (Written)
20 MCQ questions consisting of Data Structure, Algorithms, Operating Systems, Probability,
Combinatorics and Quatitative Analysis.
Coding Problems :
1. A string consists of parentheses and letters. Write a program to validate all the parentheses. Ignore
the letters.
eg. ((alf)ls) – valid
)(dkk)() – invalid
2. Two strings are given. One of them is the initial string and other string contains characters as per
their priority. Sort the initial string as per the given second string. characters in initial string may or
may not be present in the second string. If not present, sort them in lexicographical order at the end of
output.
eg. String1 – ddloyc, String2 – odl
Output – oddlcy
Again, some discussion over various approaches to solve this problem.
Day 2 :
Round 4 : (Telephonic with someone very senior)
He said that i must have been through many coding questions already, so he will start with the basics.
1. What is the difference between C and C++ ?
2. Which one will you prefer, when and why?
3. What is the difference between C++ and JAVA.
4. Which is better, C++ or JAVA. Support your answer.
5. Give one use case where C/C++ can use pointers to solve it, but it can’t be done in Java.
6. Again, some discussion over my projects. Which project i liked most and why? What problems did
i face during that
project and how i handled them.
7. Given a stream of 0’s and 1’s in which 0’s come first and then 1’s, find the first occurrence of 1.
8. Design a data structure for phone-book of mobile phones. Implement it and discuss about its
benefits and limitations.
This article is compiled by Kumar Vivek Ranjan. Many many congratulations to the author. If you like
GeeksforGeeks and would like to contribute, you can also write an article and mail your article to
[email protected]. See your article appearing on the GeeksforGeeks main page and help
other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-48-campus-sde-1/
Amazon Interview | Set 49 (On-campus for
SDE-1)
Recently, I have been through the interview experience of Amazon India and I would like to share my
experience with everyone.
Position: SDE- 1
Before telling you the questions and interview procedure, I would like to offer some suggestions.
There are always instances when your interview is not off with a great start. You need not panic and
keep your calm. Secondly, to compensate all the shortcomings in the technical part, interact with the
interviewer as much as you can. Show him that you are really interested in the company. They are
looking for future managers not just coders, so you have to have people skills.
Day 1:
Suggestion: Always code your solution on the editor provided on the website. It takes screenshots of
the page so if you copy a large chunk of data even from your notepad that’s considered as cheating.
Coding Problems :
1. A string consists of parentheses and letters. Write a program to validate all the parentheses. Ignore
the letters.
eg. ((alf)ls) – valid
)(dkk)() – invalid
Q1: You are given an array in which you’ve to find a contiguous subarray such that the sum of
elements in it is equal to zero. (I coded using hashtable in java)
Q2: Given a binary tree. Find out if it is a binary search tree or not.
Round 5: (Telephonic)
The interview started with if I had any questions, and then proceeded with the projects I’ve done.
Q1: You are given a file with many words. You are given a word as an input and you have to find
every anagram of that word in the file.
Q2: Given two words, tell if they are anagrams or not. Extend your solution for unicode as well.
Finally after a long wait of almost 8 hours the result came and I was hired!!
I would like to thank geeksforgeeks for all the pain they take in compiling every article so that people
may understand every concept clearly.
Many many congratulations to the author. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-49-campus-sde-1/
Amazon Interview | Set 50 (On-campus for
SDE)
Recently, I have been through the interview experience of Amazon India and I would like to share my
experience with everyone.
Number of interviews: 1 online exam (will be completely evaluated by the compiler itself, then code
of those who will clear the cut-off will be analysed by the hiring team) + 3 Face to face technical + 1
Telephonic (Technical again)
Online exam:
20 MCQ: Aptitude questions, if you are good in logical reasoning then don’t worry about it (basic
permutation and combination), C output questions, and most of them were pretty simple.
2 Online coding questions: 1. Print the first non-repeated character in a string.
2. Print the left view of a binary tree.
5
1 7
4 3 8 2
1
Vertically print the value in a binary tree. Like in the previous example:
4, 7
1
5, 3, 8
7
2
Next, I was asked to design an efficient data structure for two lifts in a building of n floors.
Round 4: telephonic:
Kind of HR + Technical, asked a lot about my internship project and other academic projects. Then
we discussed the problem of sorting rows of a file based on a particular column. Like as in Excel
file, you can sort file based on roll_no, first name, last name, any column you want.
File is very large, so you can’t just store the whole file into memory.
Solution: sort it out yourselves.
Many many congratulations to the author. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-50-campus-sde/
Directi Interview | Set 3
Online round:
1. There exist a binary tree with each node containing a character (lower case letters for leaf nodes
and upper case letters for non-leaf nodes) and exactly two child, Now given a string find the number
of root to leaf paths that contain this string as its subsequence. And the binary tree is given in post
order notation.
2. A long question and a brute force solution of finding the most optimum subset (2^n)
First Round-
2. Given a connected graph with n-1+k edges and k being less than 10. Convert this graph to a tree
removing the most weighted set of edges.
3. Given a set of coins n with each coin i having Pi probability to give heads. Find the probability of
getting k heads, when all coins are tossed together.
Second Round-
1. Given a random function which gives some value in the range [-1,1]. Find the value of PIE.
2. Given a set of currencies and the exchange rates from each currency to another. Find if there exist
any cycle of exchanges after which the original value of the amount increases.
3. Given a tree find the maximal XOR of any path from root to leaf (simple recursion)
4. Given a tree find the maximal subset XOR of any path from root to leaf. (ie the subset XOR may or
may not include all elements from root to leaf)
Third round-
Some HR questions especially regarding the projects done by you and only one algorithmic question-
1. Given a set of restaurants (the number being quite large) and its geographical location(x,y) , you
are allowed to do an significant amount of pre-processing on it. Now suppose there are x customers
located at position (s,t), design an efficient algorithm to find the k nearest restaurants to these
customers.
( This problem is the famous KNN problem- the solution they were expecting were of grid files )
Source
http://www.geeksforgeeks.org/directi-interview-set-3/
Amazon Interview | Set 51 (On-campus for
SDET)
Hello Everyone!! Recently, I have been through the interview experience of Amazon India and I
would like to share my experience with everyone.
Position : SDET
Suggestions : Your code should be optimal, have proper variable naming, consider all corner cases
and should not be lengthy.
Coding questions :
1. A string consists of parenthesis and letters. Write a program to validate all the parenthesis. Ignore
the letters.
eg. ((alf)ls) – valid
)(dkk)() – invalid
2. In the same (M X N) matrix I have to print the matrix in increasing order of elements .write code
for it(I used heap for that purpose and used concept of merging k sorted array).
3. Given an array , each element is one more or one less than its preceding element .find an element in
it.(better than O(n) approach)
4. Given two strings STR1 and STR2 .we need to find longest substring in STR1 whose all characters
are taken from string STR2(was asked to write code for it in optimal time)
STR1-abcdefacbccbagfacbacer
STR2-abc
ans : length : 7
acbccba (from position 7 to 13)
5. Given a binary tree. I need to print the nodes in vertical line zigzag manner. For example: 1st
vertical line from top to bottom, 2nd vertical line from bottom to top,3rd vertical line from top to
bottom and so on
5
/ \
3 7
/ \ / \
1 4 6 8
/ \ \
2 9 10
Answer would be –
1
23
546
97
8
10
asked me to name the subjects that I have studied so far . He asked many theoretical
questions on database management systems, SQL, operating systems, OOPs concepts and their real
life examples and also two coding questions.
1. Code for dfs of a tree(tree can be any general tree)
2. Print pascal triangle and your output should be same as pascal triangular form (have to consider the
space separation) .I told him two approaches and wrote the code.
Round 5: (telephonic) (1 hour 30 min)
For first 40 minutes he asked me about my achievements, about amazon company, my project in
details and what problems I faced in project and how I resolved them. next he asked one coding
question.
1. Find the square root of any number (square root can be a real number) without using any library
function .
I told him an approach using Newton-Raphson method. It was faster but he asked simple and optimal
method so then i suggested binary search method ( O(log n)) and I was asked to code it and dictate
and he ran the code on his system also.
Many many congratulations to the author. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-51-campus-sdet/
[TopTalent.in] Want to know how to get
into Yahoo! ? Read our exclusive Interview
with Prabha
“Persistence is what got me this far”, says Prabha Satya, Yahoo!’s recent
hire for Software Development. Lately Yahoo! is also actively hiring other than acquiring startups one
at a time. “I want to make a difference in the field of technology, however small it may be” she
explains when asked about her Goal in life. A graduate from a remote village in Andhra Pradesh to
multiple placement offers at IIITB , this week we bring you the story of Prabha who considers herself
as a proud Alumnus of IIIT Bangalore.
Want to know how her resume looks like ? You can download it here.
Could you briefly describe about your student days at IIIT Bangalore ? How is it like to study
there?
Prabha: I was a very common student until my B.Tech but it was when I joined IIIT-B for my masters,
I had become a true computer science student. It had widened my horizon, made me inquisitive and
curious at learning instead of just being bookish.
Coming to my student days over there, they were really challenging. The kind of dedication we used
to pay in order to produce some quality work in our projects is so intense. I do remember one course
in our college, Web Information Retrieval,which had changed me and my learning process
completely with its mandate oriented approach. IIIT-B is the best place I had ever been and it had
truly made gaining knowledge as my aspiration.
What makes Yahoo so special? Why did you decide to join Yahoo?
Prabha: Yahoo! is a great place to work for. The kind of exposure one gets in terms of technologies
is both deep and wide. Now, Yahoo! is in a very big transition. And even if small change has to be
made, it does not effect just hundreds of users but millions of users, the scale with which it operates
is very big.And being able to deal with such a scalability makes it special. The only reason for me to
choose Yahoo! is it is very much aligned to my interests.
What were the tricky questions you encountered? How did you tackle them?
Prabha: In the second technical interview, they gave me a question which should be solved using
stacks. I was not able to give the exact solution. I just told all the possible approaches and the best
way is to solve using stacks and why is it so. The only thing which matters in technical rounds is our
approach to solve the given question. You need to start from the basics and go on discussing with the
interviewer till the best possible solution arrives. Most of the time the interviewers help us arriving
to the solution.
What is Yahoo culture like? How does it impact the overall process of working there?
Prabha: Culture in Yahoo! is very much open. There are events where you will get to know what
other teams or departments are working on. You are very much welcome to any suggestion before any
product reaches the end user. Your work is not just for your team and you can also contribute by
making hacks in quarterly hackathons etc., There are lots of chances to contribute ideas not just
belonging to your work but anything which makes an impact from the company’s perspective.
Yahoo has been going through a transition phase recently . How do you think this affects the
workplace from a career perspective?
Prabha: Yes, after Merissa Mayer took over as CEO, Yahoo! is in a very big transition phase.
Developing products from scratch is challenging but developing new features(which are not intended
to provide at the start) for any product with minimal changes to the existing base product is even
more challenging. It is a great time to work in Yahoo! in terms of learning.
What were some important factors according to you that made you stand out?
Prabha: Sound basics, developing problem solving abilities, solving algorithms, enough coding
skills helped me. Being a technology student one should be able to follow the changing trends, should
be ready and willing to learn new stuff every day because change is rapid in the field of technology.
Any student who is ready to learn new stuff can lead here. I always enjoyed accepting challenging
work and continuous learning. May be that helped.
Currently, what are you working on and how has been the experience till now?
Prabha: I am currently working for Advertisements and Data platforms in Yahoo!. My work is more
towards user data analytics. Got a chance to work on one of the biggest data pipelines in the world.
My journey is just started and there are very big technologies within Yahoo! and there are lots to learn
for me.
Any relevant incident or experience that you like to share through TopTalent?
Prabha: There would be lots of distractions but we should not get blinded by the options while
choosing the courses we elect, or the job profiles which we aim for. If you want to choose something,
first know what your interests are, what you want to work for and then decide the best possible
option. Learn to enjoy the journey by constantly gaining more knowledge out of your interests and by
accepting challenging work.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/toptalent-want-know-get-yahoo-read-exclusive-interview-prabha/
Qualcomm Interview | Set 2
It was a very good experience to face interview at Qualcomm.
I have attended the interview for a position of Embedded SW application developer and my
experience and my expertise is on C/RTOS/Data structures in telecom domain.
All rounds were not that much tough and interviewers were very friendly in talking.
Telephonic:
Note: All questions were asked deeply and need to tell him until he convinced with the answers.
After 2 days I got a call to come down to Qcom office for next rounds. That day went long..!!
Round 1:
Basics of C programming
Memory map of program, Storage classes and their mapping
If we declare more number of variables than the registers available on the processor? Where
they will be stored.
IPC (signal, as I coded in this) how actually it does transfer of memory
Set of C code snippets given to debug … Identify problems in it and tell outputs
Round 2:
Basic C questions
Write a program to Delete a node , given only a pointer to the node in a Circular linked list
How to access data in the called functions after returning from it (point here is that, cannot
access auto variables in functions after it is being called off )
Write a program to return a stream of bytes from a function
Lots of questions on Function pointers, how, usage, examples
Round 3:
Generic questions on project they are doing , how market values are there , what products are
coming
Memory handling in SIM cards/embedded applications
Priorities of OS programs , process and thread differences
How to handle the Generic functions , like Void pointers
Round 4:
Round 5:
Big & Little endian – definitions, representations, write it down, swap them, etc
Lots of memory related questions
Write a program to implement memcpy() on your own –
Need to evaluate many other conditions like overlap situations and etc.,
Difference between library call and a system call
Priority inversion in a RTOS and its solutions
Round 6 (HR):
Qualcomm aspirations, culture and how you look to be next, feedback from us on the interview,
Nothing much… just a casual talk.
Note: All rounds, you need to explain about your project clearly and they can ask some really good
questions from project. Be out and out clear with your projects and CV.
All interviewers will explain about the position you have applied for and it is good if you ask more
questions on what exactly they do and how it works.
I did these interviews very good but unfortunately I was not into the Qualcomm after this. But they
considered for another position and within a month I got another call and again 3 rounds of
Technical Interviews as below,
Process: 3 Technical
Round 1:
int main(void)
{
char *p;
while(i<50)
p++;
return p;
}
Round 2:
Round 3:
Stack corruption
Hacking through stack smashing
Program debug
Priority Inversion,ex
Race conditions,ex
Semaphore, mutex, ex
Strcmp, pgm,ff ends it
Arbit linked list pgm
Memcpy pgm, possibilities like overlapped memory address copy.
Small general DI puzzle
Pointer subtraction
I would sincerely Thank GeeksforGeeks very helpful in my preparation and hope this would be useful
for other aspirants.
Many Many congratulations to the author. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/qualcomm-interview-set-2/
Amazon Interview | Set 52 (For Internship)
Hi All, Here is my interview experience with Amazon for internship. Hope it helps:
Round 1:
Online round with 20 objective questions on (Questions related to data structures, analysis of
algorithms, C Language and some puzzles.) and 2 coding questions in 90 minutes
Given a string. Write a program to form a string with first character of all words.
Ex: The bucket is full of water
Output: Tbifow
Check all edge and corner cases.
Given 2 linked lists. Find out if they intersect or not. If yes, find intersection point .Write complete
code for it.
I could not remember the simple way: find the length of the lists and simply move forward the shorter
list by difference of the lengths and find the intersection point. Instead, I joined the end of first list at
the end of the 2nd list and then went for cycle finding by Floyd Cycle finding Algorithm. Although
both are O (n), but he was impressed as it was a new approach.
Spiral level order traversal without using extra variable for detecting level (using one stack and one
queue) and few other implementations as well.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-52-internship/
Amazon Interview | Set 53 (For SDE-1)
In each round they ask me why I want to join amazon, why I am leaving my previous company with
such a short span(around 2.5 months) and project stuff.
Interviewers were quite friendly. They would explain you till the point you fully don’t understand.
And even while discussing approach and solving, they would clear your doubts if any.
1st f2f:
First I was ask to introduce myself and give a brief over my projects. Latter he ask me to explain any
one of my project and the hardest task I have done.
We have used infix to post ix and postfix evaluation for our generic search expression’s evaluation.
Here we had a lot of discussion on why conversation from infix to post-fix was needed and all.
1. Given a String s and int r , first fill each character row wise and print column wise.
for e.g. String s = “abcdefgh” and r = 3
so filling column wise would give :
adg
beh
cf
2. given a string or say number .. for e.g. 134 now with each number , as per mobile’s keypad , some
letters would be associated.
here 1 – > abc , 3->ghi, 4 ->jkl . So we should print all the permutation such that we take 1 character
from each of the number.
input number can be of any arbitrary length.
lets say each digit has m numbers associated , then for the input of length n , we need to generate n^m
possible strings.
Took a map of which would return all the letters for the number. solved it using recursion. its quite
similar to permutation of string. .
Interviewer seemed quite impressed here.
2nd f2f
1. Find integer part of sqrt of given number. Initially I gave o(root(n)) solution. Later solved with
binary search(O(logn)).
2. Given an array of integers. replace each number with next higher number on its right side , which is
nearer.(if not present than keep it as it is.)
for e.g. input – > 3 4 6 1
output->4 6 6 1
I suggested we can traverse from right side , we will take extra array (o(n) space complexity here)
and in that array , we would store index of next higher nearer number.
so it would be like
if (a[i]
Since we needed extra space to store indexes, he asked that the input is array o
class Node {
int val;
int higher;
}
He was very interested to see how i keep track of indexes and how i traverse between them. It is o(n)
with o(1) space complexity. (when we have a[i]>a[i+1] we don't do linear search , but we jump using
the indexes, so its not o(n^2)) It was hard to convince him on complexity.
3. given a binary tree. connect all the node at the same level. each node would have left,right and
nextSibling pointers. we need to fill nextSibling.
solved with level order traversal . Similar to BFS on tree with queue. Only approach was needed, no
code for this one.
2. Given a read only linked list with next and random pointer , clone the list. I told him that i know the
solution and explained him the approach. It was with the use of hashmap and takes o(N) extra space.
Then he ask me whether I know a o(1) space solution, since I didn't knew, i was told to solve this.
With this , he told that I can modify link list.
Initially I struggled, but with his help, in the end came up with working code. He was looking fine
with implementation.
Here I ask about the work culture and the process being followed at amazon.I ask lot of questions
regarding tools and technology they use. Since I had work on scrum model , it was quite interesting.
He seemed to be impressed here.
2. Given binary tree, connect all the nodes which are in same column. 1 caveat was that same 1 node
can have 2 parents. Here as in example, node 7 is being pointed by 2 and 6.
Solved it using level order traversal. Used a Map : columNo, Node. it would store the last visited
node of that column. So whenever we visit a node, first we check if its corresponding column is
present in hashmap. if not , it means its the first node of column, put into map. if the column present ,
then we will get the node stored in map and current node would be its nextVerticleSibling. and we
update the map.
He deed the dry run with example and code and he was OK with final approach.
1
/ \
2 6
/ \ / \
3 7 8
/ /
4 12
/ \ \
5 9 13
\ \
10 14
\
11
Many Many congratulations to the Priyank. If you like GeeksforGeeks and would like to contribute,
you can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-53-sde-1/
Amazon Interview | Set 54 (For Internship)
Hi All. Here is my interview experience for internship at Amazon.
Position: 2-Month Intern
No. of Rounds: 1 Online + 2 PI (2 F2F)
Question 1: Given a linked list, write a function to reverse every k nodes (where k is an input to the
function).
Example:
Inputs: 1->2->3->4->5->6->7->8->NULL and k = 3
Output: 3->2->1->6->5->4->8->7->NULL.
Inputs: 1->2->3->4->5->6->7->8->NULL and k = 5
Output: 5->4->3->2->1->8->7->6->NULL.
Question 2: Given a string containing words separated by arbitrary number of spaces. Write a
function that returns a string consisting of the first letter of each word. (Note: there may be any
number of spaces at the starting of the given string, at the end of the given string or in between words
of the string.)
Example:
Input: ” this is a test case ”
Output: tiatc
(Function prototypes and main was given for both the questions. Although many solutions passed the
initial test cases, they were rejected later as they did not satisfy boundary cases.)
Input:
First List: 5->6->3 // represents number 563
Second List: 8->4->2 // represents number 842
Output
Resultant list: 1->4->0->5 // represents number 1405
I reversed the linked lists and simply added the corresponding nodes along with the carry. Then he
asked me to solve the question without reversing the list. Then I solved the question iteratively
without reversing the lists.
The interviewer then asked me to write a recursive code for the same problem.
After that he asked me to modify the code so that the carry at each place is passed by value instead of
using pointers(which I had used in my code).
Question 2: iterative and recursive code to reverse a linked list(Take Care of corner cases: when list
has no nodes or contains a single node)
Question 3: Write a function to check whether a binary tree is a sub-tree of another binary tree
(Check for all corner cases).
I solved it in O(n^2) time complexity. He did not ask me to optimize my code.
Question 4: Which data structure would you use to keep records of stock market?
He then asked me : Suppose you have to maintain the stock values of various companies during
various periods and return minimum stock value of a particular company over a given period of time.
I answered segment tree (Probably the correct answer was queue data structure).
However the interviewer proceeded with questions on segment tree.
He asked me to write a code for
a) Creating a segment tree
b) Performing range minimum query in a segment tree
c) Updating the segment tree
He asked me to analyze the time complexity for building the segment tree and performing the range
minimum query in the segment tree.
He then asked me: If you are to maintain the stock value of a company for the past 6 months..then you
have to update the segment tree every day by deleting a stock value and inserting a new stock value.
How would you do that?
Here I got stuck and could not perform the updation in better than O(n) time.(However using queue it
can be performed in O(1) time) .
b) How to store a binary tree in a file & then read back.(It is not necessarily a BST)
First I answered that I would store level-order traversal of the tree.
He then asked me how I would maintain the nodes at various levels (which I was unable to answer).
So, I changed my approach and told that: I would store in-order and pre-order traversals of the tree
from which the original tree can be easily retrieved.
But then he told me to optimize my approach (As this approach would require twice the original
space to store the data in the nodes). I could not further optimize my approach (However the better
approach was to use parenthesization.
A
/ \
B C
/ \
D E
If this is the binary tree then it can be stored as (A(B(D),(E)),(C)) in the file.)
c) Then there was a 10 min discussion my project , the problems I encountered and how I solved
them.
d) Finally he asked me if I had any questions.
I asked about the intern projects at Amazon and the use of DBMS and NETWORKING in it.
He started elaborating the entire work-process at Amazon and his work-experience……..most of
which I could hardly understand. He also told me to have a good knowledge of JAVA as it will be
required at some stage during the projects.
Many Many congratulations to the author. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-54-internship/
[TopTalent.in] Hacker with a Heart –
Interview with Google Hall Of Fame
Member, Mohit Sahu from NIT Raipur
It’s not everyday that you see a young under grad getting inducted into
Google hall of fame. Yes, Mohit Sahu is indeed someone special. He owns a couple of startups, an
NGO, takes guest lectures on web security and gets inducted into web security hall of fame of top
companies every now and then. Mohit considers himself a geek and doesn’t have a liking towards
sports and other external activities; though he loves computer games. “When I am away from my
computer, I visit new places and spend time with orphans” says the compassionate hacker. We at
TopTalent had a fireside chat with this Google Hall of fame member. So, read on to know more about
Mohit and what it takes to be an ethical hacker.
Mohit: I am a simple guy from a small town in Raigarh, from a middle class family. I had done my
schooling from various schools, including govt. school and from Hindi medium. After schooling, I
joined NIT Raipur in Mining engineering. It was tough for me to choose any other field as career
option as I was only aware about public sector jobs at that time. Joining NIT Raipur, was one of the
best decisions of my life.
2. Congratulations on your induction to Google Hall of Fame. Could you share with us how it
happened?
Mohit: Thanks a lot, frankly speaking it was luck. I was searching for bugs in Google, I got some
bugs which some other researcher had already submitted as these are common for a bug hunter. So
one day I got to know about a contest thinkwithgoogle.com for NGOs. By searching more I was able
to find out other domains of thinkwithgoogle.com, then during this finding, I found a bug in Google
shopping which was very critical. I reported all this to Google security team. I was already in Google
security hall of fame in honorable mention, for bugs I have reported earlier. But for above bugs they
replied and I got bounty money and also got my name listed in rewards section. I am not a bug hunter,
I do it in free time. Basically I love to research over web app security and I found that bug bounty is
good way to sharpen your skills and also get some penny.
Mohit: I am inducted into web security hall of fame of multiple companies like Google, Yahoo!,
Microsoft, Nokia, Apple, Blackberry, got some rewards from Paypal and few more. We have recently
received projects from NTPC, SBI and many other local projects too. Frankly, I don’t consider these
as my major achievements, because I believe my major ones are yet to come.
4. Coming from a mining major, how did you come across hacking?
Mohit: Well, I like exploring things and I started participating in many college events. One of them
was a tech fest by IIT KGP. My first one actually, and it changed my whole vision. I attended a
workshop on hacking and I was so attracted towards it. Exploring technology was always fun for
me. So here my journey begins, I started hacking accounts on Orkut, at that time Facebook was not
much popular. I got connections to many hackers via “underground hacking community” on Orkut. I
made a habit of reading mostly tech blogs and all I was doing was helping Google, who assisted in
gaining more knowledge. This was taking a lot of time, so I started bunking classes, and some times
even exams. May be it was worth it. I don’t suggest others to do it this way but it worked for me.
Mohit: For me, it was quite difficult to handle both my college life and virtual life (hacking career). I
didn’t get much time to learn languages and there was no proper guidance by anyone as Google was
the only source. As I said before, it was my passion to explore things from my school days, so being
a non CS/IT student it needs a little more effort but anyone can master this field. First thing, one has
to be learning programming languages and also allot lot of time for research. While choosing this as a
career option one has to focus completely.
6. As a country producing the highest number of software professionals, how good are we doing
in the areas of information and web security ?
Mohit: I would like to give an example here. When I was taking a seminar, I was shocked to know
that even university passed out students didn’t know anything about ongoing technologies and their
university syllabus was completely outdated. This is the case with not just this college but most ones.
Indian brains are really sharp but are not being used in the right direction. Universities should update
their syllabus regularly otherwise, it will be hard for our students to compete with their foreign
counterparts. We lack awareness and encouragement. So, we need to make people aware, update
ourself, promote security related fields and most importantly encourage innovation.
7. What is the significance of cyber security these days. What are opportunities for TopTalent
from a career perspective in this field ?
Mohit: For any company security plays a very important role, it could be for webapp users or
network users; we should be concerned about security. User count for facebook, twitter and other
social networking sites is increasing day by day. All financial transactions are going over the air, so if
this increasing functionality makes things easier, then security loopholes are also bound to increase.
Due to open source, it is easy for a hacker to exploit any technology. We have lots of opportunities in
both web and network fields . We can make our career in web application security, penetration testing
, network penetration testing, wifi security audits, exploit development and many more. Being a
programmer is good, but being a secure coder is much better.
8. Most Top Colleges in India offer various courses and electives on Cryptography and
Information security, what else do you think should be done to improve the status quo?
Mohit: Course curriculum as I have seen in some colleges generally are theory based which is of
very less use. In real life situations, students fail to code a single good program in a given time. I have
observed that being a hacker, people learn to explore technology and learn a lot more than simple
procedure based coding. Students should be given some unique and real life projects rather than old
ones with no objective. It is easy to get code online and there ends the motivation for a me too type of
project. Indian Universities should also offer some good courses like the MOOCs offered by
American Universities.
9. What is the objective of your NGO and the motivation behind launching it?
Mohit: Our NGO “Chhattisgarh Infosec Society” founded by me and my brother Shubham Sahu, is a
first of its own kind in our state for cyber security and awareness. As I am interested in social work, I
thought working for cyber security awareness would be a good way to start. We give seminars in
schools and colleges, take workshops, help people via social media. I do all the work by my own
with full support from people like Mr. Prakash Bajaj. Our motto is to make India a secure cyber space
by providing free security to some websites, restore hacked sites, give free training on cyber security
etc.
Mohit: For students, please don’t rely on college courses, work on current problem and try to do
something innovative. Follow your passion and make that your profession. For hackers, “Be Ethical”
because its we who can make our country a better and secure cyber space. Learn as much as possible
from your peers and seniors, this is what makes a college unique and wonderful.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/toptalent-hacker-heart-interview-google-hall-fame-member-mohit-
sahu-nit-raipur/
Flipkart Interview | Set 1 (For SDE 2)
Hi, I was interviewed for Flipkart SDE 2 role 2 months back. I want to share interview experience
with other geeks.
(2) Given a gold mine of n*m dimension. Each field in this mine contains an integer which is amount
of gold in tons. Initially miner is in first column but could be at any row i. He can move only (right ->,
right up /, right down \). Find out maximum amount of gold he can collect and path followed by him.
(3) Given two string str and pat. Find minimum window in str which contains all characters from
string pat.
(2) Given two trees, superimpose them. If not possible to superimpose raise exception.
Example:
2 2 2
/ \ => / \
1 5 1 5
5 2
/ \ => Not superimposable
1 5
(3) Given a review paragraph and keywords, find minimum length snippet from paragraph which
contains all keywords in any order.
(4) Extended question 3 if there are millions of review, what preprocessing step would you do.
Coding Round: (1 hour 30 minutes)
Given list of expressions:
a = 10
b = a++
c=a+b
d = c*b + a*c
Print out value of last variable (in our example, it is d). First illustrate algorithm and then code in 1
hour.
After few days I received offer. Thank you Geeks as reading geeksforgeeks was wonderful and great
learning experience and helped in preparation for interview.
Many Many congratulations to the Author. If you like GeeksforGeeks and would like to contribute,
you can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-set-2-sde-2/
Drishti-Soft Solutions Interview | Set 1
Location: Guagaon
Position: Software Developer
I decided to write this post because when i was preparing, I didn’t find any help on google about the
interview process by Drishti-soft, so I thought that since I bagged the job I might as well help those
So, when Drishti came to my college I didn’t know anything about the company nor even heard of it
before even though one of our senior got placed in it. Well it came with a big package so I was sure I
was gonna sit for it since the package was lucrative and it was a technical company which is my type.
First round started and since I was on time I found a seat near one of my friends. First they made us
fill some forms including some feedback forms and personal details after that using our Facebook ID
they made us login and told us to start the test.
After first round they gave us a PPT for their company which was one of the best ppts I had till now
and the work ethics they had I liked them a lot. Those were like of what I thought of my dream
company to be like and only difference was my dream company is a Game Development Company
and the motivation speech about career guidance was so good it motivated me a lot. Most of the things
they said were the things I think are right so I started to like them and started to develop a genuine
interest in the company.
Result of first round came. I was playing DOTA 2 at that time which I do most of the time so I missed
the results but luckily Shailesh Gupta, told me I cleared 1st round. I checked and went running to the
Computer center for the next round with just a pen and in my mind I was thinking that since I was late
they wouldn’t let me sit for the second round. When I reached there they were cool about it and they
tried to find me a place but in the lab where test was taking place, there was no PC available so they
asked me bring a laptop or find one. I could not go back to my hall to get one and no one else brought
there laptop so they made me sit separately in another lab where I was the only one who was giving
the 2nd round.
2nd Round: Subjective Coding round : 5 Coding questions :-3 of 1 marks and 2 of 3 marks
Q 1: Check that the number can be divided by the sum of its digit. (Easy as it can be)
Q 2: A girl counting on her left hand’s fingers, u need to tell on which finger she will stop for a giving
number. Counting was like 1-thumb, 2-index finger , 3-middle finger, 4-ring finger,5-little finger then
6-ring, 7-middle , 8-index, 9 thumb , 10 -index and so on ..(easy like hell )
Q 3: Gcd of two numbers ( again ..:) )
Q 4: Remove duplicate from a sorted linked list . (was easy and as linked list was already sorted so
it become more easy)
Till now all question i find were easy did these in 20-30 min, I had almost 1 hr left.
Q 5: given an array using in-place operation u have to put odd number in odd indexes and even
number in even indexes. Assume array of even length and half of it will be even numbers (seems easy
but as u cannot use another array and the order of number should not be change it was a good question
took me while to implement the solution i think of)
Next round was in in their office in Gurgaon. They told us to take reservation in Tier-3 and all
transportation expenditure will be compensated. Out of the 9 people selected, 7 of us were there, as
we reached there sooner than scheduled so our interview also started 1 day earlier.
4th Round: F2F analytic round: this was the hardest round I faced in my life!!!
Q. Pipe one fills a tank in 15 hr another fills in 20 hr (time could have been different) and 3rd empty
in X hr. if all work together tell the max value of X for which tank will never be full. (easy :P)
Q. 13.1.13 is special because date*month =year find the year in this century which have max no of
such dates. (I think answer is 24) NOW the HARD q comes
Q. 9 student have either back or white cap on them (cant talk to each other) black >white>1 teacher
gave them 20 min no one answer then teacher gave them 10 min no one answered then teacher gave
them 5 min all of them gave the answer. (gave many hints before I could answer)
Q. You have 2 ball of each A,B,C colors and each color have 1 light and 1 heavy ball. all light are
same weight same goes for heavy. using balance (Scale) min time how u find weight type of each ball.
(first time for me gave me lots of hints a lot then it was like he solved it for me it was already past
00:00 of night now)
Q. There on a island there are 13 A,15 B,17 C animal if two of different type combine 3rd one is
created . can there can be a time when only one kind of animal remains? (again he gave a lot of hints
till i was able to solve it)
Q. There are 3 doors 1 of them have money other 2 have nothing if first we let u choose 1 door and
then open one of the other u didn’t choose and show u it have nothing behind u. Now i will let u
change what u choose will u change ur choice and choose the one door which is left or stick with your
door.
5th round: HR round which was hard for me as I am not that social and weak in communication but
as I went for the next round after 30 min I assume I passed HR round too or may be they considered
both the 5th and 6th together.
The final and most important round was about the work you have done during your college such as
project work and vocational training.
6th round:Project discussion and puzzle round Sir told me about him self and asked me about my
interests then he asked about the project which I had done. They did not ask many any puzzle but they
asked the 2 others before me. I explained my java UI project I did in summer. He seems quite pleased
by what I know. Then asked me some network questions to check that I can answer questions from
other topic other than programming.
Q. Public-key cryptography and
Q. question related to Certificate authority.
He asked these when i answered some of his question about my web project and the database I used
in it.
Next day the results were announced and in the end I and another guy from my college got the job .
Key to get this job offer : You must be a real geek and not someone who is pretending to be one solely
for the job. 12-14 hrs of interview will tell them everything about you whether you like it or not.
I am really thrilled about the work I will be doing there and can’t wait to get started. I have an
Source: http://sunilkumarsheoran.blogspot.in/2013/11/interview-for-drishti-soft-solutions.html
Many Many congratulations to the Author. If you like GeeksforGeeks and would like to contribute,
you can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/drishti-soft-solutions-interview-set-1/
[TopTalent.in] What it takes to be a
Googler? An Interview with Google’s
recent hire Romal Thoppilan
There is a myth that only grads with high CGPA land in high paying
dream companies. Despite his average grades, Romal with his extraordinary coding talent and
determination succeeded in getting a job offer from Google. “I would like to create something
disruptive in the fields of Data Science and Mining, and I believe Google is the right place to start my
career,” says the myth buster. We at TopTalent.in got a chance to interact with him about what made
this possible and what others can learn from this.
In case you are wondering how the resume of a Google recruit looks like, you can download the
resume by logging in.
TopTalent : Could you briefly describe your student days at BITS Pilani ?
Romal : I always considered myself fortunate to be pursuing my degree at BITS Pilani. The
curriculum here is quite flexible giving enough scope to nurture your interests apart from academics. I
tried to make the most of it by being able to complete few higher degree courses in undergrad itself.
The faculty here is pretty knowledgeable, I spent some great time working along with them in
projects. Also the students here share great enthusiasm towards their career and play a big role in
your development.
Romal : Google certainly ranks among the top companies to work at and the quality of the products
and services they offer is well known. Also working in Google allows one to pursue his own interest
along, since Google has such wide ranges of projects to offer. The work environment and the culture
there adds every bit of fun to it.
TopTalent : How much preparation did you put in to bag this opportunity?
Romal : Unlike most others, I took my time off. My primary objective was to complete and furnish off
some of my incomplete projects, so that I could be confident about them during placements. For
programming, I used to practice codeforces problems. The contests it organizes contains a real good
mix of mathematical, logical and algorithmic problems, and poses an environment much similar to
coding rounds during placements. Besides, I had completed most of the algorithms from Cormen and
then shifted to GeekForGeeks to refer to past years interview experiences.
Romal : The whole hiring process was pretty smooth actually. It had one written round based on your
overall knowledge of the field which basically had a few aptitude and coding questions. The shortlist
was announced after two weeks and we were called for an on-site interview at its Bangalore office.
Then followed four back-to-back interviews, mostly algorithmic. We were allowed to write the code
through whichever medium we were comfortable with. I toggled through all – pen, board and online
editor. There was very little delay and the accommodation and food were pretty good. Finally within
a week, I got the CALL!
TopTalent : What topics do you think students should prepare for similar jobs like that of yours?
Romal : Firstly, they should have regular coding practice as most companies now prefer using coding
rounds for shortlisting. The problems asked normally don’t require any deep knowledge of
algorithms. They are to test your speed and logical thinking. Then comes personal interviews. Most of
the companies prefer asking algorithmic problems. However, these questions could indirectly test
your basics around other topics like operating systems and database management system as well.
Mostly if your basics are clear, they look at the way you think and reach the solution.
TopTalent : From your experience, what are some of the important factors that the interviewers
will be looking out for?
Romal : Many believe that interview questions keep on repeating every year so they could just mug
up everything to clear such interviews. This brute force way doesn’t even work out for regular jobs
let alone Dream Companies. In one of my interviews, the interviewer asked me a question which I
had never seen before. When I finished reading the problem, he asked me to speak out everything that
came to my mind and to not stop speaking till I reach some solution. Luckily for me, I did arrive at
some solution. It was a mind boggling experience. These kind of interviews end up testing your
thinking abilities more than anything. For Jobs like the one I am going to join, strong basics in
algorithms and critical reasoning skills are essential. These are the two most important qualities that
interviewers will be looking in you. The answer impresses nobody, the way you reach there is what
matters.
TopTalent : What role does resume and CGPA play for applying to such jobs?
Romal : Resume serves two purposes. Firstly, getting you shortlisted for the interviews and secondly,
to give a brief idea of the things you have been working around and and are comfortable with. This
generally guides the interviewer to choose what to ask and what not to ask from. I personally referred
to ‘Cracking the coding Interview’ for building my own resume. It contains a number of Do’s and
Dont’s.
CGPA was never a thing to boast about in my resume. For most of the companies it just plays a role in
the initial shortlisting. However for research based companies your CG does play a significant role.
Though a high CG is a good thing to have, its just an indicative of how disciplined you are rather than
a measure of your talent.
TopTalent : Would you like to share something exclusively for job seekers from elite colleges ?
Romal : Do not restrict yourself to some specific domain or subject, at least not at the undergrad
level, but always have an overall sight of things and how they interrelate. Follow your interests and
be good at it. Make most of the opportunities you get to learn as a part of your curriculum or through
other online sources. And do possess a go-code mindset.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/toptalent-takes-googler-interview-googles-recent-hire-romal-
thoppilan/
Flipkart Interview | Set 2 (For SDE 1)
Hi, I had Flipkart interviews for SDE 1. I would like to share my experience.
1) It was long description for a DNA problem. Main DNA sequence(a string) is given (let say
strDNA) and another string to search for(let say strPat). You have to find the minimum length window
in strDNA where strPat is subsequence.
2) There is a zoo and there are several groups(number of groups:K) of people for tour. Each group is
having different size (g1,g2,g3…gK). There is one bus with capacity C. Journey starts from a point
and bus will come back to the same point. A group can only be included in the bus if all the members
of the groups can be accumulated in bus. After coming back from the tour, each group in the bus will
again wait in the queue at the bus-stand. Bus-driver earns a rupee for each person travelled. You have
to find the earning of the bus driver after R rounds.
For example :
Number of groups G = 4
Bus capacity : 7
Number of rounds R : 4
First round : 2 4 (we can’t take 3rd group as 3 members can’t be accumulated after 2 and 4.)
Second round : 3
queue : 5 2 4 3
Third Round : 5 2
queue : 4 3 5 2
Fourth Round : 4 3
List of edges are given in the format (source,destination) –> (s1,d1) (s2,d2)…
1 – Loop
2 – Multiple roots
Output :
Indicate the error (considering the priority) in case of any error and exit the program.
(e.g. (A(B(D)(E))(C(F)(G))) .. Here A is root. B and C are children of A. D and E are children of B.
F and G are children of C.)
Example :
999877
887778
888777
888999
888777
445555
555667
555886
HR questions (strengths, weaknesses, why flipkart ?, what kind of env. you like for work ? etc.)
Projects (I explained 2 projects from start to end. They asked me challenges and how you dealt
with them etc.)
Multithreading and its examples
After few days, I got an offer :). Thank you so much geeksforgeeks for great help.
It was awesome experience. It totally changed my thought process by solving the programming
problems level by level and with deep understanding of solution for each problem. Many Many
congratulations to the Author.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-set-2-for-sde-1/
Citrix Interview | Set 1
I had my citrix interview on campus. I would like to share my experience.
Written Round:
Section 1: 50 MCQs in 1 hour duration.
There were very basic questions of C, C++, OS, Networking, and Aptitude all mixed.
Section 2: 3 coding question on basic data structures and algorithms. Use of STL wasn’t allowed.
1. Print a ‘Y’ shaped pattern from asterisks in n number of lines.
2. Level-order traversal of k-ary tree. Print all levels line by line.
3. Implement an LRU cache. (Prototypes were there to implement).
Interview Rounds:
After few hours I got an offer :). It was a great experience. Interviewers were
very friendly and they just wanted the logics instead of actual syntax. To crack citrix interview
conceptual knowledge of various computer science subjects like OS, Networking, Algorithms, OOPs
is important. Thanks to geeksfogeeks for providing such a great platform to practice and learn various
concepts.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/citrix-interview-set-1/
Amazon Interview | Set 54 (On Campus for
SDE)
Hi All, I got the following question for the On-Campus placement process. Hopefully it’ll help you
too.
Screening Test
Given an array where all numbers but one occurs in pairs, suggest all ways to find the unique number.
What if the array was sorted? (Code)
Given a 20 GB file and 2GB RAM, how to parse it and detect where to break it, concepts of memory
management
Longest path in a tree with just one bend. May or may not start with from the root. (Complete code)
Thanks a lot to the GeeksforGeeks team again. Appreciate the hard work you guys have put. Also a
big thanks to all the contributors.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-54-on-campus-for-sde/
Yatra.com Interview | Set 1
Recently I had appeared for Yatra Interview. I would like to share my experience.
After few days, I got the offer :D. Thanks to GeeksForGeeks for providing solutions in a very simple
manner which helped me a lot in the preparation. To crack Yatra interview, Data Structures and
Algorithms concepts should be clear. Knowing Java/C++ is a plus point.
Many Many congratulations to the Author. If you like GeeksforGeeks and would like to contribute,
you can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/yatra-com-interview-set-1/
Aptitude Questions :
[Mainly covered on topics like basic probability question, functions, propositional logic, finding
number with help of statement, simple passage, basic permutation]
1. Aptitude means everyone starts with speed and distance, train problems, boats and cisterns, Time
and work but here there was no questions on these topics.
2. Simple questions on conditional probability like
X having 5 chips with 1 defective, Y having 4 chips with 2 defective what is the probability of
selecting 1 defective chip out of 9 chips that to from Y.
3. simple problems on Propositional logic
p->q V p->r how many set of values for this logic gives true value
Ans – 7
4. two set {1,2,3,4} and {4,5} total number of elements in cartestian product of these two sets.
5. If a digit square is divided by half of the number then its quotient is divided by and it is added by
36 then…. you can search questions of this type.
6. Two white ball and 3 red ball in box a, 3 red and 4 white in box b, probability of selecting white
ball from box b.
7. Simple passage questions.
Technical :
Subject – [logic design, computer networks, os, datastructure, algorithms]
1. 12,54,86,78,13 how many swaps you need if you sort this using bubble sort.
2. Which of the following are valid coding schemes
a)Manchester
b)3B/2
c)4B/2B
3. Basic theoritical question on ADC
4. Have a look on ICs like 8241,8251, question was which one comes under this group something like
that
5. ab’c+a’b’c+a’bc+a’bc’ minimize this expression
6. question based on memory mapped i/o definition
7. simple question os synchronization
8. page replacement
9. question on thrashing concept
10. worst case n^2 and best nlogn which sort ? -quick sort
11. networks – which of the following are switch forwarding approach
a) cut through b) store and forward
ans – cut through
12) have a look at switch,hub,router,bridge and osi layer
14) how many hosts u can accomodate in 192.168.1.43/21
15)os – context switch, deadlock
Technical round:
Revise OS, B.Tech or M.Tech projects, data structure,
Program to find substring.
Network questions like DNS, OSI, DHCP
OS – InterProcess communication, Process, Deadlock, Garbage collection, Algorithm – Dijkstra’a
algorithm,
Datastructure – Linked list questions
Tips and books- Gate questions, Data Structure made easy by Narisimha karumanchi, Timothy. J.
williams computer science MCQ.
Many Many congratulations to the Author. If you like GeeksforGeeks and would like to contribute,
you can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/cisco-interview-set-5/
Microsoft Interview | Set 21
Hi, a brief documentation of my Microsoft experience is as follows:
Group Activity:
On the evening before the interview we had a group activity round. We were given to solve one
question on our own, and the other one we had to solve discussing with Microsoft mentor allotted to
you.
Q1. Insert an element in a sorted circular singly linked list. Pointer to any node of the LL will be
given as input
Q2. A matrix m*n is given. If a cell contains 0 (zero) make that row and column zero.
We had to discuss Q2 with Microsoft mentors. Discussion is important and they point out flaws and
ask you to optimize algo.
Interview Round 1:
Q1. Asked me to solve Q2 of group activity without using extra space.
Q2. Given an array of digits, form two numbers from those digits such that sum of those two numbers
are minimum
Q3. Given an array of numbers, find out the minimum distance and print all the pairs with minimum
distance
Interview Round 2:
Q1. Two string S1 and S2 are given, check whether S1 is a shifted version of S2
Interview Round 3:
Q1. Given a set of rectangles of varying length and breadth, find out the maximum height stack you can
form with them such that if rectangle R1 is on top of rectangle R2 then length(R1)
Source
http://www.geeksforgeeks.org/microsoft-interview-set-21/
SAP Labs India | Set 1 (On Campus
Interview)
Hi, A brief documentation of my SAP Labs, India interview is as follows:
Interview Round 1:
Q1. What is I of ACID properties?
Q5. There is a program which inserts and deletes node in a sorted singly linked list. There is a bug in
one of the modules, how would you debug it?
Q6. What are the ways in which fault tolerance can be ensured in systems? (Different redundancy
techniques)
Q7. A pair of redundant systems are operating, how would you ensure that when one of them goes
down, the other one will take over its operation ?
Interview Round 2:
Q1. Implement the malloc() and free() operations. Give the strategy for implementation, no coding.
Q3. A window of size k is sliding from left to right in an array of size n, find the maximum number in
the window at each window position.
HR Round:
Q1. How was the interviews ?
Q4. Tell me an experience of yours in that you didn’t like to do and how you handled it ?
Q5. What are you expecting from the company ?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/sap-labs-india-set-1-on-campus-interview/
Goldman Sachs Interview | Set 2 (On-
Campus for Analyst)
Thanks GeeksForGeeks for helping me prepare for my placements. Here’s my experience.
—————–
My interview experience for Goldman Sachs ( On campus process) ( For analyst position, strategic
division ) :
Written Test:
There was a lengthy written test consisting of objective as well as subjective questions. Preparation
of fundamentals of algorithms and computer science subjects would be good. In addition to that GS
sets lots of questions to check your quantitative ability, so be prepared for that.
Round 1:
There were lot of puzzles( approximately 8-10). To solve the most of the puzzles you need to be good
at probability and number theory. Practicing these kind of puzzles will definitely help, but be
prepared to face fresh and really challenging puzzles. No matter how well you have practiced, they
will give you some puzzles which you never heard before.
Round 2:
My interviewer asked me about my projects and we discussed almost all of them. There were lot of
cross questions based on the discussion. He asked me to design few systems for given problems and
asked few more puzzles. Interviewer was really friendly and this interview went good.
Round 3:
Again the interviewer discussed about the projects and asked two puzzles. This round was shortest of
all four.
Round 4:
This was the longest round and toughest of all four. Interviewer started with one of my project and
soon moved to ask lot of designing questions. He also asked about few of the theories and models of
Mathematics and Machine Learning( I had few projects on Machine Learning). He asked me few
questions on DBMS as well. Then he asked me 3 more puzzles. Then he asked me few simple
questions on algorithms.
All the interview rounds took approximately 40 minutes. All the interviewers at GS were very good
and very helpful, so do consider the hints given by them when you are stuck at any point. To prepare
for GS you have to be good at Mathematics( specially topics like probability and number theory ) and
very strong at your basics in Computer Science. Good Luck.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/goldman-sachs-interview-set-2-on-campus-for-analyst/
Microsoft Interview | Set 22
Hi, PFB my on campus interview experience with Microsoft.
Written Test:
First round was an online test which contains 20 MCQs on C & C++. Based on this test, they
shortlisted some students and the next round was taken. The next round was a coding round which had
two questions:
Q2. Trim all the nodes in a BST which are not in the range of (minValue, maxValue).
The codes were checked on their online compiler with their test cases.
Group Activity:
The night before the day of interview, we had a group activity round. We were given to solve one
question on our own, and the other one we had to solve discussing with Microsoft mentor allotted to
you.
Q1. Insert an element in a sorted circular singly linked list. Pointer to any node of the list (may be
denoted as the head) and pointer to the new node will be given as input. Generate test cases for your
code. Check for all corner cases.
Q2. An MxN matrix is given. If a cell contains 0 (zero) make that row and column zero. We had to
discuss this question with Microsoft mentors. Discussion was important and they pointed out flaws
and ask you to optimize algo (Space complexity).
Interview Round-1:
Q1. After a brief introduction the interviewer asked me to solve the puzzle of 100 bulbs. There are
100 bulbs (initially all switched off). At i-th iteration all the switches of i’s multiple are flipped.
Finally, after 100 such iterations, how many bulbs will be still switched on?? I didn’t know the
solution. The interviewer gave me a hint. Then after doing some maths, I finally gave him the solution
(Perfect squares). Then he asked me to prove it. Somehow, I proved it (I was feeling lucky :P).
Q2. In continuum to the previous question, he asked me to write a function which will take a number
as input and return all of it’s factors. I solved it in O(sqroot(N)). Then he asked me to check whether I
missed any edge case. So, I put a checking for negative numbers. He was happy with it.
Q3. Then he asked me to write the code for DFS traversal of a tree. I asked him about the tree
structure. He told me to write for an N-ary tree. Did it, using a vector (C++) of children pointers.
This time, I didn’t miss a corner case (coz, there was almost none :P). He was happy with it.
Interview Round-2:
Interviewer was very cool and very frank. He went through my CV thoroughly asked me one question
in SQL and two algorithm questions:
Q1. He gave me an Employee table with Id, Name and ManagerId columns in it and then asked me to
write an SQL statement which will output all the manager names who have at least 2 subordinates
under them. I know, it’s very easy :P.
Q2. He asked me to write the code to clone a singly linked list with next and random pointer and told
me not to worry about any space complexity. A fairly easy one. Solved it using a hash.
Q3. In continuum to the previous question, he asked me to rewrite the above code without using any
hash. Did it very quickly :P. He was really happy and chatted with me for a while. I even chewed a
gum after taking his permission. He was very impressed by my handwriting. Yeah you heard me right,
I was feeling lucky :D.
Interview Round-3:
Interviewer was funny and he continuously asked me not shout (though, I really wasn’t in a mood to
shout ;)).
Q1. He asked me to write a function which will connect all the nodes in a binary tree at the same
level. I told him, I knew it and explained it in brief. He was cool and asked me whether I wanted to
have a new question or just write this one. I said, “As you wish”. So he moved on.
Q2. He explained an use case of MS Excel: we can select multiple columns in excel file and drag
them together left or right. He then asked me to write the code to implement the aforementioned
scenario on arrays. The input will be, an array, left and right index of a sub-array (multiple columns)
and a destination index (either in left or right of the sub-array). After scratching for a few moments, I
gave him an O(n) solution with left and right shift using flip method. He was really impressed and
praised my handwriting once again (God is great :)).
Q3. He quickly moved to the last question. A file with numbers from 0-9999999 (each number in a
line) is given. How to sort the content. I gave him a solution with radix sort (as maximum 7 digits are
possible for each number). Then he posed a constraint of very less RAM available. I discussed a
modified external merge sort like algorithm with him. But then he told me to minimize the huge time
taken by external merge sort. Then he gave a hint as “Use bits”. So I told him, to use a 10^7 size
vector (which actually uses one bit for one boolean). He was okay with it.
I am really really grateful to the geeksforgeeks team. How much I say about it, it will definitely be
Many Many congratulations to the author. If you like GeeksforGeeks and would like to contribute,
you can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-set-22/
Amazon Interview | Set 54 (Off-Campus
For SDE-1)
It was a usual interview process by Amazon: 1 written test, 1 telephonic interview and 4 f2f
interviews.
Sometimes they just want efficient algorithm and sometimes just concise and efficient production
level code is required. Mostly both, algorithm and code, are asked for every question.
Interviewers were very friendly. In the first f2f interview, I was extremely nervous and stumbling in
answering the first question itself, the interviewer told me not to worry and to take as much time as I
want. That expression by him made me calm after some time and I was able to solve the question with
ease.
Solutions to some of the problems are provided at the end of the article.
Telephonic Interview:
1. You are given an array of integers. You have to find the index in array from where (sum of left
elements)=(sum of right elements). The elements itself is excluded.
2. Delete a node from an unordered DLL. Algo is quite simple. Clear and concise code was required
to be written.
3. Zigzag traversal of a tree. He asked me if I know this question. I said yes and we moved on to other
question.
4. You are given an array of integers(positive and negative). You have to find if there exists any
sequence of numbers in it which has the sum zero. If there is any print the start index else print -1.
For example: 1 2 3 -1 4 -3 2 is the array and the sequence is -1 4 -3 which returns sum as zero.
Code and algorithm, both were required.
F2F Interview 1:
1. Find the longest even length palindromic substring in a string.
2. The interviewer asked me what are the data structures I know. I told him many of them. He chose
HashMap and asked many detailed questions about it.
F2F Interview 2:
-Tell me about yourself and the work you are doing currently.
1. Write power function. Eg. 2^3=8. Optimize it as much as you can. Simple.
2. Longest path in a Binary tree.
F2F Interview 3:
-Tell me about yourself, your work, strengths and weakness, challenges you have faced in current job,
why Amazon.
1. I don’t remember it exactly, but it was probably : Delete a node with value K from unordered
Circular Link List. Algo is straight forward. Production level working code was required.
2. Make OO design for 2-players game of chess.
3. You have some packages and you have to decide the build order for them.
A package should be built before the packages that depend on it.
For example. A={B,C}, B={D}, C={}, D={E}, E={}, F={}
So one possible build order for package “A” is E, D, B, C, A.
You have to write a function which will take the package name and will return its build order. You
have API which will return you the list of packages on which calling package depends on. For
example, the API will return B and C in a list when you call it providing the parameter as package A.
F2F Interview 4:
-Tell me about your work and challenges you have faced.
1. You are given a binary tree in which every node has left, right and a next pointer. Next pointer is
null initially.
You have to modify the tree in such a way that every node’s next pointer will point to the next node on
the same level.
O(1) space complexity code was required to be written.
Eg.
1 1
2 3 ======> 2----------------->3
4 5 6 4-->5----------------->6
ANSWERS:
Telephonic Interview:
1. It can be a recursive procedure.
For example, for 7 3 1 4 5 6. I can write a procedure like “public int getEqualSumIndex(int index, int
left_sum)”
I can call it recursively like this: int right_sum=getEqualSumIndex(index++, left_sum+arr[index])
Can have return sum like this: right_sum+arr[index];
I can compare the sum like this: left_sum==right_sum
The code is very easy to write.
4. I came up with this algo: Start from left and get sum_till_now by adding the current element. Store
the sum_till_now and current index in a HashMap.
If a sum value is repeated, then there must be a sequence in the array which is giving the sum zero.
(repeated sum value’s corresponding index)+1 will be index of the start of the sequece summing up to
zero.
F2F 1:
1. Initially I thought it was a DP problem due to its resemblance with the problem “longest
palindromic substring” and tried to modify that DP solution. But since it is an O(n^2) space
complexity solution, I was told to do it in O(1) space. After some time I came up with a simple
iterative solution. Find two same characters in the string and then expand its left and right as much as
possible. It is an O(n^2) time solution. I coded the same.
F2F 2:
2.http://www.geeksforgeeks.org/diameter-of-a-binary-tree/
F2F 3:
3. If you can relate it to a graph, it is actually topological sorting. Though I didn’t remember the name
of the sort at that time, I explained him the concept, and how we can modify DFS to get the build
order. I coded the same. He told me the name of algo afterwards.
http://www.geeksforgeeks.org/topological-sorting/
After two days I got the call that I have been selected.
Many Many congratulations to the author. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-54-off-campus-for-sde-1/
Amazon Interview | Set 55 (On-Campus)
Online Test on InterviewStreet:
18 MCQs (Normal C loop questions, networking, dbms, os, analytical)
2 Coding questions
1. Check if an undirected graph is a tree or not.
2. Given an array of integers, print the 2 elements with least absolute difference.
Interview Rounds:-
Round 1:
Tell me about yourself.
1. Given a matrix(not necessarily square) in which the elements in a row, as well in a column are
sorted. Find a given integer in the matrix.
Tell the approach. And then code.
2. Given a position where a knight is placed on an nXn chessboard. Find the maximum number of
knights that can be placed on the board, so that no 2 knights attack each other.
Remember that you need to just give the number of knights, not all their positions. I first could arrange
ceil(n*n/3) knights. Then he asked me find a better solution. Finally I got to ceil(n*n/2). Then he
asked me to code it. Then he asked me to remove the ceil condition(check for even and odd
separately).
He asked me if I had some question for him. I asked – Amazon strives to be the most costumer centric
company on earth. What, as a programmer/developer, do you do to achieve this, because generally,
the customer’s problems are an issue for high level managers and planners.
Round 2:
Started with some questions from my Intern project.
1. Given a Binary Tree, replace the data of each node by the sum of data of all its descendent nodes.
(Leaf nodes will have 0)
2. Given a sorted array of positive integers, find the least missing positive integer. First I gave an
O(n) solution. Then he asked me to optimize it. Finally I gave an O(log n) solution.
3. Given a stream of numbers, find k random numbers from them. I explained him Reservoir Sampling
approach. He asked why this approach works. What is the probability of each number being selected?
What is the probability of any number being selected if stream has less than k numbers(its 1).
He asked me if I had some question. I said I had one, but I already asked it to previos interviewer. He
asked me if I got a satisfactory answer to it. I said the answer was very much satisfactory.
While you are answering a question, clarify any doubts that come to you mind. Dont take any
assumptions by yourself at all.
Keep on speaking your approach as you think. Keep speaking, if possible, even when you write code.
They want to test if you really know the approach, and not just copying code. All rounds were
technical and elimination. The last round has the highest weightage in their procedure. Write clean
code, ask for some time if you want.
Thanks a lot to the GeeksForGeeks team for helping with interview preparations!
Many Many congratulations to the author. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-55-on-campus/
Arista Network Interview | Set 1
Round 1 : Technical Interview
Question 1: Given a sorted doubly link list and two numbers C and K. You need to decrease the info
of node with data K by C and insert the new node formed at its correct position such that the list
remains sorted.
Complete working code with test cases was required .
Question 2: Given a binary tree , and two values a and b, find the shortest length between the nodes
with info a and b.
Question 3: Basics of synchronization , test and set, locks, mutex. (wrote a code and kept on adding
constraints ,asked if code would work in mutiprocessor, uniprocessor, multithreaded system).
Eg. 1 )
int main(int argc , char *argv[])
{
printf("%c",**++argv);
}
Eg. 2)
int *x[N];
x=(int(*)[N])malloc(M*sizeof(*x));
printf("%d %d",sizeof(x),sizeof(*x));
Eg 5) 10000 students are there and each student has one bit
data. how can you modify his data in O(1) time .
Eg 7) http://www.geeksforgeeks.org/struct-hack/
Basic HR questions
Round 3 : Technical Interview
Question 1 : Given a large file which contains m rows and n columns. Given a column no, sort the
column in such a way that corresponding rows also sorted.
Question 2 : Suggest a way to search in sorted link list in better then O(n) time . ( Skip lists )
Question 4 : Find the mean and median of the elements such that elements are dynamically added at
runtime( only approach).
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/arista-network-interview-set-1/
Microsoft Interview | Set 23
Written Test: First round was an online test on cocubes platform (not good for coding). This test is
based on C, C++ and DS. The shortlisted students in this round were selected for next round which is
coding round. Coding round had two questions:
1) In a Tic-Tac-Toe game two players are playing where player 0 is denoted as 0 and player 1 is
denoted as 1. Given a linked list of moves made by the players ,determine who is the winner and in
how many moves he required for winning.
Struct Move {
int p; //Player number
int x; //x and y pos in the tic-tac-toi
int y;
struct Move *next;
};
2) Given an array if in a position let a[i][j] =1 then print all it’s row and column 1. You should not
consider a position 1 after you made it 1 in your past computation.
Note: In this question it is asked to not use any extra space.
sample(input):
(i) 00100 (ii)10
00000 01
output:
(i) 11111 (ii)11
00100 11
Group Fly/Activity:
On the day of interview just before couple of hours we had a group fly in which we will be given two
simple questions. We need to discuss our approach with our mentor.
The questions in this round will generally be pretty simple but an error free(handling all boundary
cases) and completely optimized code is expected. Without this, it is very difficult make to next
round.Test cases were asked for each and every question below. It is important for you to cover
majority of the cases.
Interview Round-1:
1) Interviewer asked me to optimize the code for the question 2 in previous round (Not in terms of
complexity but in terms of number of assembly instructions, time taken to execute each instruction)
2) Some simple questions based on LL. Sorry I couldnt recollect
Interview Round-2:
Here I had only one question.
a) data
b) next_ptr
c) prev_ptr
can be used to represent doubly linked list, binary tree or none. Given a random pointer recognize
whether it forms DLL, Binary Tree or none. I pointed out that for Binary tree root node has to be
given then he asked me to assume the same.
Keep on discussing your approach with the interviewer, they will generally guide you to the solution.
Interivew Round-3:
My performance in round2 was a bit shaky and this round was a kind of eliminator.
1) 2 numbers each reperesented by linked lists, write a function which gives difference of these
numbers.
2) Consider a webpage which has a big single image and another page in which the previous image is
divided into 6 parts, which one loads faster?
Now propose a solution reducing the loading time.(There are no bounds for this question to think, I
proposed a solution which includes concepts from vision, networks and multimedia. The interviewer
was very much impressed and immediately told me that I am going to have a next round)
Interview Round-4:
Here I had 5-6 questions. I didnt remember all the questions but you should be able to do it if you
follow GeeksForGeeks.
2) Given two sorted arrays. Second array has enough extra space to accommodate elements in first
array. Give the resulting sorted array obtained by merging two arrays without using extra space.
3) Consider a binary tree for which root node and a target node are given to you. Give the next sibling
of the target.(let the target be in level k, then you need to give the immediate node which is in level k)
Other questions were based on arrays, linked lists and binary trees (mixture of these).
All the interviewers were very cool, helpful etc etc… They understand our tension and try to make us
feel as comfortable as possible. The first interviewer even put his arm over my shoulder during our
little walk from canteen to interview room.
Many Many congratulations to the author. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-set-23/
Oracle Interview | Set 3 (On-Campus)
My on campus interview experience of Oracle Server Technology.
Online Round:
At first we had an online exam for shortlisting for final interview process. This round had almost
everything from English to Puzzles. Basic computer engineering concepts to advanced computer
engineering concepts.
Interview Rounds:
First Round:
At first the interviewer asked me to rate myself in C/C++ skills out of 5. And 4.5 was my answer. As
he was impressed by my answer, he asked me to write bug free codes for following problems in C
1. Iterative post order traversal of a binary tree. (I gave him the answer with 2 stacks).
2. You are given a Single Linked List containing integer key as data in every node and a head pointer
pointing to the first node, you have to delete a node with a given key, you can’t create any new
variable. (Copy data of next node to the node which contains k and delete next node).
3. You are given an integer array of size n containing elements in the range 0 to n-1. Now count the
frequency of all elements.
Second Round:
Interview was started with the introduction, after the introduction he gave me some tips on how to
give introduction by highlighting my interests and achievements so far.
The he said he is going to ask me just one question on some topics, If I succeed then he will move to
the next topic. The question was::
1. You are given a square matrix containing 0 or 1 in every cell. Find if all 0’s or 1’s make a perfect
square. I asked for some clarification on this question, then he said listen and understand at once, then
he simply repeated the question and gave me 5 min to come up with an algorithm and left the room.
He came after 5 min and I gave him the DP solution for finding max size square made by both 0’s and
1’s and in 2nd run I checked if there are 0’s or 1’s which are not part of those max squares. He was
satisfied but he actually wanted a recursive solution.
2. Now the next topic was database. He gave me 2 tables and asked me to write outer join query.
3. Now in operating systems he asked me to draw process state diagram, I made a little mistake so he
asked me to draw PCB, then why we need separate queue for both burst and I/O processes and finally
how process queues are managed in multi core processor.
Third Round:
This round was puzzle round. I was given to solve 3 puzzles one after another after I solve the
previous one. Puzzles were very simple math problems like::
1. There are 8 members in family. 10 years ago the total age of all members was ‘x’, after 3 years a
member of age 60 died and a new child is born. Again after 3 year a member of age 60 died and a
new child born. Find the current average of age of all members in terms of ‘x’.
2. Three cars A, B and C move with constant speed of 40, 60 and 120 kmph respectively. B starts 2
hours after A. Now A, B and C meet each other at same time. Find how many hours later C started
from A.
3. In a exam there are 50 questions. +1 for correct, -1/3 for incorrect and -1/6 for unattempting.
Shyam scored 32 in that exam. Find the minimum number of questions he must have done wrong.
HR Round:
She gone through my CV, read each and every line. Then asked me to briefly explain my projects and
the work I did during my internship. Then she asked about location preference and preferred joining
date. After that I asked her 2-3 questions about company.
At the end of the slot I got the offer :). It was a great experience for me. Interviewers were very
friendly except for 2nd round :P. To crack Oracle interview conceptual knowledge of various
computer science subjects like OS, Networking (because of my project), Algorithms and Database is
important. Thanks to geeksfogeeks for providing such a great platform to practice and learn various
concepts.
Many Many congratulations to the author. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/oracle-interview-set-3-campus/
Microsoft Interview | Set 24
Hello everyone, I recently got selected for the internship at Microsoft IDC. GeeksForGeeks helped
me a lot in preparing for the coding tests as well as for interviews. The positions that they were
interviewing for were SDE and SDET(Testing).
I would like to thank GeeksForGeeks for mainting a high quality problem set for coding tests and
interviews.
Many Many congratulations to the author. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-set-24/
D E Shaw Interview | Set 3
Round 1 : (Telephonic Interview) (45 mins)
3. Polymorphism – Static and dynamic. why the name is static and dynamic.Again With Examples.
Answer: Yes, it’s a valid operation. We can do add/delete. The only constraint is that we can’t make
list to point to other ArrayList objects. e.g, we can’t do list = list1.
6. How would you get total number of words in a file (In Unix).
7. Given two strings .. you need to tell whether they are permutation of each other. Various
approaches and their complexities.
8. Given a string. You need to print first non-repeating char. I told him we would use count array,
count[256].
Counter question: How would you reduce space complexity. I told him we could use Hash table. In
that, we would only be needing spaces equal to number of different characters.
9. 200 storey building..One egg given (Yes, only one egg)… find from which level egg would break
in number of attempts less than 200. (Still haven’t got any answer for this :D)
10. Four numbers are given: 1 3 4 6 = 24. Use any mathematical operators. I asked him can i write
this expression in C and run it from there to get required result. He said yeah you can.
Then i took 4 integer variables(1,3,4,6) and another integer variable result. Now, 1/3 = 0 (C integer
division). so simply 4*6 would give me 24. Pretty simple :D. He said it’s okay, but try with
mathematical operators only. (No coding :D)
Answer: (1^3) * (4*6) = 24
Code: (It was to be sent through email)
11. Write well commented code to print Matrix in Spiral Order . Also write some test cases.
———————————————————————-
1. Discussions on Various basic concepts like What makes Java Platform Independent language, Why
C is Platform dependent, difference between JDK, JRE and JVM, What’s a byte code (In Java) and
discussion went on like this.
2. What’s a function pointer ? Where it’s used. Write a code to implement the same.
3. Is it possible to have try-finally block without catch block ? And several other similar discussions
on Exception Handling.
4. What’s a Process ? What are various sorts of Process Scheduling Algorithms. Design a data
structure which can be efficiently used to schedule processes based on their priorities. Further they
added that Priorities of some processes can change any time and we should be able to pick that
process which is having maximum priority (Min Heap concept). Also there can be many processes of
same priority. Some discussions on approaches.
5. What’s difference between extends and implements ? Some discussions on Abstract class and
Interface.
6. Why Java does NOT support Multiple Inheritance ? How we solve Diamond Ring Problem in C++
(Virtual Inheritance). How to access a specific function from a class in case of multiple inheritance ?
(Ans: Using scope resolution operator)
7. What’s the difference between #define MAX 30 and const int max = 30.
8. What is ‘register’ storage class ? If we have declared any variable register and there is no free
registers available, what will happen ? Will compiler throw any sort of errors/warnings ?
9. In C, Where can we find definition of printf(). Some discussions on header files and Process
execution steps (like preprocessing, compilation, loading, linking etc).
5
/ \
3 6
/ \ / \
1 7 2 4
Though I did not get the offer, it was a great experience. If you want to crack DE Shaw, do have a
clear concepts of whatever technology you are working on. For preparing Java/C++, refer
http://javarevisited.blogspot.in/& http://www.learncpp.com/.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/d-e-shaw-interview-set-3/
Oracle Interview | Set 4 (On-Campus)
Pattern: written + 3 Tech Interview + 1HR
Type: Online
cgpa criteria: NO
Tips:
Try to get the oracle Questions from the other IIT’s or NIT’s , because it repeats the same.By the time
IITD starts written’s almost all NIT’s placements get completed.
Round 1: (1hr)
1. asked algorithm of Towers of Hanoi problem with 3 piles.
2. Now he changed the no. of piles to 4 for the above question.
3. Discussed the time complexity and analysis of the above algorithm.
4. gave DESIGN question “suppose if there is traffic management system database ,then if it goes into
the deadlock, what happens and design such system such that it resolves many problems “.No clear
information was given and it’s vague. So i explained it by using distributed system concepts. He was
impressed.
5. Given an array of n integers(consider +ve and also -ve) ,find an sub array such that sum of that
array s maximum.
6. aptitude: Two poles each of length 15 m are at distance d. A rope of length of 16 m is tied from the
top one pole to the other. Distance between lowest point of rope and ground is 7 m. Find distance d
7. He asked me whether i know chess or not because he wanna frame a question on it. I said “NO :-p”
then he skipped it.(but i know how to play chess)
8. Advantages of C language over C++ (really tough one ,as he was expecting 10 points)
9. Multi Threading , Multi Process and Context switching concepts(in depth)
10. code of Level Order traversal of binary tree and nary tree
11. Some silly Questions.
12. Major Project
Source: http://amarnath-iitd-placement-experience.blogspot.in/
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/oracle-interview-set-4-campus/
DELL Interview | Set 1 (On-Campus)
Pattern : written + 2TECH + 1 HR(But for me 1Tech + 2HR)
Type : Online
Cgpa criteria : NO
Written Exam Modules : 60 questions 70 min (no -ve marking) Aptitude questions were time taking,
OS, Data structure, Database and Computer Networks
Tips:
Try to read gate material from geeksforgeeks. many of the questions and concepts are from it.
Shortlisting Information :
If you can answer at least 40 questions, you’ll get shortlisted. They shortlisted 15 candidates for
interviews and also they called 8-10 waiting list candidates for interviews.
My Interview Experience:
Round 1 : (35 min)
1. code of Inorder recursive and non recursive
2. Questions on sorting like best algorithm if u consider (no. of swaps, no. of comparisons etc)
3. Sorting words in a large file.
4. T9 Dictionary(most important question of many companies).
5. Insertion sort code (they look for each every corner cases,so better check ur code with all types of
test cases and then ask the interviewer to review it )
6. course projects.
By that time, those guys(DELL interviewers) have decided to take only 10 members and they already
have the count and they were calling the selected candidates and congratulating them and for my
friend they have specified the field and under whom he would be working. As the count have been
reached, those guys are not interested in me, they would like to take my interview just for formal. I
understood the scenario and i should create an special impression about me to get selected and
increase their count.
Basic HR questions
1. Tell me about yourself
2. +ve’s and -ve’s
3. Explanation of Course Projects(discussion oriented went for 20 min)
4. Show me an example that you are good at team work.
5. course projects
6. Finally he asked me to say about DELL as much as i know?
But really speaking, I don’t know anything more about the company information.But i said only one
sentence
“DELL, The main weapon of most of the Computer Science students over here and every where.”
By that one sentence he was impressed more and he gave me one best complement.
“You have good narrating and management skills. You can be recruited into HR management and can
come to you campus again next year to recruit your juniors”. It was an awesome feeling when he said
that sentence.
Round 3: (5 min)
I said that I was placed in INTEL and want to join INTEL. He said he was impressed with my
frankness and ended the interview over there.
Source: http://amarnath-iitd-placement-experience.blogspot.in/2013/12/dell-interview-experience-
2013.html
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/dell-interview-set-1-campus/
Microsoft Interview | Set 25 (On-campus
for Internship)
Microsoft IDC Internship Selection Process
Hi everyone! I sat for Microsoft IDC Internship Selection Process. The whole process comprised of 6
rounds as follows:
Round 1
This round was taken on-campus and it included 15 aptitude questions containing mostly problems
related to general programming in C. The round was hosted on CoCubes.com. 46 students were
shortlisted from around 150 students.
Round 2
This round was also taken on-campus and hosted by CoCubes.com. We were given to solve two
coding problems on an online judge. The questions were:
1. To check a tree is BST or not.
2. Change one string to another with minimum number of changes (Sorry! I don’t remember the exact
one).
22 students were shortlisted from this round.
Round 3 (Telephonic)
The interviewer started with the introduction and went on asking questions from my resume. You must
prepare your resume well and go through it thoroughly. Then after asking questions from my resume
for around 20 minutes he asked a coding question. The question was:
Given a series of numbers, print which number is repeated how many times?
I gave brute force solution first by using arrays. Then he asked if we have million of numbers and
negative numbers as well then which data structure will be used. I said hash table. He asked certain
questions on hashing. Then he said if don’t care about time complexity and want to find in-place
solution then what will be another method. I said first sort it and then count.
He appeared to be impressed and I was selected for the 4th round. From our institute 9 students were
shortlisted for the next round. For next rounds students from all over the country were called to Delhi
and Bangalore. I was called to Delhi.
Round 4
There were around 60 students. They were divided into two groups of 30 each. I was in the latter
group of 30. We were given two coding questions to be solved on paper. The questions were:
1. Compress a string in-place.
2. Define BST. Check a tree is BST or not.
A total of 5 students from us were selected and I was lucky enough to be one of them. 10 students
were selected from the former group of 30 students.
I was not lucky enough to clear this round but it was a motivating experience.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-set-25-on-campus-for-internship/
Coming out to my interview experience with Cisco systems,my first round was mostly on computer
networks fundamentals such as sub netting,super netting and on some network protocols like Go-
back-N etc.,
Second round was also in networking but this time there was some in depth questions mostly
pertaining to why layers and what are their advantages, explain dhcp in detail etc.,
and my last round was some coding questions which were mostly from GeeksforGeeks – A computer
science portal for geeks
Many Many congratulations to the Author. If you like GeeksforGeeks and would like to contribute,
you can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/cisco-interview-set-6/
-> Given a binary tree, where every node value is a Digit from 1-9 .Find the sum of all the numbers
which are formed from root to leaf paths . (Algo + Code )
6
/ \
3 5
/ \ \
2 5 4
\ /
7 4
There are 4 leafs, hence 4 root to leaf paths:
Path Number
6->3->2 632
6->3->5->7 6357
6->3->5->4 6354
6->5>4 654
Answer = 632 + 6375 + 6354 + 654 = 13997
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-56-campus/
Amazon Interview | Set 57 (Off-Campus for
SDE-1)
Hi geeks, I recently hired for amazon. I just want to share my Interview experience with You all.
Written round:
Q1: Convert a sorted integer Array to balanced binary search tree. This is very simple one and I
could do it in O(n) time and O(1)extra space.
Q2: Write a Program to reverse every k nodes of singly linked list without using extra space.
Constraint: k>=2
F2F round 1:
Q1: Find the largest element in the sorted rotated integer array in o(log n) time.
Q2: Find Height of a Binary Tree. This is very easy question, so I did quickly.then he move on to next
one.
Q3: Find your own method to balance an unbalanced binary tree.(you must not use existing methods
like AVL, red black or b trees).
Hint: There is no restriction on placing nodes. You can remove any node from any place and put it in
any place.
I devised an algorithm which will make use of two lists. One list contains nodes far away from the
root and this is sorted in decreasing order of levels and left to right if nodes are in same level. Other
list contains nodes which are not fully filled. This is sorted increasing order of levels and left to right
if nodes are in same level .
Remove the first node (listed in list1) and insert as a child of first node in list2.add this node also in
list 2. Do this operation until the height of the tree becomes log(n). Interviewer was impressed with
this and finished the interview.
F2F round 2:
Q1: There is a file which contains N words. There may be M anagrams in that file, K words on each
anagrams. K>=1, M>=1, N>=1. You need to write an algorithm which will create one list for each
anagram with k words and group all M lists with one data structure (This is the main area.we need to
think a data structure which will minimize the space and time complexity of word Finding appropriate
List and Inserting word).
I could do the insertion in O(1) time by keeping track of tail pointer in each list. But finding the
appropriate list needs o(n) in case of linked list, o(log(n)) in case of binary search tree. Using hash
table, you can do this in o(1), but writing a hash function is difficult and inefficient in terms of time.
Then I suggested Trie data structure.with this, we can reduce the time complexity well. But space
complexity will be more. I told all the ideas to interviewer. They were much satisfied with this. And
moved to next question(without writing code J)
Geeks for geeks is my Wikipedia for interview preparations. Thanks to geeks for geeks.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-57/
Amazon Interview | Set 58 (On-campus for
Software Development Engineer)
I’m in E&CE and I’m sharing my interview experience with Amazon on IIT campus to help you
prepare for your interviews. There was online test for 300 students. 25 were selected for interviews.
There were 4 back-to-back rounds on the same day. My interview process lasted for around 5 hours
Round 1:
1. Given 1 billion integers. Find 100 maximum integers. Memory available is insufficient to store 1
billion integers.
2. Given array of N integers ranging from 0 to N-1. Output maximum repeating integer. Use only O(1)
memory.
Round 2:
1. An array of integers is given such that it is first ascending and then descending. Find index of some
given integer in that array. Ex. 2,4,6,8,7,5,4,3. Input: 4. Output: 2, 7. Write code on paper.
2. Two sorted arrays are given. Find median when both arrays are merged and sorted. Write pseudo
code on paper. Take care of boundary conditions.
Round 3:
Basic OS, DB concepts.
1. You are given some integers. Propose a data structure to implement “add”, “delete”, “fetch” and
“fetch any” operations. All four operations must complete in constant time.
2. There is a B-tree with two type of nodes A and B. Return nth A or nth B while doing inorder
traversal in O(1) time. And write pseudo code on paper.
Solution:
Round 1:
1. Make min heap of first 100 elements. For each remaining elements, if it is greater than root (min)
node then remove root node, add that element then heapify. Time = 1 billion * log(100)
2. Simple. For i = 0 to N-1, A[A[i]%N] += N. Return i with max A[i]. O(n) time.
Round 2:
1. Find pivot point. O(log n) Binary search in both left and right arrays. O(log n)
2. Compare median of both arrays. Accordingly select right half or left half array. Repeat. O(log n)
Round 3:
1. Make a hash table and a linked list. When you add an element add it in both hash table and linked
list. But in hash table along value caralso store pointer to the same value in linked list. To delete an
element find it in hash table, use stored pointer to delete the same element from linked list also. For
fetch any operation return head node of linked list. Memory = 2*N
2. Preprocess in O(n) time: Make two vectors for A and B. Traverse in-order. When you get A add its
pointer in vector of A. Same for B.
Round 4:
Read whole column. Heap sort (saves memory). Now you know old indices and new indices. Shift
entire rows from old index to new index. Keep one row in temp storage to avoid overwriting.
Many Many congratulations to the author. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-58-campus-software-development-engineer/
Amazon Interview | Set 59 (Off-campus for
SDE-1)
I recently went through the Amazon interview process for the post of SDE-1. It was an amazing
experience for me.
Q2- Program to convert a binary search tree into doubly linked list.
Q3- Program to find a node which is just greater than a given node in a tree.
Q4 –Given a sentence. Find all the characters which are repeated more than 1 time and print them in
lexicographical order.
Q- Implement the cache using LRU technique. Production working code was required.
Q- Given two sorted arrays. Find the median of the combined array.
One thing that you need to keep in mind is that you need to provide them the optimized solution with
respect to time and space and don’t forget to consider the corner cases.
Many Many congratulations to the author. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-59-campus-sde-1/
Flipkart Interview | Set 3
Recently I appeared for Flipkart Interview. I would like to share my experience.
2. Design a stack which holds an integer value such that getMinimum() function should return the
minimum element in the stack.
FOLLOW UP: Implement popMin() function which would pop minimum element from the original
stack. O(1) implementation was required.(Hint: Use LinkedList to implement stack and store address
of minimum element node in min-stack)
Gurinder->Naveen
Naveen->Satish
Satish->Anushree,Sandeep
Anushree->
Sandeep->
After these two rounds, I was called for Face-2-Face discussions in Bangalore. There I had 4 rounds.
After I wrote running code for the same, I was told to explain my code and then run with some test
cases. Then he asked me to mail the code.
2. This was an interesting problem. Given a set of intervals like 5-10, 15-20, 25-40, 30-45, 50-100.
Find the ith smallest number in these intervals.
Assume there are no duplicate numbers.
I told him that we would first sort the interval on basis of starting numbers. Then merge overlapping
intervals to get a set of non-overlapping intervals like 5-10, 15-20, 25-45, 50-100. Now we can find
the ith smallest number after finding the appropriate interval.
FOLLOW UP: He then modified this question to accomodate duplicate numbers also.
3. Given a dictionary of 50,000 words. Given a phrase without spaces, add spaces to make it a
proper sentence.
e.g:input: thequickbrownfoxjumpoverlazydog
output: the quick brown fox jump over lazy dog
FOLLOW UP Questions:
1) Worst case complexity of finding a word in HASHMAP given we have ‘B’ buckets and total of
50,000 words. ( Ans: O(50,000/B) )
2) Complexity of finding a word in TRIE. (Ans: O(Word Length) )
3) Advantages of TRIE over HASHMAP and some similar discussions.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-set-3/
Amazon Interview | Set 60 (For Internship)
Believe me or not before I faced an Amazon interview round I was never sure whether all those
gratitude that people usually present to GeeksforGeeks were actually worth. But it is always easier to
connect the dots looking backwards and now I can say with assurance that this website really
deserves all the applause.
I was recently interviewed for an internship position at Amazon and had to go through a total of 3
rounds i.e. one online followed by two telephonic rounds.
Online Round
As usual the online round had two coding questions and 20 MCQs. This was a pretty easy round and
it’s duration was 90 minutes. The round consisted of questions from various domains like Algorithm,
Data Structure, Operating System and Aptitude.
A few days after appearing in this round, I was informed that I have been qualified for the next round.
This round lasted for almost 60 minutes. It began with my general introduction followed by a brief
discussion on my projects. After this, the interviewer asked me four questions.
Question 1:
Given an array of numbers find all such triplets that satisfy the given condition.
At first go I thought that it was a pretty easy question but slowly the mist started to clear and I realized
how tough it was. The interviewer wanted me to solve it in linear time i.e. O(N)
Question 2:
Given two trees check if they are mirror images of each other or not.
This was a straight forward question and it took me less than 10 minutes to code it.
Now the interviewer wanted to test my understanding of operating systems and asked two fairly direct
questions, to which I gave my answer based on my understanding (not bookish definition as I did not
remember any of those ).
Question 3 & 4:
What is semaphore and what do you mean by a deadlock.
After two days I got a call from the HR informing me I have been selected for the next round. Now it
was the time for the last and the decisive round.
Second Telephonic Round
For this round I had slightly more time than the last, due to the fact that the weekend fell in
between.The interviewer was very very cool and helping this time, something which I kept at the last
in my list of probable things that can happen during an interview. Duration of this round was around
90 minutes.
This time I had to face three technical questions and one general question on Amazon.
Question 1:
Given a BST, replace each node with the sum of the values of all the nodes that are greater than that
node. Only constraint being that I was not allowed to use any global or static variable.
Although I panicked a bit and made few mistakes, I got through.
Question 2:
Given an array of numbers find the maximum count of duplets and triplets such that there sum is a
multiple of three. Number that has appeared once can’t be included anywhere else.
I solved this question using a property of modulus.
Question 3:
Given the stock prices of 10 days find the best possible buy sell pair.
For this question I started with a O(N2) solution but then finally managed to reduce it to O(N) solution
with constant space complexity.
I was also asked few questions on Amazon like what are domains in which Amazon deals.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-60-internship/
Amazon Interview | Set 61 (For Internship)
Hello geeks, Last month I appeared for the Internship Interview of Amazon.
What my personal experience says is that never try to jump to the right solution straight-away, instead
take your time and think progressively about the possible solution to the given problem.
Check for boundary test-cases carefully and also don’t remain completely blank during your
conversation with interviewer but keep on telling him about the tentative solutions that are coming to
your mind.
1. Online Round.
2. 1st Telephonic Interview
3. 2nd Telephonic Interview
Round 1:
It was an online round consisting of 20 Multiple Choice Questions (from C language, Operating
Systems, Data Structures and Algorithms and Software Development Concepts) and 2 Coding
Questions:
1. Given 2 linked lists constructed another linked list containing the sum of those 2 linked lists. e.g
Given : 1 -> 2 -> 3 and 4 -> 5 -> 6 Ans: 5 -> 7 -> 9
Round 2 (Telephonic):
The duration of telephonic Conversation was about 60 minutes and the Interviewer asked me 2 coding
questions:
1. Given an array of +ve as well as -ve numbers, find out whether it is possible or not to convert it to
0 by adding/subtracting operations on all the elements.
e.g arr[]={1,2,3}
YES (1+2-3)
arr[]={3,6,2}
3+6-2 != 0
3-6-2 !=0
-3-6-2 !=0
-3-6+2 !=0
-3+6-2 !=0
-3+6+2 !=0
3-6+2 !=0
3+6+2 !=0
Hence ans= NO
2. Given a binary Tree where the structure of each node contains an extra “next” pointer (initially all
NULL), modify the binary tree such that all the nodes at the same level gets connected by utilizing
these given extra pointers.
The interviewer also asked me to write the code for the same.
Round 2 (Telephonic):
The duration of telephonic Conversation was about 90 minutes and the Interviewer asked me 2 coding
questions:
2. Given a number design the algorithm to find the next greater number which contains exactly same
digits. e.g. n= 123 next greater with same digits = 132
The number can be very large so its better to consider it as a sequence of characters.
I had a very great time preparing for the interview and got to learn a lot of new concepts.
I am really very thankful to GeeksForGeeks for being the primary source of my preparation and
believe me guys this website is just awesome.
And ya forgot to mention I finally got the confirmed offer for Internship at Amazon
Many Many congratulations to the author. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-61-internship/
Amazon Interview | Set 62 (For SDE-1)
I recently went through the Amazon interview process for the post of SDE-1.
Round 1 (Written)
1. Given an array, output an array where every index conains nearest greatest element to that element
on right side.
2. Program to convert sorted array to Binary Search Tree
3. Find first non-repeating character in String
ex: geeksforgeeks: f
geeksforgeeksFirst:o
Round 2 (F2F)
1. Given linked list as a-x-b-y-c-z
output it as a-b-c-z-y-x
that is reverse alternate element and append to end of list
2. Output nearest number greater than given number such that output is palindrome
ex: 121:131
900:909
99:101
Round 3 (F2F)
1. Vertical Sum in Tree( I told him I know the solution, he proceeded further)
2. Given stream of Strings find top 5 words with maximum frequency or count
3. Given 2 nodes in Binary Tree find distance between them
Round 6 (F2F)
1. HR questions (Why leaving company, projects, SWOT)
2. Program to check for mirror tree
3. Data Structure so that push, pop, getmin, getmax O(1) (using 3 stacks)
4. Data Structure so that push, pop, pop min, pop max
Told Solution till O(logn) by using min heap, max heap with pointers to doubly linked list nodes
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-62-for-sde-1/
Amazon Interview | Set 63 (For SDE-1)
I have a total experience of two years. I am sharing my interview experience with Amazon. This is for
SDE1 Amazon.
A very big thanks to whole team of geeks for geeks. It is because of them only that I was able to make
Amazon and get a job in my dream company. Otherwise it was impossible for me.
Given coin array and a sum K, find min. number of required coin to make sum K. (DP Question)
Two rectangles are given in two D space. Find if these are overlapping or not
KMP for pattern searching
After two days I got the call to come Amazon Bangalore ofc to attend next rounds:
1st Round:
Given two string remove the characters of one string from another string
o Another variation he asked: Given two string remove the characters of one string(having
duplicate characters) from another string
o One more variation he asked: Given two string remove the characters of one string(having
duplicate characters) from another string from right to left.
Given one string, print all the anagrams of this string from a given file which contains lots of
strings.
o Another variation of this he asked: Given group of string, print all the anagrams of all given
string from the file of strings.
Many Many congratulations to the author. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-63-sde-1/
Open Solutions Interview | Set 1
Name of Company: Open Solutions
Profile: Software/Finance
Venue: On Campus
No negative marking
Technical Interview:
1. Tell me about yourself: start with your place of birth, school, college, then move on to the projects
you have done, basically they want to listen about your projects.
2. Asked several questions from one of my projects. Told me to draw the priority graph related to my
project. So be prepared for tough questions from projects.
3. Given a link list, sort it by using Quick Sort: he want to see my approach, then I also explained that
it can be done easily by merge sort, also write the code for it. (Given in Geeksforgeeks.org)
4. Given a string, reverse it using stack: easy question, but he want me to care boundary case. Then I
gave many solutions for this question, one by simply using stack, then by using recursion.
HR cum Technical Round (Taken by the VP of Open Solutions, he was from the US office)
2. One of my projects was Compile time task scheduling for heterogeneous system, so he asked some
real good questions of scheduling related to my project. Many tough questions from project.
3. Given a pointer *p address is 1030 and there is a class whose size is 40 byte, so what will be the
address of *p+1.
4. You have a 100GB disk filled with integers (in records whose size was given, so there was some
free space left). You have 100 MB of memory. Come up with an algorithm to sort those integers.
Solution: apply concept of external sorting. Divide the whole list into several small array which can
be done in 100MB RAM. All this arrays are sorted separately. Then we apply multiarray merge
function and we will get the resulting list.
5. Asked about various OOP concepts. Why polymorphism? Why OOP? Why C++ why not C? How
to do polymorphism in C? several other questions on OOP.
6. Puzzle : you and your friend are going in car from Varanasi to Delhi, after covering 100KM your
friend does not feel well, he need immediate doctor. Your car stops and not starts again, engine fails,
you try but can’t repair it. Mobile phone is not working. If you ask for lift they do not stop. If you
stand in the middle of road then they will kill you but not stop. Think what will you do to save your
friend.
7. One question from their product, he explained all details, then ask to optimize it.
Tips / Advice: Don’t feel nervous, be confident, they will check even your answer is right.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/open-solutions-campus-interview-set-1/
IBM IRL Interview | Set 1
Following are the details of IBM IRL Interview.
Technical Interview 1:
3. Asked Vertex cover problem. I explained the brute force method. But don’t know better solution.
2. Again asked about vertex cover problem. This is NP hard problem. So no exact solutions exist, but
approximation algorithm can be applied. We have to first find the maximal matching edges, then we
will put all this pair in the list, remove one by one and check whether by removal of this it is vertex
cover or not. For details see Wikipedia for vertex cover.
3. Many questions related to process scheduling. I explained all the scheduling algorithm like FIFO,
Round Robin, SJF, SJRF. Then he asked about the detail pro and cons of each scheduling approach.
6. I asked many questions about IBM’s financial support for further higher studies etc.
7. How can I be at IBM and also doing Phd, will IBM allow for that?
Tips / Advice: They were looking for strong grip on Algorithms and data structures, also in graph, so
prepare it well.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/ibm-irl-campus-interview-set-1/
Amazon Interview | Set 64 (Off-Campus for
SDE)
I am sharing my off campus SDE interview experience with Amazon.
1. Given coin array and a sum K, find min. number of required coin to make sum K.
2. Two rectangles are given in two D space. Find if these are overlapping or not
3. KMP for pattern searching
After two days I got the call to come Amazon office for F2F interviews:
1st Round:
1. Program to construct binary tree from its inorder and preorder traversal. (algo+code)
2. Reverse every k-element in a linked list(algo+code)
2nd Round:
3rd Round:
1. Given a binary search tree of n nodes, find all the pair of nodes whose sum is equal to a given
number k in O(n) time and constant space.(algo+code)
2. Given a function “f” in which 0 occurs with probability 0.4 and 1 occurs with probability 0.6.
Using function “f” deduce a new function “f1” such that both 0 and 1 occurs with probability 0.5
3. Given a matrtix, find the maximum sum subarray in it.(algo+code)
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-64-campus-sde/
Amazon Interview | Set 65 (Off-Campus for
SDE-2)
My experience for Amazon’s Software Development Engineer-2
Overall it was great experience, Myself satisfied with my performance in all rounds expect 3rd round
:(.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-65-off-campus-for-sde-2amazon-interview-set-
65-campus-sde/
Amazon Interview | Set 66 (For SDE)
A F2F
1. Min stack problem (algo+code)
B Hiring manager
1. A big file (some TB’s) containing custid, page and time stamp, find out the repreating customer( the
one who visits after 24 hrs)(algo)
C F2F
1. Left view of a tree (algo+code)
D F2F
1. Given some sets of people who fight against each other. They are represented as graph. if a link
exists between A and B, the it means that A and B are fighting against each other. Likewise there are
some more links. The question was to divide the nodes into groups such that no person in a group
fight with another member in that group. (More of bipartite graph) find the groups (algo)
2. A singly linked list, find the kth element from the last. The question was further modified to not to
process a node more than once. (algo)
E Bar raiser
1. Questions on projects, what is it, what did you do (deep diving)
5. Any situation where you can see there are some improvements required and proposed
6. There is a large file( 1TB) containing braces. Question is to check for their balance. I said will use
a counter, will increment on an open brace and decrement on an close brace. If counter goes negative
or counter is non zero at the end of the file, braces are not balanced. Otherwise balanced. Followup
question was to make this process parallel (meaning to see if this problem can be solved through
parallelism, like dividing the the problem into sub problem….) Remember the file is very large.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-66-for-sde/
Amazon Interview | Set 67 (For SDE-1)
1) Round 1 telephone interview – implement division without using division operator in log(n) time.
solution: use bitwise shifting
2) Round 2 telephone interview – write a program to buy and sell stocks to maximize profit, can only
do 1 action per day i.e. buy or sell.
solution: I used 2 pointers to keep track of best buy and sell rates. I implemented it in O(n) time. He
was happy with the solution.
After a few days I got a call from the recruiter saying the team was very happy with my interviews
and wanted to meet with me in person.
I had to actually reschedule my on-site interview as I couldn’t locate the office since it was not
locatable on Google maps!!
I got in the office in Toronto. I was given a visitor pass and escorted to a meeting area where the
interviews took place.
3) F2F(HR round)
This was easy, the interviewer asked basic questions about my background and what made me choose
computer science. I talked about my favorite project and she answered some my questions.
4) F2F(Director) he wanted me to do BFS search. Given a level, child index return the child node for
a binary tree. I gave him a inorder search instead, he was okay with the solution.
5) F2F(SDE) this is when things started to get tough. He wanted me to design a library reservation
system. He wanted me to explain him a design and draw some diagrams and then implement the
classes.
We didn’t have enough time to do all of it. He wanted to know what data structure I would use to
perform searches for books. I choose LinkedHashMap because it allows O(1) lookup and O(1)
insertion.
6) F2F(SDE) He wanted me to build a boggle game. This is where I got a little mixed up with some
java and C# syntax and he was not too impressed. I tried to write the algorithm using 2 for loops and
he gave me some hints as to how to implement it.
7) F2F(SDE) Given a list of words, find anagrams. This was easy enough to implement. He asked
runtime in the end.
The interviewers communicated with you all the time, its not like you go in an exam and quietly write
what you have memorized. There is lots of pressure and lots of explaining to do as you write the
code.
All in all it was a great experience. The guys were cool and fun to interview with.
Geeksforgeeks was a tremendous help towards the interview.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-67-for-sde-1/
Amazon Interview | Set 68 (For SDE-1)
I went through the Amazon interview process for SDE-1, I didn’t make it past the 3rd F2F round.
Online Round:
1. Find if a given string contains duplicates
2. Given a BST, find the maximum N elements of the tree
3. Given a BST, convert it into Doubly Linked List
4. Rotate a 2-D Matrix by 90 degrees
Telephonic Interview:
1. Given an array of integers (+ve and -ve), give a contiguous set of numbers that add to 1
Eg. 4 3 5 -3 -1 2 -3 10 2
Ans: 5 -3 -1 2 -3
F2F:
Round 1:
2. Given an unsorted array, assign every element to its immediate larger number after the current
number, assign to -1 if no such number exists
Eg. 3 1 2 5 9 4 8 should be converted to
5 2 5 9 -1 8 -1
Round 2:
1. In a 2 D array where every row and column are sorted, give the nth smallest element
2. In a Binary tree, every element must contain the sum of its sub-trees
Follow up question: how would you solve this if you can ONLY increment the value of a node
Eg. If a node’s value is 20 and its sub-tree sum is 10, the node’s value can’t be set to 10 because you
can only increment
3. Given n, find the smallest number for which product of the digits is n, if no such number exists,
print -1
Note: Digits can only be split as single digits, i.e., 132 can’t considered as 1 * 32 or 13 * 2, it would
only be 1 * 3 * 2
Eg. Answer for 36 would be 49
Round 3:
1. Convert a Binary tree into another binary tree whose in-order traversal gives a sorted list
This has to be done in-place
Eg.
1
2 3
4 5 6 7
4
2 6
1 3 5 7
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-68-for-sde-1/
Microsoft Interview | Set 26
Round 1:
Questions about previous work, design patterns used in the previous work.
Given two integers represented in Linked list format and now add these two lists and put it in
the third list, at any point of time a node can have only one digit in it.
With the discussions it came like by considering the carry forwards and all similar to some of two
integers represented in a linked list fashion. Interview asked to tell the approach first then for coding
// Approach 1
// 1 2 3
// 12 8 9
// 14 1 2
Version 1:
Version 3:
This will save last digits sum in a single node this is not what I have expected when the sum is of two
digits, so please fix the code
Version 4:
Can u optimize more here…? What is the maximum when you add two digits…? What are the
possible values for the carryforward…? Back to back questions
So the final version of mine is removed the count variable and moved the last condition of
carryforward to outside of function. He created more fun here that why he is digging so deeper.
Interviewer: Then why do you choose recursion I need an alternate approach not happy with one
alternate
// Approach 2
/*
* Reverse list 1:
* Reverse list 2:
* Add the lists with remainder and dividends
* Reverse list 3:
*/
// Approach 3
/*
* make the linked list to array and use the indices to
traverse and do the addition
* No program is asked for it
*/
// Approach 4
/*
* mConvert the entire linked list to an integer and then
add both the integers and then prepare a linked list
with the result
* but the issue if the result is out of integer boundary
*/
Interviewer: “Are you thinking that why this guy is saving integer in linked list and then asking me for
addition of such lists…?”
Me: Yes
Interviewer: then answer yourself what is causing me to do this way, lets exchange the roles
Me: told some scenarios like
1. want to have index based integers and growing dynamically (so arrays won’t be friendly)
2. If I want to have a counter which value is more than the range of integer then I can go with this or
some other data structure.
Interviewer: Now lets go back to the question again and then fix your code by ignoring your
assumption of equal length of lists
Me: the above approaches 3 and 4 can solve
Interviewer: but these are alternate approaches to solve any means of fixing the same solution instead
of going with the alternate?
Me: May be I’ll pad the smaller list with the zeros and then use my algo extra overhead initially but it
works.
Interviewer: Ok Back to your solution Recursion why did you jump and started with the recursion
when u have these many alternates…?
Me: I usually think of recursion when someone ask a question in linked list which will solve
sometimes easily as it is unidirectional.
Interviewer: can u elaborate more how recursion will ease the developer logic
Me: It uses internally tree through which I can perform operations in reverse direction in a linked list
Vijj: What tree does it maintain?
Me: Name is some RecursionTree but its not actually a tree
Interviewer: Then what is that
Me: some data structure
Interviewer: offcourse what is that data strucrue
Me: I hope its stack as it is working LIFO fashion so I can do the reverse operation easily. That’s
why one of my test case checks for Stack overflow exception as I used recursion when I have huge
data.
Interviewer: What is LIFO
Me: explained about the LIFO and compared with the FIFO.
Interviewer: if that is the case anyone can write a search engine we also use some heuristics
Interviewer: Take some numbers and prove that your solution is correct
Me: Shown with the example I need to traverse for the entire list till I get the answer.
Interviewer: Does it fail in any scenario?
Me: no never
Interviewer: It will fail if all the numbers in the array are -ves
Me: but initially the question was the array is mix of +ve and -ve
Interviewer: Ok then let me change the question and consider it has all -ves then does your code fail
if so where?
Me: yes it will with conditionof currMax
Interviewer: then fix
Me: took lot of time to fix and then asked me to prove the correctness
I couldn’t prove my solution as I lost somewhere while I was tracing with the big list but the solution
was correct, So
Interviewer: he asked me to change the initialization and fix that is the hint
Me: I couldn’t fix as I was stick to my solution, but I gave a alternate approach like
I’ll multiple all -ve numbers with -1 and make the list is full of +ves and then find the minimum of sub
array instead of max once I got I’ll make it is a -ve number before return or print
Interviewer: very keen on what is the return value of the funtion which I wrote; and he told you are
going to the alternate solution instead of fixing the existing solution
Interviewer: ok lets go to anther question given a tree find the ancestor
Me: meaning parent, grand parent, or grand grand parent
Interviewer: does it matter for you? And what is ur approach for say grand parent
Me: I said may be I’ll go with stack and based of your option I’ll peek the node from stack
Interviewer: Ok we will go to some other question instead of this.
Interviewer: I’ll draw a tree on a paper and give that to you take your own time and remember the
tree in a data structure and once you say yes I’ll wipe out or take my paper back then consider the
data structure is input to your algorithm and them construct my tree back
Me: I couldn’t understand the problem asked too many questions what he really want like I’ll
construct the tree by using ur tree and then call the same function to recreate
Interviewer: how do you create what is ur input what is the data structure is that
Me: I said Node blah blah … asked too many question then I understand what he wants
So my approach was I’ll represent your tree in two arrays one will be Inorder and other will be
pre/post here I’ll go with Pre and once I have these two arrays I can go with the construction algo by
giving these are inputs.
Interviewer: tell me the approach how do u construct if you these two arrays
Me: I told combining these two how we can go and construct like from inorder we can get the root
element and find that root in the second array and then split the array which is same as left and right of
tree for the root and proceed further; this I need to do it manually for the given tree to prove my
solution; and he asked couple of questions after splitting where the sub arrays will go and how dow
remember that what is left n right; manually I explained all these with the example and I said don’t
know what condition need to check when I write this as a program
Interviewer: happy with the approach and asked what In/Pre/Post oders why did u choose only these
two
Me: I need Inorder and you can tell me which one do you want me to take either pre or post
Interviewer: its up to you, ur algo ur data structure and write the program
Me: I was not able to put my logic in the code as I couldn’t get the proper conditions tried in normal
way as well as recursion but couldn’t make a concrete code at all.
Interviewer: we are running out of time so will stop here.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/mircosoft-interview-set/
Myntra Interview | Set 1
First round
1) Given set of coins of different denominations like 1$(100), 5$(50) ..etc, and given an amount, I
was asked to come up with optimal solution using least number of coins to get that amount.
I told greedy approach of starting with maximum denomination coin, use up as much as possible, then
moving on to next, I was asked to tell dynamic programming approach.
I told I will split the amount in half and keep doing it until i reach 1 1 combination..start calculating
optimal combination..and keep going up like..
2) Next question was to try and implement google autosuggest. I told i will use tries, pseudo code and
some optimizations on top of it.
Second round
1) If every leaf node in binary tree forms a double linked list, that is all the leaf nodes for a DLL.
ex:
1
/ \
2 3
/ \ / \
4 ......5....6.......7
.........................
Third round
System Design questions :
1) A Bunch of devices….u can share files etc., ..each device might support only some limited format
of files. Design a common server hosting all the files repository.
2) Design a website where after user request…a bunch of processes need to be executed and then a
mail is sent to user with the result. ..Take care of scalability etc.,
Fourth round:
System design: The whole supply chain, a central head, bunch of divisions under it… under each
division ..bunch of manufacturing units and then under them…vendors.
SOA approach seems to be best in this case.
in mobile phones how autosuggest and autocorrect work…. google ranking algorithm…and little on
analytics.
Fifth round
1) Database:design with one-one mapping, one-many mapping…some basic qns.
2) Binary tree insert, delete ( all the cases in delete and when they happen)
4) There was one dynamic programming question..I dont remember what it was…
5) c++ oops….polymorphism…
7) Given a bunch of floors….and egg will break only if it is thrown from a floor and any floor above
that….what least number of eggs u would need if total floors are say 32..
I went with binary search..where I strt from middle…throw the egg, if it doesn’t break…
go to middle of upper half and if it does break..i know I should go to middle of lower half.
…so 5 eggs
Sixth round
1) This was CTO round, if you make this round…you are doing pretty good.
2) He asked a lot on what I worked on …and asked questions relevant to that.. process threads…
stacks heaps. a minor system design on component in their system. how they are shared between…
tradeoffs…
we discussed about scalability and challenge….
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/myntra-interview-set-1/
Cadence India Interview | Set 1
I recently gave interview for Cadence, for Member Technical Staff position. Total Work Experience –
2.5 year.
Telephonic :
1) How to limit the scope of a variable -> I explained about static
2) what is linked list, implement using array and linked list (which is better single or doubly? ) and
space and runtime complexities of push() and pop().
3) In a directed graph how can you find a cycle? is it possible to find using BFS, why BFS is
preferred over DFS.
Face to Face
Round 1 :
1) Automata basic questions (i din remember automata.. the guy helped me in this one)
make a State diagram for a*b*c expression.
2) convert it into deterministic diagram
3) state diagram for a[POW(n)]b[POW(n)]c (use of counter is required)
4) n jobs are given , their dependency list is given how will you schedule them ? (I explained using
modified BFS)
5)If a graph DS is given, how will you dump that into memory and retrieve it again ?
Round 2 :
1) Write code for string reversal.
2) Write code for linked list implementation. push and pop
3) Puzzle – 23 coins are given and two player are there. anyone can pick 1 to 4 coins at a time.
One who picks the last coin wins.. Find algo for it.
Round 3 :
1) In a project, i have an api which takes some parameters and returns a string.
How will you handle the memory allocation done inside this API ? – Ans is you make it static.
2) Puzzle – two ropes are given. each burn in 60 mins. how to count 45 mins from it.
Round 4:
1) General questions about my current work and projects done with the senior manager.
Round 5:
HR round..
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/cadence-india-interview-set-1/
Telephonic Interview 1:
1. Sliding Window Problem: Given a larger integer buffer/array (say size, x), now given a window
size (say, n) and a number (say, k). Windows starts from the 1st element and keeps shifting right
by one element. The objective is to find the minimum k numbers present in each window.
2. Given a binary tree, each node having an integer data, the objective is to create a new Doubly
Linked List using this binary such that each node in DLL has vertical sum of nodes in binary tree.
The order of nodes in DLL shall be left to right as that of binary tree’s vertical nodes i.e.,
leftmost vertical sum shall be 1st node in DLL and the rightmost vertical sum shall be the last
node in DLL.
Telephonic Interview 2:
1. Given the root of the binary tree and a pointer to any random node in that tree, the objective is to
print all the nodes at ‘k’ distance from the given random node.
Face to Face:
Note: Time and space complexity were discussed in each of the following questions. And for each
question I was asked to optimize the algorithm and later write the working code for it.Also in each
round the current project was discussed.
Round 1:
1. Given a matrix (m*n), source (0, 0) & destination (m-1, n-1) (i.e. last cell), Find out total
number of ways to reach the destination from the source.
2. Given a binary tree, defining a term “complete path sum” as, sum of values of nodes lying in a
path from root to the leaf; Now given a value ‘k’, we have to find the k-heavy path and prune the
binary tree i.e. prune/delete nodes for which complete path sum is smaller than k.
A thorough discussion on an issue: If I am an owner of company which is selling some product. So,
how shall I store my data in Database such that when any analyst comes and asks for any information
then I could provide him most precise values. It mainly consisted which data should be stored and
how it should be stored.
1. Given two sorted arrays, create a final sorted array. Later, the problem was extended saying that,
now we have ‘m’ number of sorted arrays each of size ‘n’, now efficiently create a final array. A
lot of discussion was done on complexity of the approach (both time and space).
Round 3:
1. Given a binary tree, where cost of travelling to the left child is ‘1’ and same for the right child is
‘2’. Now, given the root of the tree and a value ‘k’, find the total number of nodes that are at a
distance/cost of ‘k’ from the root.
2. Given an unsorted integer (positive values only) array of size ‘n’, we can form a group of two or
three, the group should be such that the sum of all elements in that group is a multiple of 3. Find
the maximum number of groups that can be generated in this way.
3. Given an integer array, find minimum number of jumps to reach the end of the array.
http://www.geeksforgeeks.org/minimum-number-of-jumps-to-reach-end-of-a-given-array/
Round 4:
1. Given a BST, convert it into a Doubly Linked List in place. NOTE: We don’t have to create a
new data structure i.e. we have to modify the links/pointers in given BST.
2. Question was framed this way: Given street of houses (a row of houses), each house having
some amount of money kept inside; now there is a thief who is going to steal this money but he
has a constraint/rule that he cannot steal/rob two adjacent houses. Find the maximum money he
can rob.
NOTE: I didn’t face any HR round, all though in each rounds I was asked about the reason for the
change.
In all it was a great experience, and interviewers were really cool and gave a plenty of time to think
and code, sometimes suggested/hinted if I got stuck.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-69-sde-1/
Flipkart Interview | Set 4 (For SDE-1)
Company: Flipkart
Profile: SDE 1
Experience: 7 months
Round 5: 2nd f2f interview (Problem solving and data structure round) (1 – 1.5 hr)
Q1). Generate n numbers in ascending order which are having given k factors. Discuss various
approaches. Discussed on various approaches.
I told 3 approaches:
Naïve approach—O(nk)
Heap approach — O(nlogk),
Linear time — O(n)
Q2). Given set of words which I have to treat as dictionary as new lexicographic order. I have to
learn from set of string as print lexicographic order of each character. (Topological sort)
(http://www.geeksforgeeks.org/topological-sorting/)
Q3) .http://www.geeksforgeeks.org/flipkart-interview-set-3/— > Round 1 , Question
3(http://www.geeksforgeeks.org/topological-sorting/)
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-set-4-sde-1/
Amazon Interview | Set 70 (On-Campus
For Internship)
Online Round Coding Question:
Q1. Given a float number 7.64, convert it into the string WITHOUT using any inbuilt function/library.
for eg:
input
float no.: 7.64
output
string: 7.64
Q2. Given the inorder and preorder traversals of a Binary Tree, output the postorder traversal of it.
for eg:
input:
Inorder: 7, 8, 4, 1, 6, 2, 5
Preorder: 1, 4, 7, 8, 2, 6, 4
output:
Postorder: 8, 7, 4, 6, 5, 2, 1
Round 1 written:
Q1. Given a string find the length of longest substring which has none of its character repeated?
for eg:
i/p string:
abcabcbb
length of longest substring with no repeating charcters: 3 (abc)
Q2. Given a link list with right pointers and each element of the list has a down link contains another
link list with down pointers as:
PI Round 1:
The interview started with discussions and questioning about the internship project and other projects
mentioned in my Resume.
After the discussions about projects interviewer asked a question on string the question was:
Q1. A string of length n and an integer m was given, give an algo. to rotate the string counter
clockwise by m. I was asked to give all the check conditions for input m.
Then the interviewer asked me to write a code for the same with a strict guideline that there should
not be any mistake in the code ;).
Q2. After this he asked me about heap, min and max heap, insertion and deletion in a heap. He asked
me to prove that the time complexity of inserting n elements in a heap.
At-least he asked about the uses of heap data structure and other data structure which are implemented
using heap.
PI Round 2:
Q1) What is the difference b/w abstract and interface class?
Q2) Write a program to create single thread and print “Hello World”, stating all the arguments of
createThread function?
Q3) What is a deadlock and what are the condition necessary for the deadlock to occur?
Q4) What is a cache memory and how it is implemented?
Q5) Explain LRU, FIFO and other page replacement algorithms?
Q6) Write a code to implement LRU cache and then implement full cache memory?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-70-on-campus/
Adobe Interview | Set 8 (Off-Campus)
Experience : 8 months
First Round :
Held on interview street .Aptitude + technical (standard pattern and questions)
Discussion on projects.
How does strtok() works. How can you make it thread safe.
Fourth Round(f2f) :
A building has n steps. Aperson can take 1,2 or 3 steps. In how many ways can a person reach top of
building.
You have a stream of incoming integers. How will you store these numbers and implement following
functions : GiveMax(), GiveSecond Max(), Delete Max(), DeleteSecondMax (), Add , Remove an
element.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-set-8-off-campus/
Amazon Interview | Set 71 (For SDE-2)
Recruitment Drive – Delhi (22 March 2014)
Position SDE-2
Interview asked to explain logic and write full code with all boundary conditions.
1. Asked about abstract classes and abstract class there uses and where they have to used.
Asked me to design online cab booking system for amazon. Then asked me to design High Level
diagram for it.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
1. Asked to explain how to check Binary tree is BST? then asked me to write whole code of it.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-71-sde-2/
Bharti SoftBank (HIKE) Interview | Set 1
First Round Written Test
1. The test consisted of 10 MCQ’s on Aptitude and 10 MCQ’s on C programming.
2. It also consisted of 2 programming questions which were easy
a. In an array find two numbers whose sum equals zero in O(n) complexity.
b. Given Preorder and Postorder traversals of a BST . Construct the tree.
1. Given two strings check whether one string can be mapped to other string. For eg. abcd can be
mapped to ghjk but accd can not be mapped to ghij since ‘h’ and ‘j’ both can not be mapped to ‘c’.
2. Given a string find the number of meaningful words(which add to original length of the string)
which could be formed from the string (A function called isWord() was provided which had tell you
if the word was a dictionary word.
for eg. programmerit forms:
pro+gram+merit
program+merit
programmer+it
pro+grammer+it
Then he discussed the iterative and recursive approaches and asked me to calculate the complexity of
my code.
3. He discussed the longest common subsequence problem with me and discussed the top-down and
bottom-up approaches.
1. Given a number find the next higher number from the combination of given numbers.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/bkarti-softbank-hike-interview-set-1/
Adobe Interview | Set 9
Experience: 8 months
2. Duration 50 min.
40 low level maths aptitude and LR questions
After a week, received call for onsite interview rounds at noida office.
2. Process vs threads
3. One question to check whether i have idea on address space of process and threads
(based upon threads share data and heap but have separate stacks )
2. Given an circular linked list. convert it into non-circular . no link or data can be changed.
(basically find start node of circular list and de-link it )
HR round:
Didn’t happen because HR was in urgent critical meeting.
After 2 days got a call from HR that I was selected for Adobe
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-set-9/
Flipkart Interview | Set 5 (Off-Campus for
SDE-1)
I recently attended Flipkart interviews(off campus). I would like to share my experience with
everyone.
2) Given set of words that are lexographically sorted, find the grammar.
Eg:
abc
acd
bcc
bed
bdc
dab
The order of letters for the given example would be
a->b->c->e->d
2) Given a sentence and a set of characters. Find the minimum window within which the set of
characters can be found in the sentence in any order.
3) In a client-server architecture, there are multiple requests from multiple clients to the server. The
server should maintain the response times of all the requests in the previous hour. What data structure
and algo will be used for this? Also, the average response time needs to be maintained and has to be
retrieved in O(1).
The HR sent a mail within 2 days that I was shortlisted for the onsite interviews.
They arrange flight travel to Bangalore, cab facility and accommodation if required.
2) Achievements.
2) Given a tree with edge weights, find any path in the tree with maximum sum of edges.
3) Given a maze, a start point and end point find the shortest path to reach the end point from the
starting point.
4) Given a polygon and a point, find whether the point lies within the polygon or not.
Excellent facilities and salary package for candidates who get selected.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-set-5-off-campus/
Amazon Interview | Set 72 (Off campus for
SDE-1)
Amazon Interview (Off campus for SDE-1)
Experience: 8 months
Interview Process – 2 (telephonic) + 3 (f2f – Bangalore) + 1 bar raiser (telephonic)
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-72-campus-sde-1/
Amazon Interview | Set 73 (For SDE-1)
I have been interviewed for SDE1 by amazon. Here are the questions.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-73-for-sde-1/
Amazon Interview | Set 74
Phone Interview:
1) Given a 2D matrix where every row is sorted, give the index of row which has maximum number
of one’s
2) Given a Binary tree, print its every level in a new line.
eg 2, 1, -1, 0, 2, -1, -1
o/p: 1, -1
1, -1, 0
0
2, -1, -1
I did not clear after this round, I hope this helps others.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-74/
After two days I got a call from the hr that I have cleared the written and a phonescreen is to be
scheduled.
1> Divide an array into 2 subarrays such that the absolute difference of their sum is minimum. It was
then extended to divide into two subsequences .
3> Convert a linkedlist with positive and negative integers into a list with first all negative integers,
then positive. order amongst negative and positive numbers to be maintained .
Generally if first phonescreen is convincing the next step is direct face to face interview , else one
has to go through another phonescreen . I had one phonescreen only . After a month i was called for
inhouse interviews . All arrangements were made by them .
The interviewer then asked me if i had done something on multithreading . As i was not very
confident so i said no and he dint go further .
He then asked me what is my biggest regret in my student life in college .
Amazon hr’s were extremely helpful. After 3 days I got a confirmation call that I was hired.
Geeksforgeeks has been instrumental in helping a lot of people to land up in good companies. Keep
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-75-sde-1/
Amazon Interview | Set 76 (For SDE-1)
Hello Guys, I was recently interviewed by Amazon for SDE-1 position. Following is my interview
experience.
Round 2 (Telephonic)
1. Given an MxN array, in which the rows are sorted. Need to sort the complete array
Round 3 (F2F)
1. Spiral Level order traversal of Binary tree
2. Given a huge file 100 million integers. He further divided the file
to 100 files with 1 million integers each. Each file is sorted. Find the efficient way to find smallest
‘m’ integers. Note ‘m’ is very less in comparison to a million
3. Given sorted & rotated array find the index of given integer
Round 4 (F2F)
1. Given a Binary Tree and a sum k.Print all the paths with sum = k. Path can or cannot start with root
2. Reverse k elements of linked list
3. Given a 2D array find the maximum sum rectangle
4. Given a list of n mp3 songs. Play them randomly. No song should repeat until all the others are
played.
1
/ \
2 3
/\ \ /
4 5 6
/ \ / \ / \
7 8 9 10
Needed to connect the nodes vertically
1
/ | \
2 | 3
/ | \ | / | \
4 | 5 | 6
/ \ | / \ | / \
7 8 9 10
Assume each tree node has an additional pointer
(struct node* vertical)
Round 6 (F2F)
1. Given stock price of Amazon for some consecutive days. Need to find the maximum span of each
day’s stock price. Span is the amount of days before the given day where the stock price is less than
that of given day
2. Given a Binary tree each node should contain the sum of left and right subtrees. Leaf nodes will
become 0 in the resulting tree.
Tips:- Be clear to the interviewer, the are quite helpful. Try to discuss the various approaches that
come up in your mind if you are struck somewhere.
All the best.!!
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-76-sde-1/
Amazon Interview | Set 77 (Off-Campus
For SDE-1)
Amazon SDE1 Off campus (1.5yrs experienced)
Written Round
1. Given an array in which elements are first increasing and then decreasing. find the maximum
element in the array.
2. Given an array of unsorted elements, find the minimum difference between any 2 elements in the
array.
1st f2f
1. Given an array of positive numbers, find the maximum sum of a subsequence with the constraint
that no 2 numbers in the sequence should be adjacent in the array. (extended to negative numbers)
2.Write a function to print the level order traversal of a binary tree in spiral form.
2nd f2f
Small discussion about my projects
1.Write a function to find the next smallest palindrome number of the given number. for example: if
given number is 12345, then the next smallest palindrome is 12421.
2.Given 2 strings str1 and str2. What is the efficient way to navigate from str1 to str2? The constraints
are i) a string can be changed to another string by changing only one character. ii) all the intermediate
strings must be present in dictionary. If not possible, return “not possible to navigate from str1 to
str2″. (pre-processing is allowed and enough memory is available). for example: str1 = feel and str2
= pelt, then the navigation is feel -> fell -> felt -> pelt (Hint: Graph)
3rd f2f
1. Given two numbers represented by two linked lists, write a function that returns sum list. The sum
list is linked list representation of addition of two input numbers. It is not allowed to modify the lists.
Also, not allowed to use explicit extra space.
2. Given a matrix of characters and a string, find whether the string can be obtained from the matrix.
From each character in the matrix, we can move up/down/right/left. for example, if the matrix[3][4] is
o f a s
l l q w
z o w k
and the string is follow, then the function should return true.
Deep discussion about my current project (challenges faced, etc) nearly 20 mins
Deep discussion on REST api authentications (Hash key vs Encryption & Decryption) nearly 20 mins
1. Given an input string, write a function that returns the compressed string for the input string in
INPLACE. (no extra memory) (length of compressed string
Source
http://www.geeksforgeeks.org/amazon-interview-set-77-sde-1/
Belzabar Interview Computer Scientist
Internship
Belzabar Software Design & Development recently visited our Campus, as a regular offering
Computer Scientist Internships to 2-3 students of the college from CS/IT Engineering Branches. They
had a very strict policy that if one applies to Internship cannot sit for Placement Drive when the
company visits the campus again. To put in a nutshell, You get only one chance!
I got through the first round with one of the highest scores.
2. Coding Round –
45 min to write a program in C,C++ or Java.
Efficient Program has extra credits.
Algorithm is to explained at the Beginning or the end, Extra credits for that.
Compilation of Code is not allowed.
A mapping of digit to letters (just like on the telephone buttons) is given below.
Sample Input:
23
Sample Output:
ad, ae, af, bd, be, bf, cd, ce, cf
http://tbj.bridgenit.com/belzabar-interview-review-intern/
I solved it using the naive approach and two of my batch mates solved it using Hashing, they got
selected for interview. I didn’t make to Personal Inteview Round.
Belzabar is a Superb company offering 6.70 LPA PPO to Students, so must apply and All the Best for
your Belzabar Internship/Placement Rounds.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/belzabar-interview-computer-scientist-internship/
Amazon Interview | Set 78
The first round was an online test hosted on Interviewstreet.com. Around 350 students appeared in the
online test. The duration was 90 minutes. It consisted of 20 MCQs based primarily on Predicting The
Output, OS, CN and Data Structures.
1. Given a string, find the first element which is non -repetitive i.e that element must not be present
anywhere else in the string.
Eg : Input : teeterson
Output : r, as it is the first element which
is non repetitive.
2. Given a string of digits,find the next smallest number using the same digits.If its not possible to get
such a number print -1;
After a week, the results came out and 25 students were shortlisted.
Personal Interviews:
Technical Interview 1 :
I solved it by using Binary Search to find the first and last occurrence of 0 in the array and subtracting
the results.
2. Given an array of positive and negative numbers, find the pair of elements whose sum is closest to
0.
Eg : Input : 3 5 -9 -4 17 11
Output 3 , -4
The brute force solution would be O(n^2) by comparing each pair of elements.As expected, he asked
me to optimize my solution.
So I sorted the array using merge sort. (I know its not in-place but it did not strike me at the time)
Then used two indexes at the beginning and end of the the array and incremented/decremented the
indexes as needed.
I started by telling him my approach and the logic behind the recursive solution that I had in mind.
Then he asked me to write test cases for the function that I had written.
Technical Interview 2
2. Given an array of integers , replace each element with the product of the remaining elements.
Eg : Input - 1 2 3 4
Output : 24 12 8 6
First, i gave the obvious solution. I computed the product of the whole array and then divided it by
each element to get the resultant array.
But he asked me to do it without using the division operation. After some cross questioning I gave the
following solution.
Store the product of the left side elements for each integer in an array L[].
Here R[] = { 24 , 12 , 4 , 1}
PS : Could you guys tell me if the SDE-T position is inferior to the SDE-1 position or are they of the
same level?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-78-fresher-internship/
Yatra.com Interview | Set 2
I appeared for yatra.com interview process. In each round, I have to discuss the problem with
interviewer and to tell him my approach. Also they asked About complexity of each solution and also
stressed to optimize it
Round 1 ->
1. Given a Matrix with 0’s and 1’s in sorted order. design an algorithm to return row index with
maximum number of 1’s. after That he modified the ques that some rows are sorted in increasing
order and some in decreasing order.
2. Given two arrays of n+m and n size. n+m size array only have m elements and n size array have n
elements. Design an algorithm to shift smaller array element in larger array also larger array should
be sorted. interviewer asked to give 3 different algorithms.
Round 2 ->
1. What is Hashing, Hash table.
2. Algorithm for Level order traversal of BST without using Queue Data structure.
3. Given an array with +ve and -ve numbers. Give an algorithm to find 3 numbers having sum x in
less than O(n3) complexity.
4. Binary search.
Round 3 ->
1. Given a file with all 255 chars in it. design an algorithm to check whether this file is parenthesis
balanced or not.
(file handling question)
2. HR questions.
3. Discussion about current company work and my responsibilities.
After 3 days i got the offer letter. Do a lot of work on complexity optimization.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/yatra-com-interview-set-2/
Round 1: [Coding]
1. Given MxN matrix with sorted elements row wise and column wise, find the Kth largest element
2. Given MxN matrix with sorted elements row wise and column wise, find an element
3. Given MxN matrix which contains 1s and 0s, find the largest sub matrix which contains most
number of 1s. condition is that each row in the sub matrix must contain at-least one 1
Round 3: [Coding]
1. Given MxN matrix, which contains 1s and 0s only. Redraw the matrix so that, if any one position
[i,j] contains 1, mark the entire row and column with 1. But make sure because of newly marked 1s,
don’t do the same
i/p o/p
0 0 0 1 0 1 1 1 1 1
0 0 0 0 0 1 1 0 1 1
0 0 0 0 0 1 1 1 1 1
1 0 0 0 1 1 1 1 1 1
0 1 0 1 0 1 1 1 1 1
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/expedia-interview-sde-ii/
Amazon Interview | Set 79 (For SDE-1)
I have 8 months of experience and I recently appeared for interview of Amazon for role of SDE-I.
Written Round:
Q1: Convert a binary tree to DLL.
Q2: Given a random node address in Singly linked list. Delete that node.
You need to write full code in language of any choice with all the edge cases covered.
Interview 1:
Q1 : Given a sorted array and a number and element K. find K nearest elements to the number in
sorted array.
Interview 2:
Q1: Given 4 youtube servers which are processing user requests.
i> At any given time If someone requests for currently running videos, then return the number of
videos running at a time.
ii> Which server will actually get the request ?
iii> How the servers will communicate with each other ?
iv> Other methods to do this task to reduce overhead on servers?
v> How many videos running given a time constraint ?
Q2: Given a binary tree and each node has an extra next pointer apart from left and right. Connect all
the nodes using next pointer in Zig-Zag Manner.
Interview 3:
Q1: Discussion about project in current company.
Q2: Given a shared memory between multiple threads, how will you ensure safe access to memory in
different scenarios like reading and writing? If at thr point of wrtitng there are mutiple read requests
from threads how pending requests can be managed.
Q3: Given an array that has positive numbers and negative numbers and zero in it. You need to
seperate the negative numbers and positive numbers in such a way that negative numbers lies to left of
zero and positive numbers to the right and the original order of elements should be maintained
Interview 4:
Q1: Discussion about current project in company.
Q2: Why you want to leave your current company ?
Q3: Why Amazon ?
Q4: Which phone you have
Q5: Which one will you buy next
Q6: given a function with signature
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-79-sde-1/
Android Developer Interview at
Headstrong and SnapDeal
Headstrong:
1st Round:
1) What is Heap Memory and Difference between stack and heap memory.
2) Why would you do the setContentView() in onCreate() of Activity class.
3) In an app where a component would get would stack up dynamically like experiences in LinkedIn.
Would you declare a component in layout xml for this or you will create it dynamically and why.
2nd Round
1) How will you go about creating an in house GPS map system with Bluetooth.
2) How will you create a circle with color by using XML only.
3) How will you create an OCR application.
Snapdeal
1st Written Round
1) What is the difference between an interface and abstract class.
2) Find maximum number in an array with increasing and then decreasing numbers.
3) Add two numbers represented by linked lists and represent the sum in third linked list.
4) 20 odd questions about activity base class, fragments types, service’s base class, Content
Providers Funtions, Loaders Functions and Out Of Bound Errors.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/android-developer-interview-headstrong-snapdea/
#include<stdio.h>
int main(void){
int i=1, j;
switch(i){
case 1:
printf("SAMSUNG");
break;
case j;
printf("NOIDA");}
}
2. how hexadecimal no 1234 store in big endian form there are four option …….
int f(int n) {
if(!n) return 1;
return n*f(n-1);
}
7. A process call fork() system call n times than how many new process created(2^n-1).
11. which data structure is used to check for wheather expression is balace or not..
int fun(){
static int i;
return i++;
}
main()
{
int i;
for(i=0;i<5;i++)
printf("%d ",fun());
}
a.1 1 1 1 1
b.1 2 3 4 5
c.0 1 2 3 4
d.5 5 5 5 5
15. if time slice is greater than the execution time of largest execution time process than round robin
acts as…
16. if derived class has same name function as base calss than it is called..
17. suppose a process have to need some I?O event than CPU has to wait what is envent to over come
this problem(multi programming)..
Technical Interview :-
1. how to find your system is big endian or not.
4. write the code of quick sort and explain your code with an example
6. deletion in BST
7. he wrote an example of mulilevel inheritance and ask in what order destractor called and why?
9. what is encapsulation explain and how it is achived and give real life example…..
14. how to do this A programe’s varible can not used by another program
15.
char *p="SAMSUNG"
char p[]="SAMSUNG"
26. what is Inter process communcation ,types and which one is fast and why?
HR Interview :-
1. find the largest and second largest element in array give 4 different approch
2. tell me about yourself?
3. why do you want to join samsung?
4. what do you know about samsung?
Many Many congratulations to the author. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/software-engineering-lab-samsung-interview-set-2/
Flipkart Interview | Set 6
Online Round:
1. Don’t remember the questions, but they were of medium level, not tough as such.
1st Telephonic
1. Solve Snakes and ladder problem, Given all the inputs for the board.
We can roll the dice, as we want to. Need to find the shortest path to reach the 100 level from the
starting of the path. Various other questions were asked on the basis of that only.
2. Given a file with millions of words, need to find top K words on the basis of occurrence.
2nd Telephonic
1. Given a list a1,a2,a3….an. Comparison between elements is given like a1>a2, a3>a5,
a4>a2…..etc. We need to find whether is there any situation that we can sort the list in to the
ascending order on the basis of comparison. Yes or No , explain the conditions
2. Given a string example : shoppingwithflipkartiseasy, Now we are given this string and a dictionary
containing valid words , now we need to break the sentence into words separated by space. Output :
shopping with flipkart is easy
Onsite
Coding Round
1. Need to write a fully functionally and working code for a problem statement. Problem is to write
the code for maintaining a directory for any organization where employee will have id, name, post
and manager as attribute. Basically two features need to be implemented: (a). Should be able to do
searching on the basis of name, prefix search for the name should also be supported, (b). For any
employee, we can get the list of all the subordinates which comes under him/her, like for ceo , all the
employees list should get displayed
3. Code should be extendable so that new attributes for the employee can be added
4. Approach for maintaining the structure and optimality in searching for required.
Face to Face
1. Given a file containing billions of words, need to find top K words. Other variations like the file
size is 100 MB and we can read only a chunk of data at a time, how to maintain that, etc
2. Given a series 2,3,4,5,6,8,9,10,……, here in this series all the numbers are present which have
factors only and only either 2,3 or 5. Need to write a node to generate nth number for the series . With
best approach and complexity
3. Given a Alien language, we have the dictionary of that language , but we have only very few
words, but they are all arranged in the lexicographical order. We need to first find whether we will be
able to get a alphabetical order or not, if yes explain approach
1. Most of the questions are on the cultural fit only, but they were tough
2. Situational and behavioural questions he asked, positive attitude and calmness is really required at
that time.
Finally few weeks later, got a call from HR and manager regarding offer and figures.
Many Many congratulations to the author. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-set-6/
Expedia Interview | Set 2
Written 50 questions all mcq:
1. questions on sql.
2. lot of threading and java exceptions
3. questions on sorting, complexity and comparison with other sorting techniques
4. Error output questions
5. DS questions
6. Increment and decrement operator questions
Many Many congratulations to the author. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/expedia-interview-set-2/
Fab.com Pune Interview | Set 2
Please find below my interview experience with Fab Technology Pune.
Round 1(Telephonic): It started off with general discussion about my current work and prior
projects.It consisted of questions from the resume like explain xpath,indexing,xslt.
The DS question was arrange an array such that when merged it forms the largets number possible.
Round 2(Telephonic): It began with telling about my self and why do I want to join Fab.
Then 4 DS qustions:
1. Sort an array of 0 and 1.
2. Sort an array of 0,1 and 2 .
3. Given a matrix with row and column sorted.Find a number in it.
4. Reverse a stack without additional data structure.
Round 3:(F2F):
1. Given a series of stock costs for a number of days.Find two days on which a person should buy and
sell stock for maximum profit.
(The solution breaks to finding two numbers in an array with maximum difference such that the
smaller number appears before the greater number) .
2. Given any pointer(it can be head or any other node) to a sorted cyclic linked list and a number
.Insert the number in the list without disturbing the order.All the edge cases to be taken care of.
Round 4(F2F):
1. Find median of two sorted arrays of equal size.
2. In an array,find two numbers having sum closest to zero.
3. Given a string,display all possible subsets.
4. Difference between overloading and overriding.
5. Can constructor be overridden.
6. Difference between primary key and unique constraint.
Round 5:(HR):
History of Fab and Why do you want to join FAb.
Source
http://www.geeksforgeeks.org/fab-com-pune-interview-set-2/
Telephonic
1. Need to find the least common ancestor for given two nodes
Fully functional code and covering all boundary conditions was required
Face to face 2
1. Given a number n where n means 0,1,2,3….n-1. Compute the no of BST which can be formed using
this range as input in any order
For both the problems full code with all the boundary conditions was required
Face to face 3
1. Rotate a 2D matrix by 90 degree, but here the matrix is stored in 1D form
2. Given a linked list which contains representation of any number, like for 1234, the representation
will be 1->2->3->4. Now we need to add 1 to the number, so that the output is 1->2->3->5
3. Then he asked me 1-2 questions for which I immediately responded the solution, through that he got
the idea that I already know the solution
4. Moved to the white board, he draw a matrix, each contains only 0 ad 1 but in sorted manner. I need
to return the row which is having the max no of zeros. Then he asked me optimized solution for
finding the first ‘1’ in the array
5. Then he explained me a production line problem, Many factors were involved in that, robotic arm
need to draw some lines with various colors on some wall. We need to minimize the cost of drawing
those lines, Code was not required in that situation, as the problem set was very big, but we
discussed the complexity plus solving procedure for each of the factors of the problem. Every minute
detail of how will I solve the problem.
Basically problem itself was composed of many different types of sub problems, keeping mind open
at that time is very important.
Then after few days, I mailed the HR regarding the result, she told me one round is still pending, will
update soon and after 1-2 week, they sent the mail for halting the process, didn’t get any solid reason,
as it was totally unexpected, all my rounds went well.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-80/
Google (Mountain View) Interview
About myself : I was contacted on Linkedin by a google recruiter. I have 4 years of experience.
Phone screen
Warm ups
1) Manually calculate bits in 146
2) Tell difference between big endian and little endian
Actual questions
1) kth largest element in array
2) Find minimum number of steps to reach the end of array from start (array value shows how much
you can move). DP question
Onsite interview
Round 1
1) Design question based on storing images.Stress on performance and scale.
2) Divide number and return result in form of a string. e.g 100/3 result should be 33.(3) Here 3 is in
brackets because it gets repeated continuously and 5/10 should be 0.5.
Round 2
1) Median of stream of numbers
2) Question like pancake sorting where you can only swap to sort an array of characters.
Round 3
1) Find count of a number in sorted array.
2) Design two player battleship game to be played over internet
Round 4
1) Design question based on wearable devices.
2) Draw a line on 2D array of boolean. You will be given start point and end point co-ordinates.
Round 5
1) Compare two documents(string array) based on n grams.
e.g doc1 – Today is Sunday.
doc2 – Today is Saturday
if n = 2 then number of duplicates is 1 (Today is)
if n = 1 then number of duplicates is (Today, is)
if n = 3 duplicates is 0
Final comments – You must do graphs, DP, string, array, bits and Link list questions from
geeksforgeeks.
Design questions are much harder to answer than it seems. Prepare hard for them.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/google-mountain-view-interview/
One97(Paytm) Interview Experience
Written 1 : Technical and Aptitude.
Written 2: Written Coding
Written 1 was Normal Written exam based on fundamentals of Aptitude and Computer Science.
Written 2:
Few Questions I remembered :
Q1 :
char a;
int i = 300;
a = &i;
a++;
*a=2;
printf("%d",i);
Q2 :
where CTRL+A, CTRL+C, CTRL+V each acts as one function key for “Select All”, “Copy”, and
“Paste” operations respectively.
If you can only press the keyboard for N times (with the above four keys), please write a program to
produce maximum numbers of A. If possible, please also print out the sequence of keys.
That is to say, the input parameter is N (No. of keys that you can press), the output is M (No. of As
that you can produce).
Q3 : Consider a Binary Tree not necessarily BST,Remove all nodes which don’t lie in any path with
sum>= k.
Q5 : Given an array of numbers arrange it in the form of a single number such that the concluded
number is
the maximum.
e.g. given : 99,8,76,45,66,9,7,33,5,42
O/P : 99987766654233
Sectional Cut-off for O/P and Coding Questions.
Marking was done against correct approach not the exact answers.
Round 1 (Technical):
Q1: How will you store 800 Million records in database.
Q2: Data storage of double and float differs in C/C++ and Java How is it ???
Q2: Transfer data between a program written in Java and C#.
Q3: I need to establish a network in which I will be sure of security ,How will you proceed
Q4: A and B are two sets Write a non nested query so that I can get the data in B but not in A.
Q5: 000…………..? 11111111111111111111…………….? Write a Program which find the index of
the
start of series 11111111…..?.
Round 2 (Technical):
Q1: Give your introduction along with your technical skills.
Q2: Explain your project “Stock Prediction”
Q3: I want to retrieve records from a table from date 1 – 15.I don’t want to use range Queries
Suggest the optimal solutions…
I suggest Indexing on date column.
He insisted on alternate ways.
“he said what you think you can do……”
Q4: What is Unique and NULL Constraint ?
Difference between Primary Key and Unique.
How many maximum records in Unique can be NULL.
Q5: Write Most optimized algorithm for finding a Word in sentence.
(I used Trie approach , he scolded me for not asking the sentence is sorted or not.. the used Binary
search.)
Q6: Difference between thread and process.
What is PCB ?
What is synchronization ??
What is Semaphore ?
Explain and solve Producer Consumer Problem using Semaphore ? What is Drawback here
What is monitor ? Solve Producer Consumer Problem using Monitor and explain pros and cons.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/one97paytm-interview-experience/
Amazon Interview | Set 81 (For SDE-I)
Hello Geeks, I had interview in amazon few days before. I’m sharing you my experience. It was for
SDE-I Profile for Hyderabad(India) location.
Q2. Convert the BST into sorted doubly linked list. In this question also you will have to write a
function.
Eg 1 2 3
4 5 6
7 8 9
later they extended this Question…If there is only one node and give many conditions.
Q2. Given a Binary Search Tree and two nodes find parent node which is parent of both nodes in a
given binary search tree. Later the they extended it to simple binary tree.
Round 4: F2F-I
Q1. Is given n-ary tree is Sum tree or not? implement function…
Round 5: F2F-II
Q1. Vertical traversal Order of tree(implement it).
Q2. Lots of discussion on project.
Round 6: F2F-III
Q1. Given a circular array and a pointer find the given element in the array.
Round 7: F2F-IV
Explain:
1. Customer Producer problem,
2. Semaphore
3. Deadlock how to solve it.
Q: Favorite Sorting Algorithm.why,where to use it? and various question on the sorting algorithm
which I answered.
Every time they ask for time complexity for code. Ask to optimize my solution.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-81-for-sde-i/
Amazon Interview | Set 82 (For SDE-2)
Round 1 (F2F):
1) Find the merge point between two lists.
2) Given a sorted array find the number of BSTs you can form.
Round 2 (F2F):
1) Discussion projects i have worked on.
2) Given millions of files process them sequentially in multiple stages and make sure it has good
scalabilty, error handling, elegantly handles changes to the system. etc.
Round 3 (F2F):
1) Given a matrix with each cell containing each number of candies, and a constraint that you can
move only right or down, from the top left corner to the bottom right corner, find the path that gets you
maximum candies.
2) Convert a Binary tree to its mirror in-place.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-82-for-sde-2/
Amazon Interview | Set 83
Written (50 Minutes)
Face to Face 1
Design MP3 player which would play only unique songs in random order from given list of
songs
Code : Print left and right most elements at all levels of a binary tree.
Max elements in sliding window of size k over int array of size n.
Face to Face 2
Face to Face 3
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-83/
First Round :
1. Asked Why Amazon?
2. Asked some questions on resume.
After some friendly talk, jumped on technical but easy questions :
1. Implement BFS.
2. Difference between Dijkstra and BFS.
3. Given a linked list, find out if the list is circular, also find the point from where the cycle start.
4. Given an array, find the max sum over a sub array.
5. If you have two eggs, how many max steps you need to find the floor, from which the eggs break.
And some more easy questions.
First Round :
1. Asked about heaps, given an array, tell if it is min heap, if not, apply operation min-heapify.
2. Is a heap a complete binary tree?
3. Asked What is hashmap.
a. What happens when two numbers map to same key?
b. how does chaining work?
c. What to do when you have a bad hashing function, and only we can modify the structure of
hashmap not hashing function?
d. What do to when you your hashmap is filled completely (as in all the linked list are filled up to
their capacity)
4. What is quicksort? Implement for a linked list and tell complexity.
Second Round :
1. What is quicksort?
a. What is complexity when all elements are sorted and how can you improve it? (Randomization)
b. Will randomization work when elements are same?
c. What algorithms sort equal elements in O(n) time ?
d. using the information, how can you improve quick-sort? Think about it, its good. Don’t want to
spoil it for you by writing answer here.
e. implement this modification.
2. Given two river banks (visualization : two parallel lines), one bank has numbers written (1….n) in
sorted order. On the other bank the numbers (1…n) are arranged randomly. A bridge can be formed
from the ith point from bank 1 to ith point in bank 2. Find the max number of non-intersecting bridges
you can form?
3. Given 1…n , and given some statements like i hates j, then find some arrangement of n numbers
such that if i hates j then in the arrangement i comes before j. Say 1 hates 2, then 123456789 is
acceptable but 213456789 is not.
4. Asked about internet. What happens when you type a URL on your browser?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-84/
Amazon Interview | Set 85
1st Telephonic round
Some c/c++ question what is malloc how does it work and memory layout and allocation related
questions
1. Write a program to find longest repeating substring In a given string running code were required
covering all base cases.
2. U have given 10 files and you have given a string suggest data structure which ll facilitate
efficient search of string in the file if string appears more than ones in that case u have to print
line number and file in which they appear.
After 15 days I got cal that I have cleared the telephonic round and my F-2-F interview is going to
take place in Hyderabad
F-2-F round 1
1. Write a program to print a tree in vertical order asked more than one approach to do this
problem and modified problem many times.
2. Write a program to convert a tree to doubly link list in post-order fashion only change of pointer
are allowed that is left pointer can work as previous and right pointer s as next.
Few question related to OS what is deadlock, Race-condition, Semaphore and many more, few
question Related to DBMS what is Normalization define all normal forms(I directly told him I don’t
remember I read it in 5th semester )
1. Why amazon??
2. Why do u want to leave company XYZ.
3. Your biggest challenge till the date.
4. Many project related question.
Data structure
1. U have given 10 files each having 1 million integer in sorted order, physical memory have size
of 3 million suggest method to extract 1 million integer in sorted form efficiently.
2. Write a program to convert a decimal number into binary your code should work on both big
endian and small endian machine. U have given a variable which tell u whether machine is big
endian or small endian
DBMS and few bar raiser question made this round average L
F-2-F round 3
1. You have given an n-ary tree write a program to check whether this tree is sum tree or not.
2. Given an array write a program to find kth smallest element in the array. He was hardly
interested in the solution he just want to know how many ways u can solve it solved using 5-6
method at the end he was satisfied with the answers.
F-2-F round 4
Longest one….this interview went on for 1 hour and 30 minutes but was interesting one(interviewer
looked lyk a frustrated guy…some tyms I felt that he is going to punch me :P)
1. You have given M array each of size n all array are sorted separately write a program to make a
big sorted array of size m*n . during discussion he told me to prove many lemma like height of
tree is log(n)( for n elements) sum of n natural number is (n*n+1)/2 and many more. He modified
problem many times don’t use extra space do it in space etc. discussion went on for almost 1
hour but at the end he was happy with the solutions(I suggested 2 method and further
optimization in them.
2. U have given an binary matrix which is sorted row wise and column wise write a program to
search a row in the matrix having maximum number of zeroes.
Finally this interview also went well he was happy with my performance
After 2-3 days I got mail from the HR that I m rejected LL reason was bar raiser … 1 advise to all
don’t take BR round lightly it does not matter how well u performed in other round if u didn’t do well
in BR round then there is no way u can make it. An average round tech interview is fine but average
BR round means rejected.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-85/
Amazon Interview | Set 86
This is an account of my recent interview experience with Amazon. My process started off at one
their hiring drives. It was a tiresome process that comprised a written round followed by six rounds
of interview, spanning around 37 days.
2. Given a sorted array of numbers. Construct a balanced binary tree with the numbers in the Array as
keys.
3. Given a sorted Array of numbers that has been rotated by a few positions, write a function to
search an element in the Array.
Round 2 (F2F):
1. Given a binary tree in which the node structure has an additional field called “next” which of
pointer to tree node type, fill up this field of each node to point to the next node at the same level
(NULL if last node).
2. Sort an almost sorted Array. An almost sorted Array being an Array in which a number is at the
most k positions away from its position in the sorted Array.
3. You are given a 2D grid in which each cell is either empty, contains an entry “D” which stands for
Door, or an entry “W” which stands for wall (Obstacle). You can move in any of the four directions
from each empty position in the grid. Of course you cannot move into a cell that has “W” in it. You
need to fill each empty cell with a number that represents the distance of the closest door to that cell.
(They asked me only for the Algo as there wasn’t much time).
Round 3 (F2F):
1. Given a 2D (Rectangular) grid of points. You need to find the shortest path from a given source
point to a destination point. You can only move up or right. Now among these points, there a few
special points from which you can directly jump to the diagonally opposite point (Top-Right
diagonal). You are granted a function which when invoked on the point returns 1 if it is a special point
and 0 if it is not.
2. You are given a sequence of black and white horses, and a set of k stables numbered 1 to k. You
have to accommodate the horses into the stables in such a way that the following conditions are
satisfied:
a. You fill the horses into the stables preserving the order of horses. For instance, you cannot put for
horse 1 into stable 2 and horse 2 into stable 1. You have to preserve the ordering of horses.
c. Take the product (number of white horses * number of black horses) for each stable and take the
sum of all these products. This value should be the minimum among all possible accommodation
arrangements.
2. Given a parentheses string, determine if it is a valid / legitimate parentheses string. For strings
consisting of single parentheses type and those consisting of multiple types.
2. Given a floor of dimensions 2 x W and tiles of dimensions 2 x 1, write code to find the number of
ways the floor can be tiled.
3. Given a graph, if we were to print all nodes within k hops of a given node, which algorithm would
we use, the answer to this was obviously a Breadth first search. He followed it up asking, if one were
to use Depth first search instead to code this problem instead, one would encounter bloated running
times for Graphs with certain attributes (Perhaps Dense graphs or some such). Describe what types of
graphs would a DFS algorithm falter with and why.
2. Describe multithreading.
3. Describe all the processes that happen between you typing in a URL and the webpage appearing on
your screen.
4. What is a singleton set What is the data storage model (Data structures) used to store records in a
relational Database.
5. Given an Array containing numbers between 1 to n, out of which 1 number is missing, find the
missing number.
6. Given a sorted Array and a number, print all pairs of numbers in the sorted Array that sum to the
given number.
I got the confirmation call the same evening that I had the telephonic interview. GeeksForGeeks is a
godsend for interview aspirants aiming at top companies. Keep up the outstanding work guys,
your website has shaped careers and lives. J
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-86/
[TopTalent.in] Top College: No, Top Talent:
Yes ; Anudeep cracks Google
Anudeep
Nekkanti embodies the old adage – there is no substitute for talent. The 21-year-old coder from
Samalkot (a small town near Vishkhapatnam) has landed an offer from Google, Zurich.
What makes Anudeep’s feat commendable is that he was not placed out of the cream colleges of the
country. No he is not an IITian, NITian or BITSian! A B.Tech student in computer science from Anil
Neerukonda Institute of Technological Science, Vishakapatnam, he considers his preparation and
performance in programing competitions the reason for his success at cracking the google interview
process.
We at toptalent.in had the opportunity to interact and pick Anudeep’s brain to gain valuable insights
into developing the right skills to be successful at getting recruited at Google.
Anudeep: It always feels great to achieve something rare. I was happy after knowing about it, but the
real joy was after knowing how much my parents and well-wishers enjoyed the news. There is a lot
of hype about being Googler, excited to see what it is really. Also excited about Zurich and Swiss
chocolates
Toptalent: What made you chose your particular college and course?
Anudeep: I did not know about IIT-JEE or AIEEE. I did not dream about joining particular college. I
almost never took decisions back then. My dad is cool, he does not believes that education is
everything and he did not want me to only concentrate on studies. So, when joining 11th standard, he
asked me if I want to opt for JEE training. Not knowing what it is, my initial answer was yes but then
he realised that I had no knowledge of what I was getting into and made me change my mind, and I am
grateful to him for that.
My EAMCET (State board common entrance test) rank was in the seven thousands. I had never lived
outside of my town. So I wanted to stay away in a city and study, at the same time I did not want it to
be too far from my home. Visakhapatnam was the best choice.
Initially I was supposed to take Electronics. My sister, who had finished B.Tech in computer science
by then told me “CS is easy, you can start preparation one day before exams and clear them”. Well, I
was looking to enjoy a lot in engineering and this line was perfect! It had so much impact. I just
decided to take Computer science. It turned out to be one of the best decisions I have taken. CS is not
easy, it is fun!
Anudeep: Telephonic Interview initially. Then six onsite interviews at Google Hyderabad, then
manager interviews.
Toptalent: Can you give us a brief account of what you felt was the toughest interview?
Anudeep: Hard to pick a single interview. Of the eight rounds I had with Google, couple of them
were tough, one of those rounds lasted two hours on a single question.
Anudeep: I did not prepare on anything specific for Google interview, I knew that my strength is
algorithms and data structures. I did not want to read about other topics only for the purpose of job. I
was hoping that only algo related stuff was asked. I was lucky with Google, all my interviews, all the
questions were related to algorithms, data structures and programming.
Toptalent: What kind of skills do you think helped you getting this job?
Anudeep: It is competitive programming. I should say I was lucky about it. It is true that majority of
hiring is biased towards competitive programming. One can clear these interviews by having good
knowledge only about algorithms and data structures. Open source contributions, projects and
machine learning are 3 other skills I would list.
Toptalent: Tell us a bit about competitive programming and how you became good at it.
Anudeep: It is similar to any other sport. One need to have a lot of interest to perform. One need to
put a lot of effort to top. We say someone is ‘out of form’ or ‘in form’ in sports, true for competitive
programming too, you need to keep doing them to be in good touch. And most importantly, at some
point of time you realize that ‘This sport is not correct for me’, it can be true with programming too,
and when this happens do not hang on to it, move on there are lot more things to do. How did I
become good at it? I played it a lot. Concentrated practice is all that matters.
Toptalent: What resources did you consult? Where did you practice problems from?
Anudeep: Firstly, I solved about 300 problems on SPOJ (Sphere Online Judge). I came to know
about online judge for the first time in 2012 Jan. That was because of IOPC (programming contest by
IIT Kanpur).
Practice was my mantra. I used to try a problem for 2-3 hours. If I didn’t get it, I looked for solutions
on forums. I read few tutorials on TopCoder, but I did not know that TopCoder also has algorithm
problems. I participated in following August’s long contest, I was lot better this time, I could solve 7
problems. Ended 35th in Global ranking.
With this limited exposure to programming I went to participate in ACM ICPC Regionals. I could
solve 4 problems there at onsite. I then understood that knowing how to solve is not enough, it is the
ability to think and code fast is more important.
By August end I solved about a hundred and eighty 500 pointers. I slowly started to think
dynamically. By then I was able to solve four out of five problems. Now I am quite comfortable with
500 pointers. So, to conclude all that matters is sheer practice.
Programming is fun, programming is easy. My failure at IOPC 2012 made me start it. I thought, I will
do well in IOPC 2013 and stop programming. That is how I started it. Very soon I started to like it,
then I got addicted to it. I enjoy the feel that I get when I see “Accepted”. That awesome green color.
My heart beat raises whenever I submit a solution. I get goosebumps. It was that fun that kept me
going. Don’t do it, Play it. Enjoy it, it is a fun game. After 21 months, I am still deeply in love with it.
Right now I am preparing for world finals. I am doing problems from various on-line judges like
Topcoder, Codechef, Codeforces.
Anudeep: No. I did not mention much about my grades in my CV. My CV only says B.Tech 4th year, 8
CGPA till date.
Anudeep: I had to risk my job for Zurich. I was initially offered London, Bangalore and then
Hyderabad. I told I do not want to take those position, and was in a situation of being completely
rejected by Google. But I was okay with that too so I told no to those 3 positions. 70 days after my
onsite interview I was finally given Zurich.
Toptalent: Whats your advice to students who are aiming for similar placement offers as yours?
Anudeep: I see that a lot of Indians are putting a lot of effort into competitive programming (mainly
for placement offers) with not so good results. Trust me, do it with complete concentration for a
month, by then you will exactly know if you have to continue in this field or not. If you feel you should
not continue, stop it, do not hang on to it hoping for offers. Use your time on other stuff.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/top-college-top-talent-yes-anudeep-cracks-google-1-44cr-package/
Flipkart Interview | Set 7 (For SDE II)
Online Coding round
1. Find all the Node at the distance K from a given node in a Binary tree. Print them in any order.
2. Design a LRU cache.
Eg
1->3->30->90->120->240->511
0->3->12->32->90->125->240->249
You can switch at 3 90 or 240 so the max sum paths is
1->3->12->32->90->125->240->511
2. Design a contact list for a cell phone which can add & search really quick and is scalable.
ONSITE INTERVIEWs
1. Design a Synchronized Message broker queues. How will you handle various situations like one
queue is down, automatic failover, active master selection, handling acked and unackedmessages.
2. Design a site like book my show. It was an open ended question so I concentrated on inventory
management. List all entities, classes objects modules and their interactions.
3. Design a secure Card storage system. Again open ended but the concentration was on encryption
and decryption
4. HR round. What are your strength and weaknesses, what did you do that made you happy. What
was your best contribution till date.
5. Design a Traffic signal . List all entities and classes involved. How will you handle pedestrian
crossings etc.
6. Design a game of tic tac toe, handling winning situation etc. NXN, multiplayer, multiplayer with
synchronization, Disaster recovery, data analytics, SWOT of each approach.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-set-7-sde-ii/
Q2. You have a dictionary of words. Given a word, print all anagram are in dictionary . State the data
structure to be used to solve this problem.
Q3. What the different issue in multi-threading ? What is the difference between mutex and
semaphore.
Q4. You have a file with million words in it. Find most frequent 10 word in that file. Node that you
can store all word in memory.
(Note : Min-Heap + List )
Round 4 :
Skipped …
Round 5( 2h 30 min)
===================
Q1. You are given a Text, where all space, full stop and all punctuation mark is removed. You want to
reconstruct the text by putting spaces between words.
A dict is given and following API is also given.
a) Decide if the text can be converted a sentence with valid words or NOT.
b) Find how many way you can do the reconstruction of the text.
c) Find what is the minimum number of space can be used for this reconstruction.
d) For case (c) find out the indexes where you suppose to put a space.
e) Now recover the text to sentence in place .
Subsequent Question:
1. Why Greedy technique will not work for this?
2. yes ! Backtracking will work, what is the problem of using backtracking ?
3. Illustrate and explain how the solution is contracted from the Dynamic table ?
4. Write the correct working code for (c),(d),(e).
Q2. Given a BST, find out the minimum length form root to leaf with sum S. Note that:
a) Path from root to leaf node.
b) Sum of node of the path is S.
c) if multiple such path exist, print minimum length path.
d) What is advantage of BST rather than BT used for this algorithm, how it improve the performance.
in BST, is it required to explore both side ?
e) Write working codes for it.
Status: Selected ! (The interview call was for SDE-I, but they offer me for SDE -II(L61) position)
Many many congratulations to the author. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-set-27/
Shreepartners Gurgaon Campus
Recruitment
Written was mixture of technical and aptitude. Aptitude tests covers few questions on numbers,
reasoning and probability.
Coding Questions
1. Given a sorted array, print any two numbers equal to a given number.
2. Write optimized code to find x to the power of y.
3. Given an array of n numbers, divide the array in 3 Lots in such a way that the difference
between the lots is minimum (I gave sort the array and then divide into lots by taking elements
from each list for e.g. 1,2,3|4,5,6|7,8,9 take them like (1,6,7),(2,5,8),(3,6,9)).
4. Write a program to print the matrix in alternating rectangle of 0’s and X’s.
5. Write a program for searching for number of occurrences of a word in file.
Technical :
Solution written in the test for coding questions was asked to elaborate and asked to do the necessary
optimizations if possible.
Q1. Difference between abstract classes and Interfaces
Q2. What are time sharing systems.
Q3. Important Concepts of OOPS (Inheritance,Encapsulation)
advantage of OOPS over other Languages.
Q4. CPU Scheduling Algorithms
Q5. Write Recursive and Non-Recursive Factorial Program.
HR:
Simple Questions were asked:
Q1 . Introduce Yourself
Q2. Your area of Interest ?
Q3. Why shreepartners ?
Q4. Travelling to gurgaon will be possible or not ?
Q5. Will be able to work late ..
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/shreepartners-gurgaon-campus-recruitment/
Oracle Interview | Set 5 (For Server
Technologies)
1st there was a online assessment. Oracle finance and oracle server, both had almost the same
paper..4 sections..
1) eng
2) apti
3) basic technical
4) advanced technical
1) Technical round (20 mins) – Reversing a linked list , level order traversal of tree, a simple puzzle
was asked.
2) Technical Round (45 mins) – here a lot of question were asked.. Threading, paging (OS)
queries, join, indexing (DBMS)
B+ tree, loop in a linked list (DS)
String reversal using recursion
Other questions I don’t remember yo be honest..
3) Managerial round (20 mins) – Asked about Object oriented programming, Networking(all basic
definitions).
Then there was an informal discussion about the company, its products, etc.
4) HR round (50 mins) – it was a stress round. HR will cover every point in ur CV and grill you.
Just be confident and keep smiling.
P.S. – if you don’t know something, just say sorry sir..I don’t know this topic..they will move on..
N if you get stuck while answering tat question..they will keep asking u questions on that topic..
Thanks a ton to geeksforgeeks. Without them, it would not have been possible for me to crack this
one.
Many many congratulations to the author. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/oracle-interview-set-5-server-technologies/
Amazon Interview | Set 87 (For SDE)
I recently cleared the Amazon SDE position. Through out my prepration GeeksforGeeks played great
role, this is the only site which i referred/followed more than 90% of the time during preparation
phase.
Example- Input 12 15 22 09 07 02 18 23 27
Output 15 22 27 18 18 18 23 27 -1
2) Given a link list and input int K, reverse the link list in K size slots
Example Input 12--> 13--> 3--> 20--> 55--> 87--> 20--> 77--> 90 Lets k =3
Output 3--> 13->12--> 87--> 55--> 20--> 90--> 77--> 20
3) Given tree and input int K, Print the nodes that are k distance way from leaf.
Input is below tree and k = 3
1) Given a infinite string of O’s and 1’s respectively. You need to find the transition point from 0 to 1.
I gave the native solution in O(n). He told to optimize more. Direct binary search can’t be applied on
it because string was infinite and length of string was not given.
I told that i will divide the string in 10 size slots it will reduce complexity. Still he told to optimize
more. I told i will increase the slot size in power of 2 like 2,4,8,16,32. he was satisfied with that.
He again complicate it by adding that now my string contain 0, 1, 2 in sorted order. You need to find
transition point from 0 to 1 and 1 to 2. i provided the approach.
After that told this time i want to make it generic. String can contain 0 to n(input) number find all the
transition point. I solved it, he was satisfy with approach and told me write code for it.
1) It was bit difficult for me to crack, She stated asking from java cloning, which was my weak area.
Given a class which contain string Name and reference to person friend, clearly shown below.
Class A {
A(String str, Person P { //Constructor
this. name = str;
this.friend= P ;
}
// override
Clone() {
// code for this function was expected from me
// which can produce the deep copy
}
}
2) How to find the last nth element from singly link list, its was very easy for me.
Solved in 2 min and wrote the code quickly.
3) Given a sorted array of number , value K and value X, find the K nearest number to the value
Example: Input 12 16 22 30 35 39 42 45 48 50 53 55 56 K = 4 X = 35
Output 22 30 39 42
Interviewer was running out of time because 1st question took huge time. So she told to tell only the
approach, code was not expected.
Interviewer was of friendly nature. He was very senior and very cool guy. Started with my project
question and then some behavioral question and in last one technical question
1. What is your current project, What value you added in your project till now.
2. What challenges you faced while working in project and how did you overcome.
4. If you have the option to go 3 year back in life, then what would you like to change in life, means
which skills and steps/decision you want to gain or change.
5. What you did in past on which you feel proud.. blaa blaa….
6. Given a tree, how will you find the vertical sum of nodes
I gave the solution using Hash map, but he was not satisfy with answer. He told to gave other
solution because Hash map will increase the space complexity. I used array solution which was
increase time complexity, then i used circular link list and finally solve it using doubly link list.
He was satisfy with solution. Told me to code for it.
1. Started with my project details, my project was in android mobile, so he told me to design a
“Contact application”. Class diagram and their relationship was expected from me. What all
design pattern you can use in that.
2. Explain inheritance and Base class is given you need to stop exposing the base class methods
without touching the base class at all. It was really tricky. question i liked it.
5. He also started asking some networking question. Like TCP/IP, socket connection.
6. How the chat between 2 user work internally, internally how the packets flows between layer.
And suppose user A send “Hi” message to user B and user B just shutdown the system. What
will happen in that case.
4. What new code you implemented and how much impact it put on other.
5. Given a tree, write the In-order traversal. I wrote in 2 min using recursion.
Next addition was, can you write it using iteration tried and wrote some buggy code.
He started checking and told the bug and told me to correct it. Even-through i solved the same
question at my home, Still it was not clicking my mind. I started correcting it but failed. After
that interviewer gave one hint. I used the hint and solved the whole code again. He was running
out of time so took the code sheet and told i will check it later in free time.
Refer this link for actual solution and proper understanding of last question
Many many congratulations to the author. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-86-sde/
Pilani Soft Labs (redBus) Interview
I had three technical round of interviews. Two were telephonic followed by one skype interview with
the team leader.
1st Round
->Whether a number is prime or not
->Reverse an array in O(N) time
->Bubble Sort
->Reverse Linked List in O(N) time without using any auxiliary space
2nd Round
->Explain one of your projects. Cross questions on them. Then he modified the original problem
statement and asked to implement the same.
->1000 people standing in a circle. 1 kills 2, 3 kills 4, 5 kills 6 and so on. Who will be the last
person alive. Code to implement the same.
->Implement the entire RedBus website from the Home page to Payment Gateway page.
Approximately 45 mins of discussion on the same and cross questions. Data Structures to be used at
every point and stuff like that.
->How to find second last element in Linked List
->How to find middle element in Linked List
->Program to segregate 0 & 1 in an array with O(N) complexity and compute total number of
iterations.
Finally, my candidature was accepted. Thank you GeeksForGeeks for providing a centralized
platform to prepare for such interviews.
Many many congratulations to the author. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/pilani-soft-labs-redbus-interview/
F2F2:
After all the discussion in the previous round, he wanted me to design a new payroll system using
OOPS principles.
Aftermath:
They seem to consider me for their ERP product Oracle Fusion apps HCM as i have domain expertise
in payroll. Offer letter of Oracle takes its own sweet time of 2-3 months.Meanwhile, I took interview
with Amazon and made it.
Many many congratulations to the author. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/oracle-interview-set-6/
Amazon Interview | Set 88
Online Test:
Questions regarding processes in OS(how it is represented in memory like code segment, data
segment, stack , heap), garbage collection , stack and heap , what happens when a URL is entered in
browser and then proceeded to 2 programming questions
1. Given a BST, transform it into sum tree where each node contains sum of all nodes greater than
that node.
2. Shuffle an array
Onsite F2F 1:
Started with general introduction , asked about my work , know any design patterns and where you
applied them in your project etc.
He asked a single question to design a single stack with push , pop and pop mid operations , followed
by working code.
F2F2:
Again started with general introduction , work i do , then he gave a question about finding count of
each occurrence of words in a document.
I gave hashing based solution (with working code), it lead to a great discussion on hashing , then he
led me to give a solution with tries . As much time is not left he asked me to tell the approach only.
He asked me a question to connect siblings at each levels of a binary tree , as i knew this question
already. He wanted working code. After i gave the code he found a bug and i found one myself.After
resolving the code he moved on to different question.
Next question is optimal implementation of 3 or more stacks in a single array.I gave some approached
based on heuristics and with extra memory.He dint seem satisfied and then asked many questions
about work i do and grilled me on many aspects.
Asked me to design Automated Air traffic controller system . Gave me few requirements , made me
identify classes and its members , and some high level code for identifying probable aircraft
collisions.
He asked me about situations where i missed the deadlines and learnings from it , How do you build
trust with Customer .
Then i asked him few questions like What specific qualities you look for in a potential candidate ,
How an SDE can contribute to Amazons claim to be most customer centric company and any concerns
about my employment background (as i am working in manufacturing industry currently).
Interviews were held on friday , i got a call from HR lady on Tuesday following week.
Some tips:
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-88/
Interview experience in SRI, Bangalore
General Questions asked for SDE-1 in Samsung Research India Bangalore:
3. OOPs concepts
5. big n small endian –> how to know a m/c is small or big endian?
7. STL
12. Constant n static fxn n var : difference, use n wats behind d scene?
13. Interfaces
19. Which SDLC model to be used where and y? –> scenario based
24. http://www.geeksforgeeks.org/software-engineering-lab-samsung-interview-set-2/
28. Threads
32. http://www.geeksforgeeks.org/memory-layout-of-c-program/
33. deque
I apologize that I do not remember the questions as asked according to the interviews but this was
pretty much it. I got through and I wanna thank Geeks for Geeks for it.
Many many congratulations to the author. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/interview-experience-sri-bangalore/
Amazon Interview | Set 89
Online round:
1) Program to check if two rectangles overlap.
2) Program to find if a given string, say S, contains another given string, say P.
3) Write a program to check if the coins can be summed up to a given number, if yes print the coins
that sums upto the given sum.
Telephonic round:
1) Given a singly linked list, modify the value of first half nodes such that 1st node’s new value is
equal to the last node’s value minus first node’s current value, 2nd node’s new value is equal to the
second last node’s value minus 2nd node’s current value, likewise for first half nodes.
Ex:
1) 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7
Modified list:
6(7-1) -> 4(6-2) -> 2(5-3) ->0(4-4) -> 5 -> 6 -> 7
2) 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8
Modified List:
7 -> 5 -> 3 -> 1 -> 5 -> 6 -> 7 -> 8
Modified tree:
a
/ \
c b
/ \ / \
d e f g
/ \ / \ / \ / \
o n m l k j i h
Round 2:
• What happens when we enter the url in the browser?
• Difference between inner join and outer join.
• How does the garbage collector works in java?
• Questions on stacks and heaps(memory management).
• We have n gold coins. We need to amalgamate all the n coins to create one single coin, we can
merge two coins at once. The cost of merging two coins is equal to the value of those coins. How do
we ensure that the cost of merging n coins in minimum.
Ex: 5 ,8 , 4, 3, 9, 6
We will merge 3 and 4, cost=7 {Remaining coins: 5,8,9, 6,7}
Then we merge 5 and 6, cost=11 { Remaining coins: 11,8,9,7}
Then we merge 7 and 8, cost=15 { Remaining coins: 11,15,9}
Then we merge 9 and 11, cost=20 { Remaining coins: 20,15}
Then we merge 20 and 15, cost=35 { Remaining coins: 35}
Total cost: 7+11+15+20+35 = 88
As we can see that the cost is less in the first case. Program to get the minimum cost of merging all the
n coins.
• Replace BST nodes with the sum of nodes greater than or equal to the node.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-89/
Flipkart Interview | Set 8 (For SDE 1)
Applied through LinkedIn
Given a similar representation, you have to print reverse level order traversal of the corresponding
tree.
Level order traversal of a tree is where we traverse levels of tree one by one.
Eg –
For the above given tree, level order traversal would be –
0
12
34
And hence, the reverse level order traversal is –
34
12
0
Telephonic Round 1
=====================
1. Find the square root of a given integer. e.g 27 output should be 5, for 32 output should be 6.
2. Given a 2D matrix of integers find the maximum sum path in the matrix.
Telephonic Round 2
=====================
1. Given a number n, find the largest number small than having the same digits as of n. E.g. 231 output
will be 213.
2. Given a long stream of numbers find the largest k numbers at any given point.(I told him I know the
question and told the solution, he moved on).
3. Given k arrays of sorted integers, find the minimum range which contains the number from each of
the k arrays.
e.g. {-1,4,7},{5,9,15,23},{8,24,25,31} output should be 2 range of {7,8,9}
4. Given a binary tree find all the nodes at k distance from a given node.
45 minutes of time was given and running code was asked. Interviewer first asked the approach and
then after coding he reviewed the code thoroughly.
Thanks to all the contributors of GeeksforGeeks for bringing up this helpful platform for us. Hope to
contribute further.
=========================================================================
Many many congratulations to the author. If you like GeeksforGeeks and would like to contribute, you
can also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-set-8-sde-1/
[TopTalent.in] Exclusive Interview with
Prashanth from IIT Madras who landed a
job at Microsoft, Redmond
Armed with a dual degree from IIT, Madras, and a very strong resume, Prashanth Srikanthan was
destined to land a lucrative offer from one of the big recruiters. So when Microsoft came calling he
converted his potential into a Rs 60 Lakh package as a Software Engineer. TopTalent.in brings you his
opinions and advice about dealing with interviews.
TopTalent: How does it feel to be selected by Microsoft?
Prashanth: It felt good to be recognized for the effort put in. It was definitely a proud moment to be
hired by a company with such a rich history. After a few years of lacklustre activity in the spectrum of
consumer products, I believe Microsoft is finding its way again, so this is an exciting time to join the
organization.
TopTalent: Which companies did you get an offer from apart from Microsoft, Redmond?
Prashanth: I received an offer only from Microsoft Redmond. I was interviewed by Google MTV
(Mountain View), Epic Systems Wisconsin and Oracle California besides Microsoft Redmond. My
interviews with Oracle were left incomplete due to lack of time. Although I had excellent interviews
with Epic Systems, I asked the HR to not extend an offer to me as I was uncomfortable with the fact
that they had an office only in the US, and therefore being unlucky in the H1B-visa lottery would make
the job offer worthless for at least a year.
TopTalent: Can you give us a brief account of what you felt was the toughest interview?
Prashanth: I think toughness of an interview is subjective to a certain extent. Having said that, the
toughest interview for me was undoubtedly the final interview for Google MTV. They asked me a
challenging set of questions, mostly open-ended. Overall, I would say Google had the toughest
interviews.
Prashanth: Preparation aimed specifically towards interviews was done in the 3-4 months leading
up to the placement season. Apart from the resources I consulted, I also asked a couple of friends to
suggest problems to think about during my free time. Whenever I encountered an algorithmic problem,
I would try my best to solve it without consulting the web or a friend. Then I would code it up, since
fast coding is often a great advantage during placement interviews.
TopTalent: What resources did you consult? Where did you practice problems from?
Prashanth: I read a few chapters from “Cracking the Coding Interview” by Gayle Laakmann
McDowell, which I would suggest as a first resource for anyone appearing for a coding interview.
Besides the book, I used to look up online resources like GeeksforGeeks and Leetcode from time to
time. The tutorials at topcoder are also a fine resource. For a couple of years, I had been solving
problems from codechef, codeforces and topcoder sporadically out of interest which helped me break
into the mindset of an algorithmic problem solver.
TopTalent: What kind of skills do you think helped you getting this job?
Prashanth: The obvious answer is, first and foremost, algorithmic problem solving skills.
Additionally, I was working, at that time, on two significant, interesting projects which I was very
enthusiastic about, and spoke enthusiastically about them to my interviewers which I believe was a
non-trivial factor in creating a favorable impression.
TopTalent: What is your advice to students who are aiming for similar placement offers as yours?
Prashanth: For the interview questions, practice a lot of problems and don’t feel lazy to practice
writing code. In my case, the interviewers (from Microsoft and Google) were very interested to hear
about the research work that I had carried out and was planning to pursue in my final semester. I
would advise students to take an initiative to undertake projects that interest them, because it will
give you an edge in the interviews.
Prashanth: I spent a considerable amount of time preparing my resume. My rule of thumb was to not
exceed 2 pages. It is always a good idea to scrutinize your resume from the perspective of an
interviewer and ask yourself how you can make it better, more concise, more appealing. Never claim
to know something you don’t. Do not be afraid to deviate from a fixed resume template (that your
institute might suggest, for example) if you feel a different arrangement represents your case better.
Advertise your achievements and projects well, and be thoroughly prepared to answer questions on
every point mentioned in your resume.
TopTalent: Please add other details that you want our readers to know.
Prashanth: I want to emphasize a couple of points. First, always remember that the company you are
interviewing for wants to hire you as much as you want a job offer from them. Remembering this
simple fact helps in maintaining confidence and avoiding panic during the interviews. Second, never
try to deceive the interviewer. Try to be as honest as possible and if you do not know something,
admitting it is far better than any alternative.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/exclusive-interview-prashanth-iit-madras-landed-job-microsoft-
redmond/
Amazon Interview | Set 90
1. Phone Interview
a. Given sorted array in decreasing order. Find first occurrence of given key.
b. Find diameter of a binary tree.
6. Manager round
a. manager round HR questions. Team fit questions etc.
b. Given a mathematical expression. How to design this expression evaluator using OOPs concept.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-90/
[TopTalent.in] 51 Students from BITS get
into GSoC, Janani talks about her
experience.
Google has always been on the lookout for exceptional talent. They begin this search early with their
the chance to interact with a GSoCer, Janani Padmanabhan, who just completed her 2nd year of CS
Engineering. Here’s what she has to say about her experience.
Janani: Google Summer of Code, more popular as GSoC, is an annual summer program hosted by
Google. It provides an amazing opportunity for student developers to code their summer away with
great mentoring and a nice stipend. Every year, hundreds of open source organizations register with
this program. A GSoC aspirant is to submit a proposal to these organizations. If the proposal is
selected, he/she contributes to the organization under the guidance of an active member of the
organization who acts as his mentor.
Janani: I was born in Coimbatore, Tamil Nadu, but had the awesome opportunity of a tryst with a
variety of cultures, being always on move. Now I am in BITS Pilani, Hyderabad Campus, having
completed my Second Year of BE (Hons.), Computer Science. The areas of Computer Science that
constantly attract my awe and passion are theoretical computer science and scientific computing and
my chosen projects have been related to these fields. I have worked on approximation algorithms and
mainly Genetic Algorithms.
Apart from this I am interested in Finance and Creative Writing, duly being nourished by the college
which has given me the opportunity to be one of the directors of the finance club of the college and
also the editor in chief of the official Editorial Board of the college.
Janani: The selection process for Google Summer of Code is a pretty straight-forward one. Once the
list of participating open source organizations is out, we have to shortlist the organizations whose
purpose best matches with our interests, look into their functions and source-codes, contact their
active members and most importantly come up with a project that is in line with their aim and of
interest to the active contributors. We then submit a detailed proposal which the organization reviews
and then proceeds to select the projects that are of use to it. My detailed proposal can be viewed
here.
Janani: My project is with SciPy, a Python package commonly used for mathematical aspects of
scientific computing applications. I aim to improve the speed of spherical harmonic function, develop
ellipsoidal harmonic functions and to debug hyper-geometric function.
TopTalent: How much preparation did you put into this opportunity?
Janani: I took my own time to get acquainted with the mailing culture and the code base of SciPy. It
took 2 months to get acquainted with the organizations, to understand the direction of its development
and also to learn and familiarize myself with version control systems like git. Then my focus was to
develop the proposal and refine it based on the inputs from the prospective mentors and other active
members.
TopTalent: What is your advice to other students looking for a similar opportunity?
Janani: Basically, we need interest and perseverance to make it through. Open source coding,
documentation and mailing etiquette is not something we have in our formal curriculum but it is
definitely a window to the actual coding world out there. It also allows us to meet some amazing
people across the globe. So, GSoC or not, I would advise all the Computer Science students to give it
a try.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks
Source
http://www.geeksforgeeks.org/toptalent-51-students-bits-get-gsoc-janani-talks-experience/
Amazon Interview | Set 91
I recently got interviewed with Amazon for SDE position for their Hyderabad office.
Round 1: (F2F)
1. Discussion around current company and work I was doing there. Why Amazon?
2. There is a robot standing at first cell of an M*N matrix. It can move only in two directions, right
and down. In how many ways, it can reach to the last cell i.e. (M, N). Discuss all the approaches
and then asked to code it.
3. Remove the nodes in the binary tree for that the sum of all values from root to leaf is less than K.
Round 2: (F2F)
Round 3: (F2F)
Round 4: (F2F)
1. Given an array of size N= k*s. In this array, construct blocks of k size each (Number of such
blocks will be s). Now find all combinations of these numbers such that difference among the k
numbers in the block should not be greater than d. e.g. N=6, k=2, s=3 A={2,4,6,8} and d=2. So
the answer should be 2 {{2,4},{6,8}},{{4,6},{6,8}}.
2. Given a binary tree with usual left and right pointers and one additional pointer called adj.
modify the tree in-place such that adj pointer should point to the right node in same level as
current node or if it there is no node right to it, adjshould be NULL.
Round 5: (F2F)
1. How many Binary Search trees can be constructed using sequence of N numbers? Write Code for
it.
2. How many cycles of length 3 can be constructed using edges of aundirected graph?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-91/
[TopTalent.in] Interview with Rishav who
got a job offer from one of the core
companies, Qualcomm
Engineers from core branches like Electronics, Mechanical, Chemical today are often
found chasing lucrative employment in fields like IT and analytics, areas unrelated to what they spent
four grueling years studying. But Rishav Rej of BITS Pilani, Hyderabad Campus decided to take the
road less traveled by. Armed with an impressive resume that included plenty of experience and
projects in his core branch, ECE, Rishav earned a place with one of the world’s leading
semiconductor and telecommunications company, Qualcomm. TopTalent.in brings you his opinions
and advice about dealing with interviews.
Rishav: Great! I was always interested in Communication Engineering. Making it to one of the
leading companies in MODEM technology, it really feels special.
Rishav: Qualcomm had come in the first semester to hire fresh grads and recruit summer interns as
well. Firstly, there was an online test and the shortlisted candidates were called for interviews. There
were two rounds of interviews, one for technical and the other HR. Five of us were selected for the
internship program of 10 weeks. During this interning tenure we were evaluated and our performance
reviews were submitted. We also had to go through an Exit Interview. Combining both these
components they selected 4 out of those 5 interns as new hires.
TopTalent: What was the toughest question you encountered and how did you answer it?
Rishav: ‘Tell us about yourself’ was definitely one of them. This was the one question which I was
certain would make all the difference as technically all my fellow candidates were very competitive.
I took the opportunity of answering this question by telling the interviewer about my projects,
internships and my interest in the field of wireless sensor networks, a field that works in close lines
to Qualcomm’s R&D. And the rest of the interview went smoothly.
Rishav: I wasn’t prepared actually on the day of my interview, but I was confident about what I
know. So that confidence did help me through. During the internship period sincerity and dedication
did the trick for me. Previous experience in the form of internships and projects can also come very
handy. I had worked in the Engineering Section of Moser Baer India, MODEM-Automation Team of
Qualcomm and in Research and Development for Tejas Networks. Also, I had done projects in the
fields of Data Acquisition through Wireless Sensor Networks, Data Indexing in Wireless Sensor
Networking and Optical Networking in Fiber Optics during my four years in college.
TopTalent: Can you talk about what resources you referred to before the interviews?
Rishav: I mostly referred to my class notes and went through the few technologies Qualcomm was
working on. Basically I brushed up on concepts.
TopTalent: What were some important factors according to you that made you stand out?
Rishav: I cannot say that for myself, but one thing which I always ensured was to carry myself in a
confident manner. I kept repeating to myself, ‘There is nothing to be afraid of or nervous about’. I
think the most crucial point is to be able to handle any situation well under pressure. I tried to
constantly remain calm and I think that might have turned things to my favour.
TopTalent: Currently, what are you working on and how has the experience been so far?
Rishav: It’s the third day since I’ve joined Qualcomm and been allotted my team. The general
atmosphere and ambience here is awesome, everything that I had hoped it would be. Also, my peers
here are the friends I had made during the internship, who joined the company along with me. Coming
to my work, it is in CDMA, something which has always interested me. So far, it’s been a perfect
combination of work and fun. At present I am just taking my time to settle down and am definitely
looking forward to a great experience ahead.
TopTalent: What is your advice to students who are aiming for similar placement offers?
Rishav: Be very clear about what kind of work you want to do. Remind yourself of your aim and
always keep it in your mind. If you have clearly defined goals, you will be able to ensure that your
preparation is organized and up to the mark. This will also give you the confidence to crack the
toughest of interviews.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks
Source
http://www.geeksforgeeks.org/toptalent-interview-rishav-got-job-offer-one-core-companies-
qualcomm/
Amazon Interview | Set 93
I have just completed a full interview with Amazon and wanted to give back to GeeksForGeeks my
experience because it has helped me so so much to go through it.
On-site interview
1st interview
Write a url shortner. Design scalable architecture that host this service.
2nd interview
Array vs linked list. Rest vs Soap. What is a hashtable? Write code to handle hashtable collisions?
4th interview
Why Amazon?
Build a clone of a binary tree sent from a different machine
5th interview
Design and implement algorithm to find the shortest path from start to finish of a maze.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-93/
1st Round
Online Test with 40 MCQ questions related to computer science field subjects like DS, OS, CN, COA
and Programming.
1) Traverse a given 2D matrix from given source to destination in such way that every cell should be
visited exactly one time (we have to cover all cells of matrix exactly once and have to reach at
destination).
2) If m is a number then i right rotation of that number is mi. Ex m = 123 then m1 = 312, m2 = 231.
Now you have given 2 numbers as input say x and y. You have to count all m numbers between them
such that x <= m < mi <= y.
Ex if x = 123 and y = 250 then for m = 123, m1= 312 and m2 = 231 so,
Discussion of logic of programs from previous round and questions on selection of programming
language (why Python or why C).
Discussion of Project/Thesis.
Gave some simple programming questions to write (like to print all permutation of a string and
pointers related).
5th Round (HR)
I thanks to geeksforgeeks for huge contribution to this. I will keep learning from geeksforgeeks.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/paxcel-technologies-interview-experience/
Amazon Interview | Set 95 (For SDE-I)
Hi, Below is my interview experience for Amazon for SDE-I position.
Round-1(F2F)
1.) Traverse a binary tree in a spiral manner. (zig-zag manner)
2.) Given a number, find the just greater number than the given number containing the same digits as
the given number. Write code for this.
Round-2(F2F)
1.) Print a binary tree in a level order traversal but in bottom to top manner.
2.) Given 2 BSTs, validate their equality. Both are equal if they consist of the same set of values
irrespective of their structures. (Can you traverse them parallely).
3.) Given a infinite stream of integers, find the first non-repeated number till now. Write code for this.
Round-2(F2F)
1.) Given a binary tree, convert it into doubly linked list and after the conversion, the linked list
should
look like the post order traversal of the binary tree. The conversion should be in-place. What is the
time and space complexity of the program.
2.) Given the following sequence
A, B, C,…..Z, AA, AB, AC,…….AZ, BA,…..BZ…..ZZ, AAA…..
1, 2, 3,…..26,27………………………………………..
Given n, return the string. What is the time and space complexity of the program.
Write code for this.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-95-sde/
[ToTalent.in] Exclusive Interview with
Shweta, who got a job at Goldman Sachs
Shweta Shrivastava has secured herself a successful future in Goldman Sachs. Harnessing her skills
through a plethora of projects and actively participating in various extra-curricular activities, Shweta
built a strong resume. She worked as an intern for Goldman Sachs and sure enough, secured a
permanent offer from the most recognized investment banking firm. TopTalent.in brings you the
important interview tips and strategies that Shweta has to share. You can login and download her CV
from TopTalent.in.
TopTalent: What makes Goldman Sachs so special? Why did you decide to join?
Shweta: Goldman Sachs is one of the leading companies in the world of investment banking today
and an amazing place to work for. I had the opportunity to work here as an intern for two months after
which I was hired as a permanent employee.
Shweta: I was recruited as an intern here in my third year. The hiring process is exactly the same as
any other company which comes for campus recruitments. There’s an aptitude test in the first round
followed by GD and finally personal interviews.
Shweta: In any interview, whenever you come across a tough question you’re unsure about, the best
thing to do is to honestly tell the interviewer that you don’t know the answer rather than trying to give
senseless answers. It is very important to stick to context. Always keep your answers short and to the
point, don’t beat around the bush. However you could always tell them what you think is right and
back it up with an intelligent explanation. Say you’re not very sure but logically this should be the
answer.
TopTalent: Can you talk about what resources did you refer to before the interviews? What tips
would you give to students sitting for interviews?
Shweta: Before the interviews, you don’t particularly have to prepare for anything. Your ability to
answer the technical questions that they ask depends on your overall knowledge and can’t be
achieved by last minute preparation. In any interview, the most important thing that they look for is
your presentation. They know you are smart, having cleared the aptitude test and GD; otherwise you
wouldn’t have made it there. What they want to see now is your personality, your communication
skills and your confidence. So whenever you’re going to sit for an interview, just relax. Always be
yourself. Don’t portray a fake personality just to create an impression. The people hiring you have
been conducting interviews for years and will easily spot the deception.
TopTalent: What were some important factors according to you that made you stand out?
Shweta: According to me, the most important factor that made me stand out was my appropriate level
of confidence. Not only is it important to be confident, it is extremely crucial to never be
overconfident. You should know how and when to say what, how to tackle questions, how to make a
connection with the interviewer. Remember, all you have is ten-fifteen minutes. Do your best. Don’t
be tensed. Don’t be too nervous. Take the interview as a conversation and not as a question-answer
session. And always be yourself.
In case you missed it the first time you can login and download Shweta’s resume from TopTalent.in
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/totalent-exclusive-interview-shweta-got-job-goldman-sachs/
Amazon Interview | Set 96 (On-Campus for
Internship)
I’m a 3rd year grad and amazon visited our campus. My interview had only 3 rounds.
2) given few sets of intervals print out the the entire intervals without overlapping , if they overlap
then combine them into one.
Round 2 (F2F)
Tell me something about yourself.
1) Convert a BST into inorder, preorder and postorder linkedlists inplace.
2) Make a queue out of 2 stacks, as it was easy he asked me to code and asked me the complexities.
3) Given a linked list with a loop find the loop and make it straight . I did with HashMap but he told
me not to use extra space so i told him floyd’s cycle.
2) Given an infinite stream of characters find the first non repeating character at any instance , The
storing,retrieval should be o(1) .
I told him a solution using a hashmap then he modified that he may have millions of unique characters
not just alphabets.
i gave a solution with a linked list and a hashmap. This question was not asked to me but was to my
friend .Its a good one.
3) print all the binary values of number from 1 to n , each number’s binary should be printed in 0(1).
for eg: n = 6
then print 1 10 11 100 101 110. printing 1, 10 ,11 ,100,101,110 should be in o(1) each
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-96-campus-internship/
Flipkart Interview | Set 9 (On-Campus)
I am 4th year undergrad. Recently Flipkart visited our campus.
2. A sender will send a binary string to a receiver meanwhile he encrypt the digits. You are given a
encrypted form of string. Now, the receiver needs to decode the string, and while decoding there
were 2 approaches.
First, receiver will start with first character as 0; S[0] = 0, P[1] = S[1] + S[0], P[2] = S[2] + S[1] +
S[0] and so on.
Second, Receiver will start with first character as 1; S[0] = 1, P[1] = S[1] + S[0], P[2] = S[2] + S[1]
+ S[0] and so on.
You need to print both the strings, after evaluation from both first and second technique. Uf any string
will contain other that binary numbers you need to print NONE.
Input1; 0123210
Output: 0111000
NONE
explanation for NONE – S[0] = 1, P[1] = S[1] + S[0] so S[1] = 0
P[2] = s[2] + S[1] + S[0] , S[2] = 1
P[3] = S[3] + S[2] + S[1], S[3] = 2, not a binary character so NONE
iv) the string should not start with these characters(‘.’ , ‘,’ ‘ ‘)
v) the cost value should be minimum, there can not be multiple answer for a single string.
Eg. This is a flipkart online programming test.
x = 10 Y = 3
Output
This is a
flipkart
online pr-
ogramming
test.
and then they asked me about, what coding practices you used to do.As i dont do much coding online
so i gave told them truely that only Codeforce and Spoj
After that they started my interview, that what is the approach that you had used in the Machine
Coding Round and how you implemented and why you uses this type of technique.
My approach was Greedy.
Further they asked me what Data Structure you Know, how you use it some basic questions.
Later they asked me to print vertical nodes together in the binary tree, he asked me why you used
Recursion in the solution.
you are given an array(say C) of characters and an array(say M) which contains the indexes of the
array of characters.
We started moving elements of array(C) according to the position of indexes given in the array(M).
e.g. array A – a b c d e f g
array M – 1 4 3 5 0 2 6
again applying – a b c d e f g
He wants minimum number of times modification on the array (A) so that the we will again reach to
the initial order.
I gave him first recursive solution, then he says optimize it and after that i gave him O(n) solution; the
logic for the problem came to me from Inplace Transpose of Matrix
After this he asked me a question on Next Greater Element, he wants how many ways i can handle this
question.
He asked me about AVL tree, how you will implement it and then said you have final interview in
early morning
Technical + HR interview(F2F) –
In this round, first they asked me about myself while studying My Resume
So they started asking some questions on LINUX – like what is gdm but i said sir didnt know much
about linux.
further they asked me how to debug the code, and what is segmentation fault, memory leak and how
you will find the segmentation fault in 5000lines of code.
after that they asked me about my projects, why this project how you did it… they grilled me in every
step.. why this why not this and all..
after that he wants some optimization to be performed on the project.
After this they asked me some questions on stack while putting pressure of time that you have 2mins
for this question.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-set-9-campus/
Flipkart Interview | Set 10 (On-Campus For
SDE-1)
Round 1(Online):
There were 2 questions time limit 90 mins.
1. A person wants to go from origin to a particular location, he can move in only 4 directions(i.e East,
West, North, South) but his friend gave him a long route, help a person to find minimum Moves so that
he can reach to the destination.
Input – NESNWES
Output – E
You need to print the lexicographically sorted string. Assume the string will have only ‘E’ ‘N’ ‘S’ ‘W’
characters.
E.g – SSSNEEEW
output – EESS
2. A sender will send a binary string to a receiver meanwhile he encrypt the digits. You are given a
encrypted form of string. Now, the receiver needs to decode the string, and while decoding there
were 2 approaches.
First, receiver will start with first character as 0; S[0] = 0, P[1] = S[1] + S[0], P[2] = S[2] + S[1] +
S[0] and so on.
Second, Receiver will start with first character as 1; S[0] = 1, P[1] = S[1] + S[0], P[2] = S[2] + S[1]
+ S[0] and so on.
You need to print both the strings, after evaluation from both first and second technique. If any string
will contain other that binary numbers you need to print NONE.
x = 10 Y = 3
Output
This is a
flipkart
online pr-
ogramming
test.
Then he asked me about my Codechef and spoj rating. Then he asked me 3 coding questions:
1 – http://www.codechef.com/JULY14/problems/SGARDEN/
2 – Simple dp question that a frog can take 1 or 2 step. Number of ways to reach nth position.
3 – Number of palindrome between 2 given numbers.
Technical + HR interview(F2F) –
He discuss everything about my project very deeply.
Then he asked a coding question.
http://www.careercup.com/question?id=13394663
f you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-set-10-campus-sde-1/
Amazon Interview | Set 97 (On-Campus for
SDE1)
I had my amazon interview few days back in my campus.
First Round:
First round was a simple round. It had 20 MCQ questions on C/C++ and 2 coding questions. The
coding questions were:
1.) You have given an array in which numbers are first increasing and then decreasing. Find the
maximum element in O(log n).
2.) Swap the data of alternate nodes of a list.
We were given 90 minutes for 22 questions. For objective questions, you should be clear with virtual
functions, inheritance, data types etc.
Second Round:
In this round, we were divided in groups. And a tree problem was given. We have to solve them
individually.
My problem was:
Given a bst and two boundary values. Prune the tree if the node data lies outside the boundary values
Round three:
In this round,
1) Reverse a doubly linked list and a singly linked list. Both iterative and recursive. Which one is
better approach and why?
2) Can you reverse a list in less than O(n)?
3) Differences between list and array. Which data structure you like and why?
4) How will you find the kth node from last in a list? Discussion on optimization
5) Given a string. Print all permutations of it. Discussion on time complexity and optimization.
Round four:
1) Interleaving of a string. A big discussion on various test cases. Your code should handle the case if
the string contains repeated characters.
2) Check if a binary tree is a bst or not
3) find diameter of a tree.Follow up how will find the height of a binary tree?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-97-campus-sde1/
Amazon Interview | Set 98 (On-Campus)
I am a fourth year undergraduate CSE. I had my amazon interview in my campus.
First Round:
First round was a simple round. It had 20 MCQ questions on C/C++ and 2 coding questions. The
coding questions were:
1.) You are given a string that represent an expression of digits and operands. Eg. 1+2*3 , 1-2+4. You
need to evaluate the string or the expression. NO BODMAS is followed. If the expression is of
incorrect syntax return -1.
Test cases :
a) 1+2*3 will be evaluated to 9.
b) 4-2+6*3 will be evaluated to 24.
c) 1++2 will be evaluated to -1(INVALID).
Also, in the string spaces can occur. For that case we need to ignore the spaces. Like :- 1*2 -1 is
equals to 1.
2.) You are given an array of both negative and positive integers. You need to rearrange the array such
that positive and negative numbers alternate. Also, the order should be same as previous array and
only O(1) auxiliary space can be used and time complexity boundation O(n).
eg. -2 3 4 5 -1 -6 7 9 1
result – 3 -2 4 -1 5 -6 7 9 1.
Second Round:
In this round, we were divided in groups of 5. And two problems were given and we need to write
the code on paper for that problem.
My code were :
1.) You need to determine whether the linked list is palindrome or not.
2.) Print the level order traversal of the binary tree in the spiral form.[They also asked us the solution
without any extra space and O(n)
Time complexity].
Third Round(F2F):
Interview asked me to write the code for the two problems which are :
1.) Reverse the alternate K Nodes of the Linked List.
eg. 1->2->3->4->5->6->7->8->NULL
Result – 3->2->1->6->5->4->8->7->NULL.
2.) You are given the binary Tree and the two nodes say k1 and k2 . You need to determine whether
the two nodes are cousins of eachother or not.
eg. 6
/\
35
/\/\
7813
and say two node be 7 & 1. result will be TRUE.
say two nodes are 3 & 5. result will be FALSE.
say two nodes are 7 & 5. result will be FALSE.
3.) Give the algorithm, data structures, time complexity and space complexity for the following
problem :
In our mobile phones when we enter say four initials of the number say 9 4 5 6, then our phone shows
the whole lists of number that starts with these entered number.
Now the problem is : how it is implemented and what is the best way of doing this keeping the
balance between space and time complexity. Also, user can enter any number of initials and your
program should print all the numbers with those initials that are present in your phonebook.
Fourth Round(F2F):
Interviewer asked some questions on C++ . They were :
1. What are virtual functions?
2. What is theuse of virtual functions?
3. What are pure Virtual functions?
4. Syntaxes of Virtual functions and pure virtual functions?
5. What are abstract classes in C++?
6. How we can implement pure virtual functions in JAVA ?
Design question :
How we can restrict our class so that only single instance of it can be created?
What is Singleton Design Pattern?
2. Implement the stack in which push(),pop() and getMiddle() has O(1) complexity at any point of
time.
Fifth Round(F2F):
This round started with the deep discussion about my projects. Interviewer tried to get each and every
aspect of my project with lot many why
and how questions.She asked me the future scope of my project and what are learnings I got from it.
(About 30 minutes discussion).
Then she asked me implementation, algorithm, data structures, time complexity and space complexity
for the following problem:
Say we have website having several web-pages. And also there are lot many user who are accessing
the web-site.
say user 1 has access pattern : x->y->z->a->b->c->d->e->f
user 2 has access pattern : z->a->b->c->d
user 3 has access pattern : y->z->a->b->c->d
user 4 has access pattern : a->b->c->d
and list goes on for lot many users which are finite and numbered.
Now the question is we have to determine the top 3 most occurring k-Page-sequence.
for the above example result will be : (k=3) a->b->c , b->c->d , z->a->b.
[Question took the long discussion and she kept adding constraints, cases and more problems to the
above problem.]
I would like to thanks GeeksForGeeks which helped me to improve my knowledge and understanding
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-98-campus/
Amazon Interview | Set 99 (On-Campus)
Amazon interview experience :-
1st Round :-
20 mcq and 2 coding questions
1. Left view of binary tree
2. addition of 3 link list
3rd round :-
1. Length of the longest substring without repeating characters
2. Length of the longest substring who occur more than one in string
like :- geeksforgeek so answer is geek.
4th round :-
tell me abt ur self
check tree is BST or not and code for it
Check number is power of 2 or not
what is Dns
difference btw TCP and UDP
one tough question is which i dont remember but it i dont know how to solve this question but
interviewer help me alot to crack this question and ask me to code for my algorithm.
suggestions :-
1. if you dont know answer of coding question so dont worry interviewer will help you. He always
give you hint and you have to think on that way.
2. GeeksforGeek
3. Always say interviewer what is your intrest subject.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-99-campus/
Round -1
20 MCQs (C ,Aptitude,DS,DBMS,Networks)
2 programming questions were asked-
1.) Print all root to leaf path of a given binary tree whose path sum is a given value k.
Note: tree was given in the form of array (so no need to create the tree).
Input: Input contains two space separated integers K and L followed by 2^L-1 space separated values
Output: All root to leaf path which has a path sum = k.
Sample Test case :
Input :
40 4 10 11 13 # 15 28 6 # # 8 4 # 9 11 #
Output:
10 11 15 4
10 13 6 11
2.) Given few sets of intervals print out the the entire intervals without overlapping, if they overlap
then combine them into one.
Sample test case:
A
/ \
B C
/ \
D E
/ / \
F G H
Convert the structure of the tree like a left aligned tree whose each node contains a down pointer and
a right pointer and looks like the below tree..
A
|
B – C
|
D—E
|
F—G – H
2.)The arrival and departure time of trains are given. Find the minimum number of platforms to
accommodate all the trains.
Round 2. (F2F)
1. An array is given in which elements are first monotonically increasing and then decreasing.
Search an element in the array. Working code was asked which takes care of all the edge cases. Also
asked the time complexity of the code.
Round 3 (F2F)
1. You are given a graph. Write a function to remove all the cycles. Means after the function call the
graph must be converted into a connected acyclic graph(tree).
2. What happens when u send an email to someone.
3. What is socket ? What is port?
4. Which protocol is secure for mail transfer? Which protocol is used by Gmail?
5. What is the port number of SMTP?
6. Suppose u open notepad and type something and save it what would happen.
7. What is static member?
8. What is singleton class??
9. If a class has all its members as static would it be a singleton class? Compare them.
10. What is process scheduling? How does it happen? What are various queues maintained by the
system? (Where does the scheduler process run ??- This ques was asked in 2nd round of DE Shaw &
co).
11. Suppose various process are waiting for a particular resource? What is this situation called? How
does the system overcome from this problem?
12. What the various ways of process communication?
13. What is thrashing ?How to overcome from it?
Round: 4.)(HR + Technical)
1. Tell me something about yourself
2. A long discussion on project. Brief description. How can you improve it?What changes will make
if I ask you to develop it again? Give example of implementation of various oops concept in your
project.
3. What is multithreading? Then he said that there are situations where there is no need of
multithreading.eg- if I want to add two numbers then no point of using multithreading.So give an
example where you can actually implement multithreading. (ANS – Fibonacci number)
4. Some behavioral questions like-
What are you good at?
What are you proud of?
What are the things you want to change in yourself?etc.
5. Various oops concept like encapsulation, abstraction, inheritance , etc. with example.
Suggestions:
• Don’t start writing the code immediately.
• First tell him the approach .
• Take care of all the edge cases.
• Many times interview may give you hints so make the interview interactive.
• Very Important – Don’t focus just on a particular subject like only DS.
• More or less give time to everything.
• Study the concepts of OOPS and OS properly.
• Have a basic Idea of DBMS and Computer Networks also.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-100-campus/
D E Shaw Interview | Set 4 (On-Campus for
Internship)
D. E. Shaw recently carried out intern procedure in our college. The whole process had three rounds.
Round 1:
It was CV shortlisting. Out of total 41 candidates, 12 were selected.
Round 2:
It was a telephonic interview. The call lasted 40 minutes. The interviewer asked about my academic
project first. Next he asked about my preference in programming language – C/C++/JAVA. My
preference was C++. So he started with OOP concepts. After I have named few of the highlights of
OOP, he asked about Data Encapsulation. He then demanded an example for the same. Few questions
followed about the C++ implementation of the example that I had given. He then switched to virtual
functions. Next came Inheritance, upcasting and downcasting, where should the virtual keyword be
used.
He asked me how do we call the constructor of base class using derived class. Next he asked DS
questions. There were three questions in total.
1. Given a string. How do we check if we can obtain a palindrome by rearranging the characters of
the string.
2. Given a singly linked list. How to we detect if a loop is present in the list. (Both Brute-Force as
well as Floyd’s Cycle Algorithm had to be explained in details).
3. Given a doubly linked list with a next pointer pointing to next node and other pointer pointing to
any random node. How do we clone this list?
Round 3:
Last round was again a telephonic interview. This time too the call lasted 40 minutes. There were two
interviewers this time. I was asked to explain one of my projects at the beginning. Then, I was asked
to explain any of the projects.
Next, they asked me about STL, Generic classes and templates in C++. He then asked me to give an
example of a class implemented using templates.
After this came the Data Structures part. This time, they asked me two questions. Both of them were
related to real-life scenarios.
1. Given details of a person – First name, last name and telephone number. Sort them according to the
last name. I said we can use qsort() and explained the whole process and design of comparator
function. But they demanded an answer without using any of the library functions.
2. They next asked me given a number in the directory, how will you search for the person details
from the directory. Your answer must be efficient enough so that it could be used on a map like
Mumbai.
3. The next question was to implement a spell-check that is used in Microsoft Office Word and which
data structure could be used to implement it.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/d-e-shaw-interview-set-4-campus-internship/
Citrix Interview | Set 2
Written Round:
1. First section consisted of 50 MCQs to be attempted in 1 hours. The question wise division was:
5-6 Questions were of General Aptitude.
8-10 Questions based on C output.
4-5 Questions on C++ output
Around 10 questions from networking
Around 10 questions from operating systems.
Other questions on different genres of Computer Science.
2. This section consisted of 2 programming questions to be solved in 1 hour. The code was run on
Hackerearth.
1. An easy question. Given a car consumes different amount of fuel per hour running on
different speed. Speed and Fuel consumed were given as arrays. Also, given that the total
amount of fuel we had initially. Find the maximum distance a car can travel given that it has
to travel with constant speed.
2. Given an integer x. You have to find a minimum base b such that (x)bis a palindrome. Eg:
(5)2 is a palindrome i.e. 5 in base 2 101 is a palindrome. Brute force solution passed.
The interviewer started with a general question “Tell me about yourself”. I explained. He directly
came about discussing about the projects and ask me to tell every minute detail of my project. This
continued for about 30 minutes which consisted of a series of cross questioning. He was mainly
concerned about the problems I faced during the project and what was the solution I came up with.
He then asked me about my areas of interest. Then he started asking some Data Structure questions.
Given an sorted array which is rotated by k times, find an element in minimum time complexity.
Can we return value from constructor? If no, then if there is some error while initialising a new object
then how can we possibly know it.
OS questions.. What are Semaphores? Where are they stored? How do we prevent threads to enter in
a critical section and other basic OS questions.
DS: Given a link list, find kth element from the end. Given a class stack which have functions push
and pop implemented in O(1). You have to implement a function min such that it tells the minimum of
elements till now.
Given an array, containing 0s and 1s. Sort it in min time and space.
After this round, I was called inside where the company people were sitting and there they asked me
about my preferred profile as Citrix offer 2 profiles for Software Engineer.
This round was a mixture of Technical Questions and HR. Introduce yourself. The interviewer was
very friendly and asked me very tricky “HR” questions. When I answered all those and not got
trapped..he said you have come prepared He then came to Networking.
Tell me every minute detail of what happens when we open google.com. He wanted a layer by layer
approach. After complete explanation, he was satisfied.
How can you measure the height of Mt. Everest? He seemed pleased with my answers :D.
This was HR round. First the HR asked me how good I am in team. Prove it. 2-3 questions like that.
He eventually shifted from asking questions from me to telling me about the company, work there and
explained about the profile, the responsibilities I will get. This continued for 20-25 minutes and this
round was over.
This round was a formality. The main HR manager asked me 1-2 questions. Why Citrix? Goals? What
about further studies? Strengths?Etc.etc.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/citrix-interview-set-2/
Accolite Interview | Set 1 (On-Campus)
Accolite came to our campus for recruitment.
– I need to give him a algo or design steps which I will follow to make this checker.(Around 1 hr
15min discussion/suggestions/more test cases/new boundary case were discussed, Then finally he
was satisfied with the output)
2. This question was pretty easy just to complete the round 1,I think. He asked me to code the problem
“to find kth smallest element from the last in a Link List”.
1. He picked my majority element question, in that question, I have used the MedianOfMedian
technique. He was not very much clear with the technique so he asked me to prove the complexity that
this technique works in O(n). I was also not sure about the proof that time but after some discussions
in 45mins he was satisfied about the technique.
You are given with an array. You have to put even numbers at even places or odd at odd places.
Firstly i had to tell how will I decide what to do, even at even or odd at odd? Then he asked to design
algo for that. He asked for inplace O(n) solution.
I have never heard about the question so it took 30mins to give the best solution. At first I gave –
outplace O(n) solution then –in place O(n^2) solution –Then an incorrect O(n) in place one, for that
he asked me to prove that this is wrong and finally I gave a correct solution.
2. Draw a venn diagram showing the relationship between P and NP (I got it completely wrong)
3. Probability question, Six coins are tossed What are the probability of getting at least 5 heads.
(because of some stupidity again I gave the wrong ans)
4. Then he finally asked me to design an algorithm to find LCA of two nodes in an n-ary generic tree. I
did that correctly and he was satisfied.
I think the whole process was little bit cumulative kind of process. All the rounds, even written round
had some weightage in final selection. Although students got eliminated in between rounds.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/accolite-interview-set-1/
Amazon Interview | Set 101 (On-Campus)
Off late, Amazon had an On-campus recruitment. Here is the interview process.
1) Written Round
1. 20 MCQ’s
Given a set of inputs (x,y) which represent intervals, merge overlapping intervals
e.x. (3,4) ; (2,5) ; (1,4) ; (8,9)
output should be – (1,5) ; (8,9)
*note – my code had errors, but as i had used merge sort for sorting the inputs, i cleared the first
round, whereas others with properly working code but in-efficient algorithms didn’t
Given a (nXm) matrix, with values present in each cell and a few in-accessible cells marked as
-1, find the path from (0,0) to (n,m) with highest sum.
2) Interview Round 1
3) Interview Round 2
1. A couple of questions from arrays, binary trees and BST’s , which were directly taken from DS
section of geeksforgeeks.
(I said I have coded them all and know the approach)
2. Box stacking problem for 2 dimension, 3 dimensions.
(I said I know the approach for all)
3. Box stacking problem for k dimensions
(I didn’t know the approach, so tried it out in the interview. Nearly reached the solution, with the
help of the interviewer. In the end, turns out, this was the same question which was asked to him,
during his interview round in amazon 2 years back. “SET 2”)
4) Interview Round 3
1. Same question from interview round 1, given an array, find a pair with sum k.
But, now I was asked to optimize the solution to O(n) time.
2. Explain how chat-messenger functions in Facebook,Whatssap
3. Validate whether a given 9X9 matrix is a sudoku matrix or not.
(In all cases, the goal of this round was not to check your coding skills, but your ability to handle
all varieties of test cases!)
5) Interview Round 4
(This I believe, was probably a stress interview a.k.a Bar Raiser Round. The motive was to shift
your attention from one topic to another rapidly and see if you can handle the questions that follow.)
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-101-campus/
Cisco Interview | Set 7(On-Campus)
Status: Full Time job + 6 month internship offered.
It was a 4 round interview. The first round was a written round with 50 questions(20 aptitude + 30
technical) for 1 hour. The second round was a technical round(1 hour). The third was a technical +
management round(20 mins).The fourth round was a short HR round(10 mins).
In the second round, the interview started off with simpler,shorter questions, like for example the
interviewer pointed to one of the technical questions in the previous round(the interviewer has your
answer sheet from the previous round) and asked me to explain the approach i had taken to solve the
problem. The question he asked me to explain was a recursive function, and i had to estimate the
worst case time complexity of the function. the function was something like this.
function(params)
{
...//terminating condition
else..
return function(params-1) + function(params-1)
}
The answer to this was O(2^n). The interviewer modified the question to this:
The complexity of this was O(3^n). He asked me to derive it on paper which i did. The next question
was regarding how to set the nth bit in a 32bit-integer. The answer was pretty straight forward.
variable | 1 4 Then the answer would be: / \ 1357264 2 6 / \ / \ 1 3 5 7
After taking a few hints from the interviewer i was able to code it up without errors.
The next question was to print the tree in a zig-zag manner. ie:
for the tree above the zig-zag traversal would yield: 4267531.
After thinking for some time, hints from the interviewer, i was able to code this up as well.
Basically by this time 1 hour was up. The key points the interviewer looked for, was my approach to
the problem, error-less coding, All corner cases must be taken care of while implementing the
program.The most important thing is you should be sure of your solution. The interviewer asks you if
the solution is right or wrong, here he is checking your confidence, try to dry run the program once or
twice after coding it up, this would help with the confidence. Also , try to speak as much to the
interviewer about your thought process, this not only gives a better opinion to the interviewer, but if
you tell him where your stuck, he/she might give you clues to proceed further.
After answering all the questions with hints from the interviewer , i qualified for the next round.
In the third round, The technical-management round., the key focus was your thought process, they
were not too keen about the technicality of the solutions. The interviewer asked me what were my
favorite topics, and i replied data-structures and algorithms. Then he asked me to code up a part of a
social network were people were nodes and different types of connections existed between them. my
job was to write functions to connect any two nodes of the graph, and also another function to check if
2 nodes are directly or indirectly(transitively) connected.
I asked him, whether all these edges/connections were directed or undirected, so he asked me to
assume they were undirected for simplicity. Then i was asked to come up with a data structure to
handle these operations. It was obvious that it was a graph structure and the nodes had user details
and a edge-list inside it.
the socialGraph class had a insertion,deletion functions and connect(node*,node*) ,
isconnected(node*,node*) functions as friend functions to connect 2 nodes and check if 2 nodes are
connected. connect function was straight forward ,as i had to append node reference to the edge-list
of the node.
Then to check if 2 nodes are connected, i did a DFS from the source node to the destination node. The
interviewer asked me to make the code such that it could scale. So i suggested that we could do a A*
search instead of a DFS to make the search space smaller. The interviewer seemed satisfied with my
solutions and then we moved on to the other questions. He asked me about my projects, the roles i
have played in various clubs in the college, my future plans, why Cisco? and other simple questions
like that.
I did well enough to get qualified for the final round which was a casual HR round where they asked
simple questions like the meaning of my name and then i was given a evaluation form to fill, and
they asked me some questions on that which i could answer.
The interview overall was reasonable, but certainly made me think out of my shoes, and strong
knowledge in Data structures and algorithms helped me pass this interview.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/cisco-interview-set-7on-campus/
Amazon Interview | Set 102
I had my Amazon Interview some days back and now I am posting my experience here.
Round 1 (Apt)
Coding Question 1 – Given a String and a pattern find all anagrams of the pattern in the original
string. You need to print all the index of the location where the match was found
Ex –
INPUT – ABDACDBACA
ABCD
Coding Question 2 – Given an array containing zero and non zero digits you need to shift all the
zeroes to the right of the array. Output should be number of non zero elements present in array and
minimum number of swaps needed to do so.
Ex –
INPUT – 1 0 -6 5 0 0 2 0
1st PI
Started with a general introduction with the interviewer. Some basic introductory questions like Tell
me something about yourself and after we were settled he started asking question
1 . Given a binary tree store the vertical sum of the tree in a list.
2. Given a number you need to output the minimum number of factors needed to represent that number
such that none of the factors is divisible by a perfect square.
EX-
INPUT – 8
So number of factors of 8 (2*2*2 , 4*2 , 8) (NOTE : do not consider 1 because it is divisible by all
numbers) So minimum factor will be 1 (8) but it is divisible by 4 so not allowed then minimum is 2(4
* 2) but again 4 is divisible by 4 so not allowed so finally answer is 3 (2*2*2)
OUTPUT – 3
You need to explain the logic of both the programs and then have to code both of them
2nd PI
General Introduction about myself and asked me my Weakness and strongness and again once we
were comfortable started asking questions
1. There are a number of houses in a row and each house contain some amount of money in it. Now
suppose you’re a thief and you want to steal money from this houses so find the maximum money
you can steal. Condition was that no two adjacent houses can be robbed.
After doing this he asked me to also print the houses that were robbed
2. Given an expression consisting of opening and closing parentheses you need to find the number
of onions present in it.
Onion is any structure of the form ()
() – onion of size 1
So suppose if input is (()()) so output will be 2 because there are only two onions present in it
3rd PI
2. Given an array of 0’s and 1’s print the numbers in the form of Fibonacci sequence i.e. 1st 1 zero
then 1 one then 2 zero then 3 one and so on
Ex –
INPUT – 00101111011101011000
OUTPUT – 01001110000011111110 (Number of 0’s and 1’s in the input and output must be same
so if you run out of any of them then just simple print the remaining number)
1. Given a list of cities you can travel in an number of city now you need to find the number of
ways in which you can travel this cities.
2. Implement the pow function in logarithmic time.
3. Implement a DFA which will accept all string containing even number of 0’s and 1’s
4. Find the 2nd maximum number from a table using SQL query
5. Check whether a grammar is ambiguous or not
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-102/
Amazon Interview | Set 103 (On-Campus)
First of all, I would like to convey my special thanks to geeksforgeeks for such a special guidance.
Here is my interview experience:
First day:
Round-1 :
20 MCQs(Data structure, C, C++, OS, Probability ).
2 programs :
1. Given an array of integers. Segregate all the non-zero numbers at the beginning. Print the number of
non-zero integers and the minimum number of swaps required for these operations.
2. Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that
prints all occurrences of pat[] and its permutations (or anagrams) in txt[]. You may assume that n > m.
Second day:
Round 2 : PI
1. Discussion on Project.
2. Code : Given an array of integers. Find the minimum distance between two numbers.
I did it in O(N) time complexity.
Then he changed the question and asked what if the array is sorted and contains duplicates.
I did it in O(logN) time complexity.
3. Given a linked list. Segregate all the positive numbers at the beginning and all the negative
numbers at the end.
I did it in O(N) time complexity.
Round 3 : PI
1. Discussion on project.
2. Code : LCA of BST.
3. Code : LCA of Binary tree.
4. Discussion on heap and stack.
5. Code : Maximum subarray sum.
6. Os concepts : What is semaphore? Brief explanation on wait() and signal() operation.
Round 4 : PI
1. Discussion on oops concept. Asked me about copy constructor, virtual function, virtual class,
Template, exceptional handling.
2. Discussion on Os concepts. Semaphore, different page replacement algos.
3. LRU implementation using stack ( I was not allowed to use any other data structure).
I did it using two stacks.
4. It was a modification of this question.
Our chef has recently opened a new restaurant with a unique style. The restaurant is divided into K
compartments (numbered from 1 to K) and each compartment can be occupied by at most one
customer. Each customer that visits the restaurant has a strongly preferred compartment p (1 ? p ? K),
and if that compartment is already occupied, then the customer simply leaves. Now obviously, the
chef wants to maximize the total number of customers that dine at his restaurant and so he allows (or
disallows) certain customers so as to achieve this task. You are to help him with this. Given a list of
N customers with their arrival time, departure time and the preferred compartment, you need to
calculate the maximum number of customers that can dine at the restaurant.
Third day :
Round 5 :
1. Discussion on project.
2. Discussion on different types of sorting techniques.
Difference between merge sort and quick sort. When and where are they used.
Discussion on counting sort.
3. Discussion on hash-map.
Design a data structure which will provide the same function as hash-map.
4. Code : Given an array : A1[] = 2, 1, 2, 5, 7, 1, 9, 3, 6, 8, 8
A2[] = 2, 1, 8, 3
Sort A1 in such a way that the relative order among the elements will be same as those are in A2. If
the element is not present in A2, append them at last in sorted order.
o/p : 2, 2, 1, 1, 8, 8, 3, 5, 6, 7, 9
I did it O(NlogN) time complexity.
Round 6 : (Bar-Raiser)
1. Code : Convert little endian to big endian.
2. Code : Kth max in a file.
I did it using min-heap, then he sked me to use other data structure. Then I did it using Balanced
binary search tree.
3. Code : Find the second non-repeating character in a string.
4. Given prime number p>=5 :
Prove that : (p^2 – 1) will be divisible by 24.
5. Given a decimal number N as a string of digits (only 0’s, 1’s and 2’s are there), how do I check if
it’s divisible by 3 using regular expressions only, without converting to int? I was asked to design
DFA for that.
I would like to thanks GeeksForGeeks which helped me to improve my knowledge and understanding
of Data structures and Algorithms
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-103-campus/
Amazon Interview | Set 104
Online round:
20 MCQs on mathematics, probability, operating systems, DBMS, compilers and basic DS concepts.
2. Given a ‘pattern’ and a ‘text’ print the indexes of ‘text’ where any anagrams of ‘pattern’ occur.
Input:
abcdad (text)
abcd (pattern)
Output:
0, 1
1st technical:
1. Given a linked list reverse the even nodes in one pass and in O(1) space.
So 1->2->3->4->5->6->7->8 should be converted to 1->8->3->6->5->4->7->2.
2. Given an array containing integers, modify the array such that the 5’s are at the end and the rest are
at the beginning (maintaining the same order).
2nd technical:
1. 5 minute discussion about my OCR project.
2. Given an undirected graph, count the number of cycles with 3 nodes.
3. What is a spanning tree? Difference from tree, if any.
4. How to find the minimum spanning tree of a graph?
5. Given an array convert it to another array such that the following condition holds:
a c e g 3rd technical:
1. What do you know about memory management in Operating Systems? What is segmentation? What
is paging?
2. Design problem: Given a station with n platforms. So each platform has one line. But these n lines
join into one, after leaving the platform (on both sides). Each train has to wait a minimum of x minutes
in the platform. Trains arrive from both ends. If all the platforms are occupied they wait. There is also
a point beyond the end of the platform (on both sides). This point indicates that an incoming train has
to wait at that point until a leaving train (from that end) passes that point. Design the whole system.
3. How are big files stored in memory? What are the uses of B-tree? How is it more useful than BST?
4. Given one billion file indexes and said that n files are missing. How would you identify the file
indexes of those who are missing?
4th technical:
1. Given an array of integers. This array denotes ‘our’ own ascending order of the elements. So if the
array is {2,3,1,4}, by mathematics we can say that 2 Say the input is
1,2,3,4,5,6,7,8,-9999,0,1,100,-9999,-9999,500 Output will be 1,8,2,7,3,6,4,5 0,100,1
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-104/
Payu Iinterview (On-Campus)
Written round: 5 coding and 15 MCQ on ds, algos, dbms.
Round 1
Tell me about yourself
Given two strings str1 and str2 find if str2 is substring of str1, if yes return the starting index else
return -1.
Given time as a string in format of HH:MM, draw an analog clock. ( no logic , but made me write the
entire code )
Round 2.
Tell me about yourself
Given a binary tree, change the value in each node to sum of all the values in the nodes on the left side
of the node.
Eg 1
/ \
2 3
3
/ \
2 6
Round 3
Tell me about yourself
Given a string without spaces and a dictionary return or print all possible ways that the string can be
broken so that only valid words are formed.
HR
Tell me about yourself.
Strengths, weaknesses, why payu, why coding?, motivation, challenging moment.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/payu-iinterview-on-campus/
Amazon Interview | Set 105 (On-Campus)
Written Round:
20Q questions on C, data structures , some aptitude questions and other related concepts.
2 coding questions :
1. Merge overlapping intervals. This question has come many times so I am not repeating it.
2. Given a singly linked list you have to subtract the value of first node from the last node and so on
until you reach the middle node.
Output : 4->2->3->2->1.
First PI:
a.) getMinimum();
A detailed description on my approach , I gave him 2-3 approaches which were not satisfactory , He
told me to give it a fresh thought , then I have him a solution . He was satisfied and then he asked me
to code it.
4. Some basic questions on operating system concepts like CPU scheduling, why CPU scheduling ,
advantages , types. Questions on deadlock.
Second PI :
Third Round :
1. A detailed discussion on my projects.
2. What happens when you type in a url .
3. Suppose that a user reports that your website is taking a long time to load , suggest possible
remedies .
4. Difference between TCP and UDP.
5. Implement LRU cache. Code required.
6. A simple question on doubly linked list . Code Required .
It was a telephonic round . I was given a design problem . We have a customer using amazon Kindle ,
suppose he wants to borrow a book for some days , lets say x and wants to finish reading the book
within the days limit. The book contains ,lets say y chapters ,once he starts reading a chapter he has to
finish that on the same day . He can read the book only in a sequential manner , you have to tell how
many chapters should he read on each day so that he can finish reading the book .
It was an amazing experience, I learned a lot from it. Thanx a lot to GeeksForGeeks, you have helped
me a lot.
Suggestions / Tips :
They need a code for whatever algorithm you are telling them, so be specific, take your time to jump
to a conclusion .Discuss whatever you have in your mind , everything you discuss matters and creates
an impact , they will also guide you at times, and stay cool and relaxed, clear any doubts you have.
And an important thing is to try to justify each and every thing you say, that matters a lot.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-105-campus/
Amazon Interview | Set 106 (On Campus
for Internship)
Amazon came to our campus recently for placements and internships. I attended for internship and i
am sharing my experience here.
2nd: Given a number n and a number k. You have to find the next bigger number from n which is
obtained after exaclty k swaps.
Eg: Take n=43592169 and k=5
1st swap: 43952169
2nd swap: 49352169
3rd swap: 94352169
4th swap: 94532169
5th swap: 95432169 :- final number.
First Interview:
1. Check if a linked list is palindrome or not.
2. Given an array of n integers(positive or negative). Find the maximum sum of subsequence of the
array and also total number such arrays possible having the maximum sum.
Second Interview(Final):
1. A linked list consists of two pointers: a next pointer and a child pointer. We have to make the
linked list linear i.e. making all the child pointers NULL.
eg: 1->2->3->4
| |
5->6 8
|
7
answer would be:
1->2->3->4->5->6->8->7.
2. Given a distance n. A person standing at position 0 has to reach n. He can either take 1 step or 2
steps at a time. In how many ways he can reach there.
Finally some definitions from OOPS, OS and basic data structures.
I was finally hired for the Internship at Amazon. I would like to thanks Geeks for Geeks which helped
me a lot in my preparation.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-106-campus-internship/
Input:
First line contains a number T, the number of test cases.
Each test case contains a single string S. The characters of the string will be from the set { a, b }.
Output:
For each test case, print two numbers separated by comma; for example “x,y” (without the quotes and
without any additional whitespace). “x,y” describe the starting index (0-based) and ending index
respectively of the substring that must be reversed in order to acheive the smallest lexicographical
string. If there are multiple possible answers, print the one with the smallest ‘x’. If there are still
multiple answers possible, print the one with the smallest ‘y’.
Constraints:
1 ? T ? 100
1 ? length of S ? 1000
Sample Input:
5
abab
abba
bbaa
aaaa
babaabba
Sample Output:
1,2
1,3
0,3
0,0
0,4
Attention:
The constraints are designed such that an O(N3) algorithm per test case, would not pass.
Tower:
{
(height, 100), (weight, 50),
(xposition, 25), (yposition, 36)
}
Tree:
{
(area, 100), (noofleaves, 500),
(height, 25), (yposition, 36)
}
Each object you have, will have at most 4 properties. An object will have at least 1 property. Note,
from the two objects above, that it is not necessary for key in the properties to be same for all the
objects. Also, it is not necessary for the key to be different.
Now, given N such objects, you wish to answer M queries. Each query is represented by a set of
properties (again, at most 4 properties, and at least 1 property). The answer for the query is the
number of objects in the set, that have all the given properties. Two properties are considered equal
iff both the key and the value match.
For example, if you have the above two objects, then the answer for the following queries is
Query: { (height, 100), (yposition, 36) }
Answer: 1 // matches Tower, but not Tree
Input:
The first line of input contains N and M. This is followed by the description of the N objects. The
description of the i-th object will start by a number k, which is the number of properties associated
with the object. The next k lines contain two space separated strings – the property key and the
property value. Note that the property value is not necessarily an integer (although this is so for the
example above).
This is followed by the description of M queries. The format of a query will be exactly same to that
of the objects. Check the Sample Input for clarification.
One test file will contain only one test case. A single test case may contain several queries.
Output:
Print M lines. Each line must be the answer of the respective query.
Constraints:
1 ? N ? 10000
1 ? M ? 100000
1?k?4
Sample Input
2 3
4
height 100a
weight 50b
xposition 25a
yposition 36b
4
area 100a
noofleaves 500
height 25
yposition 36b
3
weight 80
xposition 25a
yposition 36b
1
yposition 36b
2
xposition 25a
yposition 36b
Sample Output:
0
2
1
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/directi-interview-questions/
Amazon Interview | Set 107 (For SDE-1)
I finished interviews at Amazon few days back. Here is my interview experience:
F2F-I:
1) Brief discussion on work in current company
2) Flatten linked list – http://www.geeksforgeeks.org/flatten-a-linked-list-with-next-and-child-
pointers/
3) Design a data structure which holds number 1 to n such that insert, remove(this operation will take
in a number between 1 to n as argument and remove that number from data structure if it exists) and
get valid element in the data structure operations are done with O(1) complexity
F2F-2:
1) Brief discussion of work in current company
2) Find and print longest consecutive number sequence in a given sequence
Ex: Input: 1 2 5 3 6 8 7
Output: 5 6 7 8
3) A fair die is thrown k times. What is the probability of sum of k throws to be equal to a number n?
F2F-3:
1) Brief discussion of work in current company. Why Amazon?
2) Why do you want to leave current company? What do you like most and dislike most about your
current company?
3) Sum two numbers represented by linked list iteratively and recursively.
4) You are given an infinite sorted array containing only numbers 0 and 1. Find the transition point
efficiently.
F2F-4:
1) Lots of HR, behavioral and team fit questions
2) User statistics are logged in the following format –
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-107/
Question 1: Powers of 5
http://community.topcoder.com/stat?
c=problem_statement&pm=12155&rd=15177&rm=314191&cr=22639266
Same question with modified language.
Example:
Question:
Given two very large numbers a & b in string format. You need to produce the result for the following
operation:
0 : Add a & b
1: Subtract a & b
2: Multiply a & b
Example:
123456789
987654321
Output:
0 ==> 1111111110
1 ==> -864197532
2 ==> 1219326313718945259
Question 1: Given the mobile numeric keypad. You can only press buttons that are up,left,right or
down to the current button.You are not allowed to press bottom row corner buttons (i.e. * and # ).
Example:
For N=2
Possible numbers: 00,08 11,12,14 22,21,23,25 and so on. We have to print the count of such numbers.
I solved it using DP in first attempt. He was quite impressed as I took very less time to think of the
exact solution.
Example:
N=8
ar[]= {4,3,6,6,5,4}
Round 4 : Technical + HR
Time : 1 Hour
1) Introduction.
2) Asked everything about my project every minute detail, even I was asked to write code for few
sections of my code i.e. how I implemented those features.
3) Asked few questions on teamwork that how would I handle particular situations.
4) Strengths and weaknesses.
5) Tell me about one thing that you have done in college and proud of be it in academics or in any
field.
6) Best and worst classmate till now and Why !!
With this as the final interview my long journey of Interviews ended . Wish you all, all the
2) Given an array: 1,3,2,5. Find out the minimum number of array elements that should be changed so
that the all elements in the array are strictly greater than the previous elements
output :1
ie 1,3,4,5
(2 can be changed to 4).
He then asked some questions on journalling file systems, log based recovery etc.
Telephonic Round 2:
The call lasted for 45 mins.Started with discussion on my projects.Then asked me how much i know
about python and java.
He then asked few questions on normalisation of databases.After this he then moved on to data
structures.
1) an array contains elements from 1 to n .One number is missing.Find that out .i discussed about 4-5
methods with him.
2) an array contains elements from 1 to n.One number has been replaced by some other number.Find
out the missing and the repeating numbers (again about 4-5 methods were discussed).
3) find out the first non repeating number in a string.
4) Puzzle:-
find out the minimum set of weights required to measure weights upto 20 kg
I said: 1,2,4,8,16
He then extended question to 40 kg
I said: 1,2,4,8,16,32 (ie powers of 2)
He then asked to do better. He gave me the hint that 2 can be measured using 1 and 3
i then came up with the general solution ie powers of 3. 1,3,9,27 etc
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/d-e-shaw-interview-set-5-campus-internship/
Stanley Interview | Set 7 (On-Campus)
Recently Morgan Stanley visited our campus for jobs and interns. I had applied for the position of an
intern and there were two rounds for us :
It consisted of 10 questions on general aptitude . They were fairly easy but time consuming. After
attempting these 10 questions, we were asked to choose any language of our choice – C, C++ or JAVA
and based on the selection, there were 20 questions based on that language. For C, most of the
questions were to predict the outputs. There was +1 for each correct answer and -0.25 for each
wrong answer for all the 30 questions of both sections.
There are sectional cut-offs for each section( aptitude, language proficiency and coding), so do
attempt sufficient number of questions from each section.
For the technical interview, a mixture of questions were asked based on arrays, linked lists, trees and
hash maps.
Cant remember any specific one but were fairly easy.
For the HR interview, normal personal questions such as tell me about yourself, why Morgan Stanley
, etc, were asked.
TIP: Score good in coding round and technical interview to grab the opportunity. BEST OF LUCK.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/stanley-interview-set-7-campus/
Amazon Interview | Set 108 (On-Campus)
Dear, I just got hired by Amazon in my campus placement drive. Below are the details of my selection
process with amazon.
Fist Round(Online):
20 MCQ questions and 2 Coding Questions .
Coding Questions :
1. Merge overlapping intervals(Very well known repeating problem).
2. Given a singly linked list you have to subtract the value of first node from the last node and so on
until you reach the middle node.
Eg: Input: 5 -> 4 -> 3 -> 2 -> 1
Output: 4 -> 2 -> 3 -> 2 -> 1
F2F-1:
1) Given a sorted circular link list and a pointer to random node, now insert a new node. I did it , but
i used if and else for some special cases in my code so he asked me to do it without if else for special
cases (generic & simple code ).
2) Given a pointer to node in tree and a root pointer. Print all the nodes which are at a distance k from
the given node.
F2F-2:
1) He gave me task scheduling problem:
Given a set of modules, some modules depend on previous modules and can only be executed, if the
requirements of that module is complete.
so he asked me to give a schedule for above modules such that when a module is executed then all
requirements of that module are complete.
so answer would be D E C B A
2) Given a string of letters from alphabet. Remove all pairs(2 consecutive same character) of
characters which occur consecutively.And do it recursively on remaining string.
3) Given a binary tree set the sibling pointers . I told him that i already know the question so he said
code it .
5) Discussion on my projects
F2F-3:
He gave me 3 coding questions :
1) Given a number n find the number of valid permutations of a string formed using characters ‘(‘ and
‘)’ . A string is valid if it has matching opening and closing parenthesis .
Eg: given n=2 so you can have 2 possible permutations which are valid (()) and ()() .
2) Given a singly link list reverse every 3 nodes and if nodes are less than 3 then reverse them also.
3) Given a string of letters from alphabet insert frequency of each character in the string.
2) He saw that i had given a seminar on cloud computing and sky computing so he started with cloud
computing .Then he asked me why didn’t cloud computing exist 15 years ago .
3) What do you understand by 32 bit and 64 bit OS ? . He asked for explanations in terms of hardware
and software . Then he asked me that will a 16 bit program run on 64 bit OS without any problem .
He asked me what can be the reason for problem faced .
4) What happens when you type www.amazon.in in your browser ? . He asked me for the set of
activities that take place during this time . Then he went into asking how do you get to know the IP
address of your ISP . Then after a lot of discussion he was satisfied .
5) Some questions about Complexity of a algorithm . Asked me to prove complexity of few sample
codes .
6) Some questions about storage space of a variable( data segment , stack , heap , BSS ). Some
questions about Macro preprocessors and there problems & solutions .
7) Some questions about error in sample code given (like returning non compatible pointer type or
returning address of a local variable etc )
8) In DOS and Linux shell when we press the up arrow we get the recently used commands . He
asked me to implement this facility. Then he asked me to do it if memory bound was very tight .
9) This was a question to check my analytic skills . We have customers using www.amazon.in for
buying phones. Let say we have a user who visits www.amazon.in for buying mobile phone . He
selects a mobile then fills his address details and then when he finally goes for payment then he gets
to know that this phone is not available . So how can you improve the over all user experience . Then
he asked me that will you suggest redirecting the user to some other site if the product is out of stock .
10) Some HR Questions like What are your areas of your Weaknesses ? What are you doing to
improve on them ?
It was an amazing experience. Thanks a lot to GeeksforGeeks for helping me get my dream job
Suggestions/Tips :
1) Discuss your approach as many times as possible.
2) Don’t start Coding the problem until the interviewer asks you to do it.
3) Tell everything that you are thinking about the problem. They are more interested in knowing how
you are approaching the problem.
4) Asks for hints if you are stuck up. They will help you.
5) If you don’t know answer to a question then please say it directly. It will save time for other
questions.
6) First be confident about your approach then only code it.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-108-campus/
Aricent Interview | Set 1 (On-Campus)
Aricent(On Campus) Recruitment Process Divided into 3 parts:
Round 3 : HR interview
1) Tell me About yourself.
2) About your family.
3) Questions From Resume.
4) In which area you want to groom yourself.
5) Preferred Job Location.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/aricent-interview-set-1-campus/
Advice: Many people say that making 1 code is enough to clear the 1st round while this is not true, I
made both the codes and many of my friends who made only one code were rejected. Everyone who
made both the codes were selected. There were some students who cleared this round by making only
one code but don’t try your luck here by making only one code is my suggestion.
Asked me my favorite sorting algorithm. My favorite is insertion sort but I told him merge sort
because I knew a lot about merge sort so I wanted to drive the interview towards merge sort and as
expected he asked many questions on merge sort and I gave him all the answers.
He asked me to build a tree from given preorder and postorder traversal of tree, I said it is
impossible to build from only these 2 traversals , you have to give me inorder to build a unique tree.
Round 4 (Coding)
Deep discussion about the project which was on security. The interviewer asked me to design the
database of a chat application similar to whatsapp. I did it and said what if some intruder access the
database, then I said I will apply md5 encryption on phone numbers, then he asked me how md5
works. Why only md5? He asked me what are Man in the middle attacks and asked me to remove man
He then asked me what is cache, why are cache fast and how it differs from RAM and hard disk
architecturally. This one was a bouncer, I hated computer architecture, admitted I am a beginner in
computer architecture. He laughed and said thank god, there is one thing in which you are a beginner. I
laughed too
Where random pointer points to any random node of the binary tree and can even point to NULL, then
how will you clone this tree.
This was the culprit question who led to my rejection.
I gave a lot of thought to it, but wasn’t able to solve it directly. I said we can use hash, then he said
what if there are duplicates in the tree then your hash will fail, then I said we can convert the binary
tree to doubly link list in place then clone the doubly link list, he said ok but how will you generate
the original tree from doubly link list, I never said it was balanced. I gave a lot of thought here, nut
yeah couldn’t solve it.
I got the solution by trying it after the interview, you can clone the left and right pointers easily by
traversing the tree and to clone the random pointers, you can apply this : newroot->random=oldroot-
>random; oldroot->random=newroot;
Then traverse new tree again and put newroot->random=newroot->random->random.
2. http://www.geeksforgeeks.org/find-the-row-with-maximum-number-1s/
I solved it efficiently.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-109-campus/
Amazon Interview | Set 110 (On-Campus)
Hi, Amazon visited our campus few days back. Before I start off with my experience, here are few
suggestions.
1. Don’t just go through the codes. First try it on your own, that’s very important. Once u have cracked
a problem, write it in a paper and check for the corner cases.
2. For the online round. GeeksQuizis enough to get you through the MCQs. For the coding part, once u
have cracked a problem, always try to run the program at one go.
3. OS, DBMS and Networking. If you get a good hold on these subjects, it will make you stand apart
from other candidates.
First day:
20 MCQs(Data structure, C, C++, OS, Probability ).
2 programs :
1. Given an array of integers. Segregate all the non-zero numbers at the beginning. Print the number of
non-zero integers and the minimum number of swaps required for these operations.
2. Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that
prints all occurrences of pat[] and its permutations (or anagrams) in txt[]. You may assume that n > m.
Second day:
Suggestion: Always think loud when you are coding
Round 1 : PI 45 min
1. Discussion on Project.
2. Code : LCA of a BST.(check for all corner cases)
3. Code : LCA of a Binary Tree(check for corner cases)
4. Code : Maximum sum subarry along with its starting and ending index.
5. Code : Heap operations
As I carried on telling him the approach, he went on modifying the question ( what if A2 is much
larger than A1 ?, what if they are of the same size ?)
A lot of discussion on complexities for all modifiactions. He was quite happy with my answers.
Finally he asked me to code the O(nlogn) approach.
2. Neworking : He started with Transport Layer( discussion on ports. How data from applications are
changed into packets ?, etc).
Then he went to Network Layer (A lot of discussion on subnet masking and how it is used by routers
to map the IP address of incoming packet, how a Subnet is different from Internet).
Next we moved to Data Link Layer( Discussion MAC addresses, sliding window protocols, etc).
3. DBMS: What is indexing?, Why indexing ?, How to implement indexing ?, What are the different
types of Index? .
Differences among Inner Join, Left Outer Join and Right Outer Join. He followed it up with a SQL
query on Outer Join.
As my first three rounds went very well, fourth round was of 15 minutes only.
GeeksforGeeks has helped me throughout my preparation. This is the best site for clearing your
concepts on Data Structures and Algorithms. GeeksQuizhas helped me to get through the MCQs in the
online round. Thanks again !
Keep Smiling !
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-110-campus/
Amazon Interview | Set 111 (On-Campus)
Amazon visited our campus, these are the questions that I faced.
2. Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that
prints all occurrences of pat[] and its permutations (or anagrams) in txt[]. You may assume that n > m.
o/p :0,5,6
1st PI
1. About 10 minute discussion on my project on Cloud Platforms and Big Data Analysis in Yahoo
SDC. I asked him some doubts and he answered them clearly.
2. Given a string of digits, output all the dictionary words they can represent. (Basically smart dial
algorithm of an android phone). Each digit represents the corresponding characters on a
cellphone as follows.
e.g. : I/p : 3323 O/p : DEAD , DEAFFirst, he asked me how I would store the dictionary. When
he was satisfied by my approach, he asked me to write a recursive function that would do the job
if a dictionary is given as an input.
3. Then he gave me a class design. He went on changing his requirements and I was asked to add
support for them in my implementation. At first, his requirement was to draw a rectangle and a
circle. Then he went on adding requirements and finally it was to draw different specializations
(like curved-edges, skewed-edges, dashed-lines) of rectangles, triangles and circle. He gave a
constraint that support for a new specialization can be added easily in my design.
2nd PI
1. Given, the starting and ending time of different meetings, what is the minimum number of
conference rooms that will be enough to accommodate all of them.He asked me to code it.E.g, :
O/p : 2
2. Implementation of a doubly-linked list using a single pointer. I didn’t know the answer at that
time. He gave me a few hints and I was able to solve it. Then he asked me to code it.
3rd PI
1. Given an array of integers. This array denotes ‘our’ own ascending order of the elements. So if
the array is {2,3,1,4}, by mathematics we can say that 2<3<1<4. Given another array, sort this
new array in ‘our’ ascending order.
Let’s say the new array is {1,2,4,3,5,4,9,2}, output will be {2,2,3,1,4,4,5,9}. Note that since 5
and 9 do not occur, they are sorted by actual ascending order at the end.
2. Return the left-view and right-view of an n-ary tree in a single traversal.
4th PI
1. 10 minute discussion about my internship in Cloud Platforms team in Yahoo SDC. He asked me a
few HR questions like what do you think was your biggest screw-up in college life, etc.
2. Find power(a, n) iteratively without extra space in O(log n) time. He gave me a lot of hints. But
unfortunately I couldn’t solve it.
3. Pre-order traversal of a binary tree without using recursion.
Suggestions
1. Firstly, mugging up of codes will never take you far. If you find a problem that is solved in
geeksforgeeks, rather than blindly mugging up the code, read the description properly. Try to
understand what is being done and why is it being done. Try to understand each and every line of
code. It is naïve to expect common known questions in interviews. But, if you can understand the
approach of the codes solved in geeksforgeeks, you can use it to solve a plethora of problems.
2. In an interview, always think out loud. Explain what you are doing and why you are doing it. If
you solve a problem within a few minutes without explaining your steps, the interviewer will
assume (perhaps not incorrectly), that you have mugged up the code. This creates a very bad
impression.
3. Follow proper etiquettes. Shake the interviewer’s hands while entering and while leaving the
room. Also, try to ask proper questions to the interviewer when he gives you the chance to do so.
These are the small things that set you apart from the other interviewees.
4. Lastly, never be too tensed. Always remember, rejection is a part of life. Luck matters a lot in
job interviews. So don’t be disheartened if you are rejected. You can always apply later.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-111-campus/
Microsoft Interview | Set 28 (On-Campus)
Microsoft Interview Experience(On Campus)
1st Round :
Online test was taken in the morning by cocube with 15 MCQ. Time was given for this 30min.
I had some problem (can’t write here) so I did in 10 min and rush back to room. (I think u understand
why I came back to room.)
After 2 hour result announced and was in the shortlisted of 78 students.
Result Declared after two day on Friday. My name also were there with 28 students.
After one hour they announced the result of Round 4, I was the one of 7 students out of 12.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-set-28-campus/
Motorola Mobility(Bangalore) Android
Developer Interview
I have 2 yrs of experience in android domain.I have applied for Motorola in May.Process spanned for
1 month long.
I could not find much info about their interview process on net.So i am sharing my experience
here.Hope it helps others.:)
Source
http://www.geeksforgeeks.org/motorola-mobilitybangalore-android-developer-interview/
2. There is a matrix mat[m][n] with entries as 0 or 1 When you are at 1 you can move in all the eight
directions and when at 0, you have to return back. Find the number of cluster of 1’s
clusters ((0,0),(0,1),(1,0))
(1,2),(2,2),(2,3),(3,2)
(3,0)
Round 1:
1) Introduce yourself.
2) Any moment when you worked really really hard to solve a problem.
3) Find the best fit for a packet to be fitted in a rack rack sizes are given in increasing order in other
words find the ceil value of a key in sorted array.
Round 2:
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-112-campus/
Amazon Interview | Set 113 (On-Campus
for Internship)
Amazon visited our campus to offer internship for 6 months. There were 3 rounds – an online coding
round and 2 face to face interviews.
1. Given a txt[0..n-1] and pat[0..m-1], write a function search(char txt[],char pat[]) that prints all
occurences of pat[] and its anagrams in txt[].
2. (Cluster Program) You are given a 2d matrix containing 0s and 1s. From a given position in matrix,
you can move in all the 8 directions i.e. (i+-1,j),(i,j+-1),(i+-1,j+-1). You have to print the number of
clusters of 1’s in the matrix. Two 1’s lie in a cluster if and only if we can move directly from one 1 to
another.
Input : m=5,n=5.
Mat[] = 1 1 0 0 0
0 1 0 0 1
1 0 0 1 1
0 0 0 0 0
1 0 1 0 1
Output : 5
First: (0,0),(0,1),(1,1),(2,0)
Second: (1,4),(2,3),(2,4)
Third: (4,0)
Fourth: (4,2)
Fifth: (4,4)
2. Given that at Amazon.in the details page of an item shows only one field that is dynamically picked
up from the database, we have to improve the performance according to the line:
“80% of the users visit details page of 20% of products.”
I said we could store these 20% on the web server so that we don’t have to fetch the item details from
database everytime. He asked me where and how will i store it. I answered Main memory and will
use BST to store it. Then after a lot of discussion(about 30 mins) on how will the get and put
operations be used, he was satisfied with the solution.
3. Given a linked list placed in memory, what problems can arise if simultaneous operations are
performed on the list. From here he started asking about threads because the answer was related to it.
5. What steps are taken when the os shifts from one-thread execution to another?
Finally, I was hired. Thanks to GeeksForGeeks for helping me throughout my interview preparation.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-113-campus-internship/
Intel Interview Experience
Students were shortlisted based on their resumes. [ Mainly on the basis of OS Projects ]
Technical Round 1
1. Write the most efficient algorithm to find square/square root of a number.
Technical Round 2
Behavioral Round
1. You are Intel’s representative for India and you are about to board a flight to US for a very very
important billion dollar deal. But at the airport you are asked for a bribe of Rs500/- . Will you give
the bribe or not?
Ans: NO!!!
etc….
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/intel-interview-experience/
1. Given an unsorted linked list, remove all duplicates without using temporary buffers.
2. A number starting from 1 can be got by either multiplying 3 or adding 5 to it. Given a number, find
the sequence of operations to get it or say it’s not possible.
e.g: 13 is 1 * 3 + 5 + 5 but 15 you cannot get.
3. Given a tree, get the path from root to leaf such that the sum of nodes in the path is maximum.
4. There are 50 people in a bank. Each person is either an employee or a customer. Each person
knows what everyone else is. The police can ask person i what person j is. Customers will always
tell the truth. Employees are evil geniuses who may not tell the truth. The police have to find at least
one customer asking a maximum of 49 questions. More than half the people are customers.
2. How many times does the minutes’ hand cross the hours’ hand during one day?
3. Given an array which can contain either 0s or 1s, write an algorithm to find the length of the longest
subarray of all 1s and all 0s.
2. Write an algorithm to delete an element from a circularly linked list. Optimize it. Implement it in
Java.
3. Give me an example of a machine learning algorithm which you will use for giving suggestions on
a e-commerce website.
Round Five (Technical / HR, 60 minutes):
1. Why do you want to join Intuit?
2. What will you do if a conflict arises in your team?
3. What were the major challenges you faced before?
4. Design a database schema for an Android app which calculates your GPA and stores it in a SQL
database.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/intuit-campus-interview/
Intuit Interview | Set 2 (On-Campus)
Round One (Written round, 60 minutes):
1. Given an unsorted linked list, remove all duplicates without using temporary buffers.
2. A number starting from 1 can be got by either multiplying 3 or adding 5 to it. Given a number, find
the sequence of operations to get it or say it’s not possible.
e.g: 13 is 1 * 3 + 5 + 5 but 15 you cannot get.
3. Given a tree, get the path from root to leaf such that the sum of nodes in the path is maximum.
4. There are 50 people in a bank. Each person is either an employee or a customer. Each person
knows what everyone else is. The police can ask person i what person j is. Customers will always
tell the truth. Employees are evil geniuses who may not tell the truth. The police have to find at least
one customer asking a maximum of 49 questions. More than half the people are customers.
1. Given a sentence say, “I love Intuit and Intuit loves me”, find the number of times the word “Intuit”
occurs in the sentence.
I asked him, any language restrictions or any other constraints. He told any language, but it has to be
better than brute force and the coding standards must be production level with all exceptions taken
care of, properly modularized and neatly structured.
I first told him my approach and he was satisfied. I wrote the code in Java.
2. He extended the question. Assume you have 2 million files with some text in it. How do you find
the number of times the word “Intuit” occurs in all these files. I suggested an approach with O(n), but
he said it can be better optimized.
4. He saw that I had mentioned UI developer in a web project. He drew the Facebook news feed
layout on a sheet of paper and asked me what happens when you click on an image thumbnail in
Facebook. I told him that the background goes dark, the picture becomes bigger and the comments and
likes appear to the right of the picture.
He asked me to write HTML and JavaScript code for that.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/intuit-interview-set-2-campus/
Morgan Stanley Interview | Set 8 (On-
Campus)
Recently Morgan Stanley visited in our campus for FTA(Full time analyst) and intern programs.
Written Test
It was the technical + aptitude test that anyone of us ever faced. 10 aptitude questions and there was a
choice for technical part. We could choose among the three languages, C, C++ and Java. There were
20 technical questions. Total 30 ques. within 45 min. There was sectional cut off. I attempted 3 from
aptitude section and 7 from languages(I chose C language).
Then there was a coding round immediately after that which comprised of 3 ques. in 1 hr.
a) Determining the range of a URL from many given ranges which fits the input URL.
b) Huffman Coding.
c) Determining the day of any date.
I was able to do only the last question completely and gave a try to Huffman one.
Throughout the interview he was noting down something or the other. There were many many sheets
with different headers, on which he was writing down something. The results came late night and they
selected 8 people for the next round.
Group Activity
We were divided into two groups of 4. There was sheet of paper with the instructions for each group
and two boxes of LEGO blocks. The round was conducted in a board room and all the panel members
were sitting around us to judge us throughout the activity.
We had to build up a functional unit for Morgan Stanley, and we were judged on the basis of our
thought process, our approach, our goal, our planning, our execution, our team handling, and many
many such factors. Throughout the discussion we had to discuss loudly so that the judges could here
our thought process.
There was a twist in between when another letter came from BOD and we(both groups) had to merge
and build the prototype together now. So we now had less time and we had to come up with
something that includes both the groups’ ideas.
In all we were given 40 min.
After that we had to present our prototype. There was a session of 30 min during which a panel of 10-
12 judges asked us questions about our approach, our team spirit, what we thought of other members
and all. It was something extremely new that we ever face in our lives.
HR Interview:
It was two on one, started with casual talks and then proceeded towards the business end of the
Morgan Stanley’s HR Interview. It was intense, and when i say intense then literally i mean it. They
asked me 100+ questions on different situations and scenarios that a employee faces. I don’t
remember a lot but most of them were manager related. I answered something then completely
changed the situation and came up with something more challenging.
They wanted to check what kind of a person you are? How you look at things? What your take on
different situations? and stuff like that. You should just be yourself and please don’t try to say
something that you don’t believe in because they were digging deep. They were very very polite and
extremely supportive in a sense that they were listening to my responses keenly. In the end, they asked
me to ask anything and i came up with few general questions such as work environment in the
company, how you like it, etc.
My only suggestion to all job aspirants is to focus on what you like and then look for it on
Geeksforgeeks.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/stanley-interview-set-8-campus/
Microsoft Interview | Set 29 (On-Campus
for Internship)
Recently we had microsoft interview for internship in our campus.
Online Test
It was the technical + few aptitude test. There were around 4-5 set of mcq for all students at
Cocubes.com. i was lucky to have a easy one.
1) Given a linked list which contains series of numbers seperated by “0”. Add them and store in the
linked list in-place.
2) Given a binary tree and value V. delete all the leaf nodes whose values are equal to V. It must
handle all cases for example if u delete both leaf from a node Say B. Then the node B also becomes
the leaf node.
This round was pretty easy one . first one can de done in O(n) and 2nd one can be done by postorder
traversal.
I was confident that i will be selected for next round. after one week results was announced and 24
students were selected for next round.
Many of them were easily eliminated from this round. Neatness and indentation also matters.
2) given a chess board nXn size and knight and u start from position (a,b) and have to reach (C,d) in
minimum number of steps and there can be wall in some squares boxes also which blocks knight.
i was really nervous and in tension i gave him DFS solution. he kept on asking me that can i improve
it or not and finally i told i can apply djksthra algorithm. but i dint mentioned the word BFS. i came
out and i thought i won’t be selected for next round.
1) Given a singly linked lists of 2n size. First n and second n are sorted. Sort the entire linked list. he
asked for all possible solutions. i told him solutions for
1)swaping by node
2)swaping by data
3)merge sort method
4)hashing (counting sort method )
it was not too hard one .
Finally i was selected for microsoft internship. The people from microsoft were also very good and
friendly. I read few websites before Interviews and geeksforgeeks is one of the best among them. Its
really good to prepare for interview from geeksforgeeks and each and every round matters in
microsoft.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-set-29-campus-internship/
Zoho Interview | Set 1 (On-Campus)
First Round: (Aptitude written round)
This round consisted of two sections “Reasoning Aptitude” and “Technical Aptitude”. Reasoning
section was more like puzzles so do concentrate on logical puzzles. Technical Aptitude dealt more
with “operator precedence”, “pointers”, “iterations”, “dynamic memory allocations”.
P M
R A
O R
G
O R
R A
P M
2. Given a set of numbers like we want to find sum of weights based on the following conditions
1. 5 if a perfect square
2. 4 if multiple of 4 and divisible by 6
3. 3 if even number
And sort the numbers based on the weight and print it as follows
w e L C O
M E T O Z
O H O C O
R P O R A
T I O n
Start index :
End index:
4. Given a 9×9 sudoku we have to evaluate it for its correctness. We have to check both the sub
matrix correctness and the whole sudoku correctness.
Where the first string is “child”, second string is “Father”. And given “ronaldo” we have to find his
no of grandchildren Here “ronaldo” has 2 grandchildren. So our output should be 2.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/zoho-interview-set-1-campus/
Adobe Interview | Set 10 (Software
Engineer)
Written:
Aptitude: Objective 50 min 45 questions
LR- 2 passages-5 each
DI- 1 paragraph- 5 each
Mathematical
Exactly same paper at this link
http://www.gohired.in/2014/03/adobe-aptitude-c-language-written-test.html
Easy only. Just time concern for those who are out of touch. My suggestion will be to do the LR in the
end.
O/P questions related to string.concat, equals methods. Error pointing codes with options
F2F Round 1:(1.2 hr)
1) Brief intro about work.
2) Why do you want to shift when Mobile (and ecommerce) are already the most happening things.
3) Test cases for mail attachment(word doc) not being opened scenario
4) WAP to convert a binary to decimal.(i wrote by taking the parameter as String, he asked me to do
by taking as int)
5) WAP to print sum of first ‘n’ prime numbers
6)
He asked me if i have any questions.I asked more about the role and team. He explained in detail
about the team and also about Adobe subscription model.We had a general discussion over this
business decision.
He asked me for questions. I asked them if there will be option to shift to developer position.He said
yes and explained about their open culture.Also explained how they interact and work closely with
developers.
offered.
(My suggestion will be , answer only if you know and you are sure about it otherwise dont even try)
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-set-10-software-engineer/
Flipkart Interview | Set 12 (On-Campus)
I recently got selected in flipkart during an on campus placement drive. These were the questions
faced by me.
Round 1(F-2-F)
I was asked variety of questions ranging from strings to dp to graphs.
1- Given a corrupted string i.e it’s original string with just the spaces at wrong places, Construct the
original string .We are given a dictionary of words.
Ex:-
string : Com put erengineering
original string: Computer Engineering
I gave the interviewer a recursive solution. The I was asked to code it. After that I was asked whether
I could optimize the code further. I could not.
2- Given a lane where there are various houses each containing a fixed amount of gold. Now a robber
has to rob the houses such that when he robs a house the adjacent one cannot be robbed.Calculate the
maximum amount of gold collected by him.(Classic Dp question).
3- Given 1000 elephant ,none of whom exact heights are known, there are statements given which
will be of two forms
4- Topologically sort the DAG(excluding forest arrangement) given if the source is not known.
For Ex: if edges are 1->2,1->3,2->4,3->4 .
then normally we would run dfs from each pt and then choose the node as source which visits all the
nodes.
This fairly is an O(n^2) algo.
I was then asked whether an O(n) algorithm is available.
I told the interviewer that if we run dfs from each node but instead of flushing clean the visited array
each time we just keep the data then the dfs from the node after which whole visited array is marked
i.e all the nodes are visited is the source.
when running dfs from a node if at any pt a visited node is encountered we leave the node and move
to next child.Just by keeping a stack also during the dfs ….after all the values int the visited array is
marked we will have the final topological sorted order of the DAG in the stack.
5- Given a pond where all the stones are lined at a distance of one unit (C in each row and there are
R such rows), each stone has a special value which denotes the length of the jump the frog can make
i.e if frog is on stone (x,y) and value is k then frog can jump to (x+dx,y+dy) where dx+dy=k and frog
doesn’t leave the bounds.Find the min number of jumps to reach the stone at (R,C).
Visualized it in from of a matrix.Did it using DP ……..In case you are wondering, for a frog at cel
(x,y) run two loops of dx and dy where net dx+dy=k and do dp[x+dx][y+dy]=min(dp[x]
[y]+1,dp[x+dx][y+dy]).
Answer would be in dp[R][C].
Then I was asked to bactrack the path which was quite easy as for dp[x][y] subtract 1 from it and look
for the resulting value in cells (i,j) where i
ROUND 2(F-2-F)
Technical + HR
1- Implement LRU and LFU page replacement policy using Data structures.
Had already encountered the question while preparing for Amazon.
I did it using Doubly Ended queue and a hashmap(Map or BST does not matter as both have same
complexity for retrieval and insertion of data).
2- Given a normal die and a blank die. Fill in the blank die such that probability of sum of the number
from both die is same for all the resulting sum and sum has a range from 1 to 12.
After a hit and trial I realized the number on blank die would be repeated to given a even probability
distribution.
Min element required on blank die = 0
Max element required on blank die = 6.
mark 3 sides with 0 and three with 6 .
Due to the fact that the probability of occurrence of 0 and 6 on the blank die is same and equal to 0.5 ,
P(Each sum)=1/2*P(i)=1/12 for each number.
Now taking 1/12 in the start then deriving the solution should have been easy but due to the tiring day
and worse weather my mind took the backdoor method.
Some HR related questions to minor projects done in the college and questions related to my
experience with flipkart as a customer.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-set-12-campus/
Interview Experience at Rockwell Collins
1. Difference between risc and cisc:
Risc more number of registers, what sir said is in risc for instructions like ldm and stm instructions
cycles or loops are fixed like 12 or 13 but in cisc it depends, so therefore for industrial purpose risc
is preferred when compared to cisc.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/interview-experience-rockwell-collins/
2. Given a list of numbers find the numbers occurring even no. of times.
Round 1:
What do you understand by polymorphism? What are constructors? When are copy Constructors
used? What are virtual Destructors? Why do you need them?
Detect whether a linked list has a loop. Find the length of the loop.
Print the values of the Full Nodes in a Binary tree. (A node is said to be full if it has both right and
left children).
Round 2:
Tell me something about yourself.
Given 2 sorted arrays, find the median element. (without extra space)
Search for an element in an array. (He just wanted n comparison i.e. I was using a for loop which has
a comparison and another comparison within the for loop to find the element., he counted them as 2
comparisons. Hence 2n comparison.)
First Normal Form. If a schema has a date attribute is the schema in 1NF.
Round 3:
Tell me something about your project.
Find the index of the element which is greater than the given number(the number may or may not be
present in the array). The array is sorted , contains duplicates .
Delete n elements after m elements in a linked list, continue till the end of the list.
He gave a list of functions that can be used in a file. Find the last n lines in the file using those
functions only. (Have you heard this question before? Have your friends discussed it with you? If you
were in place of your friends would you tell them about your questions?)
Given a 2-d Matrix sorted row wise and column wise . Find the k-th smallest element.(Not the min
heap method, he needed a more optimized method. He guided me through the question.)
Note: The panellist were quite experienced they will understand whether you know the question or
not. So just own up. Test Cases are very important.
Microsoft has an amazing set of panellist. They are only interested in the basics. They won’t ask very
difficult questions, because they want to understand whether you can come up with a solution.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-set-30-campus/
Morgan Stanley Interview | Set 9 (On-
Campus for Internship)
1st round– written test 30 objective questions along with 3 coding questions.
Time allotted 90 Min. It consists of 3 sections:
1.First section had logical and mathematical aptitude questions. A total of 10 questions.
2.This was language dependent section. You were allowed to choose any of C/C++/JAVA language
and there were 30 questions in this section. The level of difficulty was moderate.
3.Third section consist of 3 coding questions which were as follows:
Q-1 Check whether the given strings are anagram of each other. Space has to be neglected.
Q-2 Three vertices of a triangle were given along with one more point.We have to check whether a
given point lies inside a triangle or not.
Q-3 Given three strings A, B and C. Write a function that checks whether C is an interleaving of A
and B. C is said to be interleaving of A and B, if it contains all characters of A and B and order of all
characters in individual strings is preserved.
2nd round – Technical questions, Coding questions and HR round all together
Introduce yourself.
Share some nice experiences in college.
Technical Questions
1. Given an array with base address 4000 and the size of array is arr[20][20]. Determine the address
of index arr[3][4].
2. Function prototype of printf.
3. How malloc is used and where it is use. Also tell the return type of malloc and why you need to
type cast the return type of malloc.Explain it with an example?
4. If we will take a void*p and int*q and we write q=p. Then what will be the output in C and C++.
5. In which conditions your copy constructor is called. Mention all the possible condition.
6. What is the difference between early binding and late binding.
7. Asked a question on the concept of object slicing.
8. Asked a question on the concept of late binding.
9. What is VPTR and V-Table. Where V-Table is actually present and whether it is different for each
class or shared among all the classes. And where the VPTR resides ?
10.The size of class will increase on using a virtual pointer. If yes, explain the reason behind it.
11. Pure virtual function and its implementation with the help of example.
Now switched to some Coding Questions
Q-1 You have a linked list having data, next pointer and random pointer.The data may contain the
repeating values. Now to store the whole information in any new data structure except linked list and
return that structure so that the other user can make the same linked list with the help of data in new
data structure used.
let suppose the linked list is
2 –> 3 –> -3 –> 4 –> 5 –> -3
Now random pointer of 2 is pointing to first -3 and random pointer of 3 is pointing to second -3 and
so on…
Q-3 With the help of which data structure you can implement a parking system for different category
of wheeler(2 wheeler , 4 wheeler, 6 wheeler).
At last
Why you want to join Morgan Stanley ?
Total duration of the interview round was about 1 and a half hour..
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/morgan-stanley-interview-set-9-campus-internship/
One Payu Interview Experience
Company : One payu india ,Gurgaon
Consisted of 5 coding questions to be done in 1 hour .Most of them were based on algorithms but
some were adhoc also . Everyone has a different set of questions jumbled from a pool of questions .
Do 3 and you will definitely be through to the next round.
2. Given an array of ints of size n having no. from 1 to n+1 . find the missing no. Atleast two solutions
expected .
3. P node problem in linked list .Its solution . I told him Floyd cycle .he asked why I moved fast
pointer by two and not by four . told him we have to check multiple conditions to find whether there is
a second/third /fourth node otherwise if we try to access a node that doesn’t exists then it’s a runtime
error. He looked satisfied.
4. What is a stack ?
5. Find leader elements and ii) next greater element for all in an array.
5. Find whether a tree is a BST or not . Gave him 2 solutions :Inorder traversal and check if sorted
with or w/o array , use recursion in top down manner. He was expecting another solution which uses
property of bst . Told him the min , max solution .told me to code latter two .
6. Game question : 2 players play alternately . 1st always has to win.he can choose whether to play
first or second.there is an array of coins(ints).at a time the player can choose only extreme ends.ex: 1
3 2 17 9 so player can choose only 1 or 9,if it chooses 9 then other can choose only 1 or 17.finally the
player with max coins sum will win . what strategy will player 1 choose to win always.. Solved it
with some help from interviewer . He extended the ques. Now the player 1 has to win with max sum
(a good dp question).
The round went very good and the interviewer said he was impressed .
1 . Given a text .there is a string in the text somewhere which is rotated version of original string .find
and correct the rotated string in the text .ex: text – there was a company named entureacc in 1990s.
string : accenture . gave the solution using 2 arrays . he told me to take advantage of space(‘ ‘) and
code solution. So i used space as delimiter and coded solution using a 26 size char array.
2 . Reverse every word in a string . Code it . make sure ur code doesn’t have any bugs and try to code
faster.
4. Multiple and multilevel inheritance in java. Is there multiple inheritance in java and why ?
This round went perfectly and I was called for 3rd round immediately .
Seemed like a police interrogation room with only 2 chairs and a table.The interviewer told me that I
have to write complete codes for all probs in this round. I stayed confident…from outside ..
1) Rotate a square matrix by 90 degrees using O(1) space .The question was new to me and after
struggling for about 10-15 minutes while the interviewer was busy with his laptop, I solved it and
wrote complete code for it.
2)Given a binary tree ,I was given two pointers p1 and p2 to two nodes in the tree I have to swap the
subtree rooted with these nodes . he asked me the base cases for this prob. I told him none of p1 and
p2 should be ancestor of other .p1 and p2 should be in tree and they should not be null . Another
constraint was that I can traverse the tree only once. I told him that I will find lca of both nodes and
keep track of all ancestors of both using array and then use this array to perform swap. told me to
code it.
HR round (Telephonic):
Just a formality. Asked everything about myself. How the prev rounds were. What I know about payu.
Relocating, CTC, workin days etc.
Recommended Reading: geeksforgeeks.org/data-structures, headfirst for java, os video lectures by pk
biswas.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/one-payu-interview-experience/
Directi Interview | Set 5 (On-Campus)
There was 1 online coding round, followed by interviews. Online coding round was on Codechef.
Online round:
There were 2 questions.
Question 1: A string can contain only a, b or c. There cannot be 2 consecutive same character. First
and last character cannot be same. Now given a string with ‘a’, ‘b’, ‘c’ or ‘?’. We need to find the
string replacing ‘?’ that satisfy the above conditions. For multiple answer display lexicographically
smallest string. For no answer possible display “Not Possible”.
Round 2 (Telephonic):
Question 1. We need to make a string of size n. Each character of the string is either ‘R’, ‘B’ or ‘G’. In
the final string there needs to be at least r number of ‘R’, at least b number of ‘B’ and at least g
number of ‘G’ (such that r + g + b = 1, No. of ‘G’ >= 1, No. of ‘B’ >= 1 and (No. of ‘R’) + (No. of
‘B’) + (No. of ‘G’) = n
then following cases are possible:
1. RBGR and its 12 permutation
2. RBGB and its 12 permutation
3. RBGG and its 12 permutation
hence answer is 36.
Question 2. There is a rectangle with left bottom as (0, 0) and right up as (x, y). There are n circles
such that their centers are inside the rectangle. Radius of each circle is r. Now we need to find out if
it is possible that we can move from (0, 0) to (x, y) without touching the circle. We can move freely
anywhere.
Question 1. There is a binary tree. We are given 3 nodes a, b and c. We need to find a node in the tree
such that we remove all edge from that node we get a, b and c in three different trees.
Question 2. Given an array and an integer T. We need to find a subarray from i, i + 1, i + 2……..j
such that ||a[i] + a[i + 1] + ……. a[j]| – T| is minimum.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/directi-interview-set-5-campus/
Amazon Interview | Set 114 (On-Campus
for Internship)
Recently Amazon India visited our campus for 2 months internship. There were three rounds
The MCQ questions were mainly 6-7 questions on data structures, 7-8 C language output programs, 4-
5 questions on general aptitude, Probability, Permutation and Combinations.
a. Given a set of intervals, you have to group the overlapping intervals and display all the intervals in
non decreasing order.
Eg: (1,5),(8,11),(3,6),(10,20)
output: (1,6),(8,20)
Tip: Although this is a very easy question and can be found on many online portals, just remember that
the given input is in the form of a string and it needs to be parsed carefully.
For this, instead of converting the string into integers, you could use something like
while(scanf("(%d,%d),",&a,&b))
{
//store a and b as you wish to
}
b. Given a set of integers, negative as well as non negative, You need to rearrange them such that
negative and non negative integers at alternate positions.
Constraints: order of all the negative and nonnegative integers must be the same as before if there are
more negative integers, the integers in excess should occur at the end of the array and same goes for
the non negative integers in case they are more in number.
eg: -5,-2,5,2,4,7,1,8,0,-8
output: -5,5,-2,2,-8,4,7,1,8,0
Again, for the input, you can use the above mentioned technique.
About 20 out of 150 students were selected after this round for Personal Interviews.
Person1:
ROUND 1:
1. Given a binary tree having 3 pointers, left, right and sibling out of which all the left and the right
child pointers are already filled, you need to fill the sibling pointers with the addresses of the next
node on the same level. If it is the last node of a level, fill NULL.
I first told him an approach using a level order traversal with a queue. Then he asked me to do it
without a queue using recursion. I told him the approach and when he was satisfied, he asked me to
write a code on paper with all the corner cases covered.
2. Given an array of size 2n+1 where n integers repeat two times and one integer occured only once,
Find that integer. I told him by using XOR. then he changed the question to
Given an array of size 2n+2 where n integers repeat 2 times and 2 integers come only once. Find both
of them. This can also be done using XOR. You can find the solution in the arrays section of Geeks for
Geeks
3. Given any binary tree in which all the leaves had their left and right pointers connected in a doubly
linked list from left to right instead of pointing to NULL. Also, the leftmost leaf’s left pointer pointed
to that node itself and the rightmost leaf’s right pointer pointed to that leaf itself and if there was an
internal node with no left or right child, that particular pointer will point to that node itself.
You need to find the Inorder Traversal of the tree.
Once I told him the approach, he again asked me to write a code on paper.
4. He asked me about the data structures I knew and then started asking questions on Graphs. How we
represent them?
which is better Adjacency matrix or List?
Then he gave some situations and asked me which of the two implementations should be used.
ROUND 2:
2. Then he asked me about the subjects I had studied in 3rd and 4th semesters.
I forgot what all subjects I had studied
The first subject that came out of my mouth after a lot of thinking was Unix Linux Programming. Then
he asked me to write all the commands I knew in 5 minutes. I listed almost 20. He asked me the
functions of a few of them and differences between some of them.
ROUND 1:
1. Given a singly linked list and an integer k, I had to write code to reverse the list in pairs of k
handling all base cases as well.
eg. 1->2->3->4->5->6->7->8 k=3
o/p 3->2->1->6->5->4->8->7
She actually tried my code on a number of base cases trying to find bugs
2. Given 2 arrays one of size n and another of size (n+k) but having k values filled, I was asked to
merge the two into the second array without using any extra space. I quickly gave her the logic and we
moved on to the next question.
3. Given a string of characters, find the index of the first repeating character in the string.
eg. abcba
o/p: 0 (as ‘a’ came initially before ‘b’ did, though both are repeated twice).
Again error free code was required.
4. She then asked me questions on the research project I was currently working on. This went on for
another 10-15 minutes.
ROUND 2:
1. This round started with questions on my research project. Then he asked me which data structures I
liked. We had a long discussion on heaps and the associated time complexities.
2. Given a binary tree, any node in the tree and an integer k, print all the nodes at a distance k away
from the given node.
Mind you, the node may be above or below. We first discussed on an approach and after he was
satisfied with my explanation, he asked for error-free code.
3. Given an integer n, how many BST’s can you make with n no of nodes?
I told him about catalan number and the direct formula – 2^n – n. But he wanted a derivation, so I
built-up a recurrence and showed him the DP to evaluate it.
4. Given n people, you are told all pairs of people who belong to the same country. You are to tell the
number of pairs of people who do not belong to the same country,
I expressed it as a graph and applied dfs to get number of connected components and size of each.
Then it was a simple formula over no of components.
After this he started discussing the life at Amazon, what the company expects from you and what you
should expect to do at the company.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-114-campus-internship/
Microsoft Interview | Set 31 (On-Campus)
Recently Microsoft came to visit our campus for offering SDE positions. Here is my interview
experience.
Round 1 – There were 15 simple MCQ’s. Most of them are from GeeksQuiz. Most of the students
cleared this round.
1. Given a sorted list of strings that may contain NULL in random indices , return the position of a
given search string. Return -1 if string not present.
ex:”at”, “bat”,””,””,”car”,””,””,””,”dog” … find “car” . o/p: 4
I initially tried a modified binary search, but something went wrong, So did a simple linear search.
My bad
2. Given an array of integers where all the elements occur odd number of times except 3 elements
which occur even number of times, find the 3 elements.
Group Fly Round: Students were divided into groups of 3 or 4 and were assigned a mentor.
Everyone was asked the same question and was expected to write a clear and neat C/C++ code with
comments wherever possible.
The question was that an 1-D array contained N*N elements. Assuming that the N*N elements form a
matrix, you have to rotate the matrix in-place.
A group of 16 students were selected from this round for Personal Interviews.
Count the number of full nodes in a binary tree. Full nodes are those which have both non-null left and
right children.
– I gave a pretty easy recursive solution. He asked me to do it iteratively using a different traversal.
So i did a level order traversal.
He asked me to give all kinds of corner cases. He was happy.
Given an array containing elements where all elements have even occurrences except two elements,
find those elements.
– I gave him the xor approach where you have to find the rightmost set bit and then divide into two
groups. He was waiting for that and went directly to bit representation, i.e. Little Endian and Small
Endian.
Followup : Check if the given machine architecture is Little or Small Endian.
Given two Strings, find the minimum length window in the first string containing all the elements of
the second string.
-Did it pretty quickly. He kept tweaking the questions and asked me to make necessary changes in the
code. Finally he asked me to give some good test cases.
He asked me about semaphores and we had a little discussion about the types of semaphores. Then he
asked me to write the Signal() and Wait() functions. Finally he asked me to implement mutual
exclusion in critical section. I gave the Peterson’s algorithm. He moved on
Given an array of elements arrange the elements such that the odd elements are in the odd position and
even elements are in the even position.
– I gave him a two pass approach where i segregate first and then separate accordingly. But he asked
the one pass solution. This was when my luck ran out. I know its pretty easy, but messed it up. And the
guy was also adamant because even after 15 minutes of trial and error, he asked me to go on.
Though I didn’t get the job, it was a wonderful experience to be interviewed by such experienced
people from the industry.
A few points that i thought would be worth mentioning –
* Think out load, let the interviewer know that you have actual depth in the matter
* Always ask questions about a problem if you are not sure
* Always think about the corner cases and uncommon test cases before you start writing your code
Also, a big thanks to the entire GFG team for their constant efforts Keep Coding, Keep
Rocking.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-set-31-campus/
Microsoft Interview | Set 32 (On-Campus
for Internship)
Recently Microsoft conducted an on-campus interview at my college. It consisted of 5 rounds which
were all on-campus. They were as follows:
1.A sorted list of strings interspersed with NULL in random indices is given. Return the position of a
given search string. Return -1 if string not present.
ex:”a”, “b”,””,””,”c”,””…. find “b” . o/p: 2
2. Given an array of integers where all the elements occur odd number of times except 3 elements
which occur even number of times, find the 3 elements.
Groups of 5 were made amongst the remaining candidates. Each group was assigned an interviewer
and we were given a problem to solve.
Write a program to rotate a square matrix 90 degrees clockwise using constant space.
The rest of the interview involved making modifications to this program. For example, modify the
program so that it returns true on a partial match, i.e. even if the pattern is present inside the input
string.
Round 5(F2F):
This round started with questions like why do you want to work for microsoft? Tell something about
yourself etc.
Then came the final round of technical questions.
I was asked to write 2 programs and answer some theoretical questions.
1. Given a MxN matrix of 0s and 1s convert all rows and columns to 0 which have at least one 0 in
them. You can use O(m) space.
2. Given a matrix of characters and an input string, return true if the string is present in the matrix.
I would like to thank the geeksforgeeks team for providing us with such a fantastic platform.
Thank you.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-set-32-campus-internship/
Amazon Interview | Set 115 (On-Campus)
Hai, recently amazon visited our campus for recruitment. Here is my amazon experience.
I attended 12 mcq’s. There was negative marking,so i attended the questions which i was very
confident and did both programs.
I was confident that i will clear the round 1.
First i gave a solution similar to insertion sort in a linked list,he was not satisfied, and then I gave a
min heap approach. He asked for time complexity. I got wrong,so he asked what steps u will do and
time complexity for each step. He added all the step cost and asked me to arrive at final time
complexity.
After this, I got correct.
Then he asked about 2nd code in group fly activity.I used merge sort for it and he asked why i had
used merge sort,and asked to improve the code.
Then i gave a min heap solution (:P we discussed after group round). He asked me to code it. I was
not good at heaps. I tried my best but unable to arrive at working code
So finally he asked if i had any questions for him. I asked about amazon’s environment.After this i
thanked and left.
I was sure that i will be eliminated and i was eliminated.
Only 10 people went to 4th round and 3 people were hired finally.
Here are some mistakes done by me
It was first f2f for me and i was very nervous and had butterflies in stomach, which ultimately
decreased my performance.
I was not confident about the answer i gave.
My communication skills were very poor.
So try to avoid the mistakes done by me.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-115-on-campus/
Amazon Interview | Set 116 (On-Campus)
Round 1:-
20 MCQ’s(Majority from OS and Java, C++, 1 aptitude)
2 coding questions.
1. Given an array, find the maximum sum that can be formed from the array such that no two adjacent
elements are taken into consideration..
for ex:- 1,2,3,5 should return 7.
2. Print Vertical axis sum of the given binary tree.
Round 2:-
Group Coding Round
36 people made it to the next round. 2 questions were asked
1. Given an array which initially increases and then decreases, search for an element in the array.
2. Merge ‘k’ sorted arrays.
Round 3:-
Technical interview
18 people were selected for the next round and they asked me 2 questions
1. Given an infinitely growing sorted array which initially consists of 0’s and then 1’s upto infinity.
Find the transition point where 0 changes to 1 effectively.
2. Given a binary search tree, make 2 separate trees such that difference between the sum of elements
between them is minimum.(After some time he gave me a hint which helped me solve the problem).
Round 4:-
Technical Interview
1. Some basic OS related questions
2. Implement a data structure which would perform insertion, deletion, search and randomize
operation with minimum time complexity.
We discussed a lot of data structures and I settled with a data structure (Hashtable with DLL). But he
gave me clues and improvised my solution.
3. Implement a Queue using 2 stacks. Optimise your implementation
(They didn’t ask me to code in this round. They just checked how efficiently I approached it )
Round 5:-
Technical interview
I think this is the bar raiser round. We are aware of the game show in which a contestant will think of
a famous personality and the host will try to find the personality within a finite set of questions. I was
asked to design a system which would implement the same. He asked me to write a code to return the
first question (like the deciding factor on which the elements will be further partioned) so that I can
find the celebritry in minimum no. of questions.
I think they were checking your approach, ideas and patience in this round. Whatever solution I gave
he never seemed to be satisfied. Be confident in your approach and don’t ever give up.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-116-on-campus/
Amazon Interview | Set 117 (On-Campus
for Internship)
Recently Amazon India visited our campus for 2 months internship. There were four rounds.
1. Given two strings, find whether they are anagrams of each other. (too easy).
Its here.. http://www.geeksforgeeks.org/check-whether-two-strings-are-anagram-of-each-other/
2. Given a n-ary tree, Convert it into an array and return it. Construct the same n-ary tree from that
array again. (DFS is better here as reconstruction is necessary) –
Push the root to a stack. “pop the stack.store the value of the root node and the number of children it
has in the array.push all the children to a stack from right to left”.. do this until the stack becomes
empty.. the array will have dfs along with the number of children of each node.
For reconstruction,pass “i” by reference( i is for iterating through the array) take the value at index 0
.. make it has root. increment i. for all the children of the root, recursively call the same function.
return root. (I hope this works :P)
1.Given an array of 0s and 1s sorted. Find the first occurrence of 1 ( Binary Search)
2.Given an infinite array of 0s and 1s.(sorted) .Find the first occurence of 1(similar to this..
http://www.geeksforgeeks.org/find-the-point-where-a-function-becomes-negative/)
3. Given a matrix sorted in ascending order both row and column wise. Search an element(
http://www.geeksforgeeks.org/search-in-row-wise-and-column-wise-sorted-matrix/ ). This is
O(n+m). He asked me a better solution.. I tried and he helped me a lot..Though i wasn’t able to
deliver.
4. Given a tree, print the max sum path from root to leaf .. (http://www.geeksforgeeks.org/find-the-
maximum-sum-path-in-a-binary-tree/)
ex : 1
/ \
2 3
/ \ / \
4 5 6 7
o/p : 4 2 6 5 1 3 7
6. Implement a stack using array. Implement two stacks using an array. Implement 3 stacks.
7. You are given an array . You have to create a stack when the user wants to do so and delete a stack
when the user says.You wont be given the number of stacks that will be created.
I thank geeksforgeeks for providing an excellent platform to learn new things. Check the interview
corner for other company interviews.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-117-campus-internship/
Aricent Interview | Set 2 (On-Campus)
Round 1: Online Written test(AMCAT).
Sections:
1.1 English.
English was pretty simple. The only hiccups were in the questions asking for the opposite
words and meaning of some unsual words like ‘TYPIFY’.
1.2 Aptitude
1.3 Logical Reasoning.
Both Aptitude and Logical reasoning were from most commonly asked questions like time
and work and family relation questions.
1.4 Computer Programming.
1.5 Computer Science.
Computer programming were from basic C and C++.
Computer Science were asked mainly from OS and CN.
The TI lasted for about 1.5 hours. The interviewer was quite experienced and was pleasant to
talk with. He started off with questions on my project that i had done and had a pretty long discussion
for about 15mins, asking me to make changes to my project and optimize it.
After that he asked a few basic q’s on C and asked a question on SLL to insert a node at the
end(simple enough) and asked me what would happen if malloc() function fails and asked me to make
some other changes to the program.
Then he moved onto asking me about Microprocessors which was a weak spot for me. asked
about what would be the technical requirements for me to be able to implement a simple
microprocessor. Then he asked some qs on EC like Op-Amps.
Some other questions were pretty logical ones like how would i compare the efficiency of two super
computers.
Then there was a long discussion on Computer Networks starting from the basic question of the
different layers of OSI model. He then gave me a few practical scenarios where i had to give in my
thoughts to implement the solution to some problems based on networks.
Finally he asked me a puzzle to which i believe there was no definite answer. Say your house is at
Position X and You’re currently at position Y which is 3 kms away from your home and you have a
car and a cycle for you to take home. You have to take both of them anyhow as the place is not a safe
place.
2. You cannot carry the cycle inside the car or anywhere on the car.
3. You’re ALL ALONE . Neither you have any mode of communication with others.
Round 3 : HR interview.
The HR interview was pretty short and just asked questions like ‘Tell me something about
yourself not in the CV’ and ‘Why aricent?’ and a few questions on my hobbies. And she asked if i had
any questions for her. I asked her 2 questions . And then that was it.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/aricent-interview-set-2-campus/
Goldman Sachs Interview | Set 3
Goldman Sachs visited our campus for both Full Time and Interns. I am going to share the experience
for Full Time.
1st Round:
15 questions : Quant
25 technical Questions (C,C++,DBMS,networking,OS)
45 minutes for both..there was sectional cut-Off
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help.
Source
http://www.geeksforgeeks.org/goldman-sachs-interview-set-3/
Hike Interview Experience
First Round Written Test
3 sections in all. To be done in 90 minutes
Section A: – 10 aptitude questions (you can find almost every question on indiabix).
Section B: – 13 questions based on C skills.
Section C: – 2 programming questions which were easy.
2. Based on first Question, rather than an array you have a large file containing billions of number and
from it you have to print Kth minimum element.
3. A file containing billion of numbers in unsorted manner is given to you. At run time you will be
given two integers ‘m’ and ‘n’. Now print all the numbers from file which lies in this range. He said u
can use extra space, no problem with memory but time complexity should be minimum.
4. This question was new to me. He told me let’s play a game. I said okay sir :). In this game we will
be given even number of cards. Each card will be having some digit written over it. Now both player
will play optimally and can only choose card from either corner. He asked me to devise a strategy
which would help me winning the game always.
3. He asked me what my weak point in coding is. I said finding out the corner test cases. At this he
caught me and said let see how you will face your fear and give me a code and asked me to generate
all the test cases for the program.
In this round only single Question was asked but it took almost 1 hour.
He asked do you know spell checker in micro soft word. I said yes.
He said, you have newspapers of last 20 years. Use these newspapers and suggest most probable
words.
He gave me example
Input: fon
for this input print
Output: foe, for, fork, fond
Question seemed easy but when I started he kept adding constraints on data structures used and
complexity.
I used lexicographical dictionary for this but later he added two more example
he asked me to suggest ‘con’ and ‘ion’ as most probable word for fon.
He said why I gave you newspapers rather than Dictionary. From this I got smell of Machine learning
He wanted me to suggest on the basis of currently most frequently used words.
HR round
It was telephonic round taken by the CEO of the company and asked me all HR related Questions
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help.
Source
http://www.geeksforgeeks.org/hike-interview-experience/
Goldman Sachs Interview | Set 4 (On-
Campus for Internship)
Goldman Sachs visited our campus for both full placement(NAPA) and internship. I am going to share
my experience for internship.
ROUND 1:
There were in total 41 questions and time was 1 hour. 15 from aptitude and 25 from technical.
aptitude – included data interpretation, basic maths, probability, etc.(tough).
technical – included c and c++ output question, os(schudeling, semaphore), dbms(normal form, etc).
1 essay which topic was “why are you best among all of them?”.
I would suggest to start with technical and then aptitude and at last essay. it will save your time and
you can do better.
ROUND 2:
There was G.D in round 2. They divided us in two groups one of 11 people and other of 10 people.
I was in 1st group and my topic was “has technology taken over us or we have taken over
technology”.
It was of 15-20 minutes. They will give you 2-3 minutes to think.
You just have to say your points and be active , listen to others carefully. Don’t be arrogant and don’t
be aggresive.
15 people got selected for interviews.
ROUND 3:
It was a technical interview round.
They asked me out my research paper, like what’s new in this and how did u get all this. I explained
them very well.
Then they ask me one puzzle:-
You have a rod of length 7 and you have to give a part of rod of length of one everyday to a person. so
what is the minimum number of cuts you will do , so that you can give him required number of lengths
everyday?
Then they asked me some questions related to linux and data structure (graph, etc).
6 people got selected in this round.
By the time my interview completed it was already very late at night.
So they called us next morning.
ROUND 4:
This round was mixed bag of both of HR and Technical questions.
They asked me what is my favorite topic , i told them Data structure and algorithms.
Then they asked me a tree question:
you have been given a tree(not binary tree), and the last level of the tree is doubly linked list(i.e. first
node of that level connected to last node and adjacent to it and
similarly for all nodes of that level.). You have to do Dfs.
They also asked questions related to suffix array and tries(which data structure would you use to
implement dictionary).
Then they asked some prefix, postfix questions which were followed by puzzles and questions related
to data structures.
HR question they asked were “why you have join this college and you really wanted to join this or
some other college”, “what is your interest and tell me something about
yourself”.
Tips:-
. Learn basic of c and c++ very well
. Your communication skill should be good.
. Should know all standard algorithms and data structure(including advanced ds also like suffix array,
trie, heap etc).
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help.
Source
http://www.geeksforgeeks.org/goldman-sachs-interview-set-4-campus-internship/
Inmobi On Campus Interview Experience
Inmobi recently visited my campus and i got hired. I would like to share my experience.
Round 2:
The interviewer started with a discussion about my CV. She asked me about my good and bad
experiences with coding. The questions she asked were relatively easy.
1. Given a linked list of integers, remove all duplicates.
2. She asked me to design a database. 1 table for employees, another for department. Initially 1
employee could be in just 1 department but each department has multiple employees. Then she
changed it such that each employee could be in many departments and each department can have
multiple employees. Then she asked me to write a simple query to list all the employees that belonged
to a specific department.
3. Implement a queue using stack
Round 3:
The interviewer again started with a detailed discussion of my CV.
1. He asked me to write a simple program which explains all the concepts of multithreading and
explain it to him considering him a layman.
2. He then asked me to design a class which has two random numbers and a mathematical operation in
between them. If the user answers correctly, then a new question comes, otherwise the user tries the
answering the same thing again. There is also a timer and a score to keep track of. The timer starts as
soon as the user hits the start button button.
After i designed everything, he gave me 10 minutes to find bugs in my own code.
Round 4:
The fourth round was a bit tiring as I had only 5 mins between round 3 and round 4. The interviewer
scanned through my CV but did’nt ask me anything about it.
1. Given two strings, you need to transform one into the other. You can only transform 1 character at a
time. The string formed after each character change should be a recognised word in the English
language. If it’s not, that change is not allowed and you need to go back. A function to check if a word
is present in the English language was provided to me.
2. Given a matrix of n*n, print all the paths from 0,0 to n,n. You can either increase the x-coordinate
one at a time or the y co-ordinate. Decreasing co-ordinates or gong diagonally is not allowed.
Round 5.
This was an HR interview. He asked me various questions trying to make it awkward. The key here is
to stay calm and confident.
Tips: Be frank, be honest with your interviewer. If you are not comfortable in 1 topic, tell your
interviewer honestly. Do well in other areas. Look for hints from the interviewer if you get stuck.
They want to see how you approach a problem.
I would like to thank Geeksforgeeks to help me prepare and land this awesome job.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help.
Source
http://www.geeksforgeeks.org/inmobi-campus-interview-experience/
Nagarro On Campus Interview Experience
Nagarro software company visited our campus. I am writing this so that it might hep others around
290 students appeard for this.
Round 1:
written round consist of two papers both pen and paper based and answers to be fill in omr. paper 1
consist of analytical questions like profit loss, speed, 10th class geometry problems based questions
there were total 25 questions.
Paper2 consist of only coding input/output questions of c there were 20 questions
Round 2:
there were three questions u have to write only pseudo code for that .
1-> given a starting point in a 2d array of size X Y you have to rotate subarray of size N staring from
given starting point.
2-> there are a lot of strings like “ab” , “bc”,”cd”,”ad” and u have to find the longest string can be
made like ab+bc+cd = abcd = 4(answer) but keep in mind that ending character of first string should
be first character of next string.
3-> this questions also on array given an array of size m * n .and every row of array is sorted and
contains unique element but different rows can contain same element present in other row . u have to
sort the array and remove the duplicates and store in 1 1D array .
Technical round:
Cross questions based on pseudo code u have written and on their complexities. and then he asked me
another 2 questions
1- given a string consisting of various words . reverse all the string and words by 2 methods.
2- given an sorted array of size n and there is another array of 2n also contain elements in sorted
order . merge these sorted arrays and remove duplicates if any .the resultant array should also be in
sorted order.
do this by 3 methods.
HR round:
Basic questions like tell about yourself and questions about project.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help.
Source
http://www.geeksforgeeks.org/nagarro-campus-interview-experience/
Morgan Stanley Interview | Set 10 (On-
Campus)
First Round:: apti + technical + coding (1hr 45mins)
1) Multiple choice questions round : (45mins)
It consists of 2 sections. One was aptitude (10 ques). Level of difficulty was difficult. I was able to
solve only 3 questions.
Other was technical (20 ques). Level of difficulty was moderate. I did 15 questions.
2. Given a month and a year. You need to find the date of first Monday of given month and year. (12
marks)
3. Given an n X m matrix ‘M’ of alphabets and a string ‘S’. You need to find the starting index of ‘S’
in ‘M’. The string can be found horizontally or vertically. (Alphabets are case insensitive). (10
marks)
eg: 4 X 5 matrix
a b F D k
s R I o j
A p e g k
o s A y n
String S : dog Output: 0,3
I was able to solve only 2nd question completely and tried 3rd one (but it was giving wrong answer).
After this round 18 students were shortlisted.
2) Given a binary tree and a number n, find the root to leaf branch whose sum equals to n.
Now find maximum length branch whose sum equals to n (that means ofcourse now there are more
than 1 branch whose sum equals to n)
3) Design the database for an online shopping website like flipkart. Now how will you modify your
database if you want to give some discount on those product which are going to expire after 6 months.
And many questions like these.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/morgan-stanley-interview-set-10-campus/
Interview Experience @ Bankbazaar.com
Just want to share my interview experience @ Bankbazaar.com so that its helpful for the aspiring
ones.
Round 1 :
Q1 – Give an efficient algo to find if every nodes value is equal to sum of left + right node.
Round 2 :
Q1 – Given a million strings , for the input string get count of anagrams of input string among the
million . O(1) solution needed
Q2 – Efficient Algo to find second shortest path in a graph given edges part of the shortest path
My Ans – Got to do with removing edge by edge from Shortest , find best second shortest so far .
Round 3 : This went badly
Q1 – Effecient Algo for Tower of Hanoi , Trace working , Time complexity derivation
As a build up to this, given more than 1 auxillary rod how would u change the algo for better
performance and drive/proove it
Round 4 :
Q1 – Efficient working code to traverse tree level by level and print odd levels left to right , even
right to left .
Among all the questions I got everything right except the Tower of Hanoi (got stuck).
GeeksForGeeks thanks a lot ! for your question set helped me a lot, infact some of them are straight
away the same.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/interview-experience-bankbazaar-com/
Morgan Stanley Interview | Set 11 (On-
Campus)
Multiple Choice Questions Questions ranging from give the output of following C program to some
theoretical concepts of OS etc.
Coding
1. Give maximum subarray product in a given input array which can contain integers (including
negative and zero).
2. Given a set of n coins of some denominations (may be repeating, in random order), and a number k.
A game is being played by a single player in following manner: Player can choose to pick 0 to k coins
contiguously but will have to leave one next coin from picking. In this manner give the highest sum of
coins he/she can collect.
3. A file of encoded message contains only numbers. Original message contains only lowercase
letters and spaces. So character ‘a’ is mapped to 1 ‘b’ to 2 and so on till ‘z’ is mapped to 26. Given an
input of numbers find out the number of ways you can decode it in original message. Eg. 123 can be
decoded in 3 ways as ‘abc’, ‘lc’ or ‘aw’
Technical Round I
Description of projects. Seeing Java projects in my profile they continued to ask my questions from
Java. Given a string of characters how will you print each word in reverse order. Eg. “Information
Technology” you have to print “noitamrofnI ygolonhceT”. Interviewers were very supportive and will
guide you in the process.
Then explain how Hashmap data structure is implemented and code it. What is hashing and it’s
benefits. Suppose a class is defined as follows:
class MyClass{
public String name;
public List phonenos;
}
How will you make the class immutable. Please pay attention to the List it is important.
Group Activity
We were divided in four teams and were given LEGO blocks. We were asked to build a model of
product which address high volume of clients and ensure it has following characteristics:
1. Strength
2. Sustainability
3. Aesthetic value.
4.
After about 10 minutes we were asked to merge with another team. Then we had to make model
together. After that we had to present what we made in front of whole panel.
I just want to make a remark on this round: Guys do not pay attention is actually building anything.
Process of how you come up with idea, interact with others, how much you push your idea and can
you accept your mistake is important. It was a very nice experience.
Technical Round II
Design a Parking Management System.
A puzzle: two dice are given. each has six face. Change the numbering on one dice only so that the
probability of occurrence of sum (of the numbers appearing in a throw of two dice) from 1 to 12, are
all equal. So normally probability of occurrence of sum 2 is 1/36, of sum 3 is 2/36 etc. You have to
change numbering in such a way that probability of sum 1 = P(2)=….=P(12).
HR Round
I liked this round because it was very calm and went very smoothly.
They asked me to walk them through the resume. Good experiences of my last job which will be with
me throughout my life. Some things you wish previous company could have improved on. Good and
bad things of my experience in current college. What made me to go for higher studies and at last why
Morgan Stanley.
Then they asked if I had any questions: I asked: are formals necessary?
One interviewer explained very nicely how the company works for banks and the structure. He said
company is very informal in field of technology but very formal in terms of attire. Other interviewer
said Every fourth Friday of month you can wear casual if you want.
I had a great experience interviewing with Morgan Stanley and wish best of luck for my fellow geeks.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/morgan-stanley-interview-set-11-campus/
Amazon Interview | Set 118 (On-Campus
for Internship)
The selection procedure consisted of an online round followed by two Personal Interviews.
Online Round:
The first round had 20 MCQs and two coding questions. The MCQs were based on the concepts from
OS, DSA, compilers, architecture etc.
1. Given an array of positive and negative numbers, arrange them in an alternate fashion such that
every positive number is followed by negative and vice-versa maintaining the order of appearance.
2. Given a n x m matrix, print the elements diagonal wise from top to bottom.
First round of PI :
1. Given a number n find the number of balanced parentheses expressions of that length.
Input: 2
Input: 4
I gave a complex solution involving segment tree in which he pointed out the mistakes and then asked
to write a code to check if a given expression is balanced or not.
2. Tell something about LRU. What DS will you use for it? Write pseudo code for it.
The interviewer introduced himself first and then asked me about myself.
1. Given two binary trees, write pseudo code to determine if one is a subtree of the other. I answered
it and then he modified the question to check if the other tree elements are the subset of the elements
of the first tree. (Hint: Inorder traversal)
2. Given a sorted circular linked list which is rotated at some point, write pseudo code to insert a
new node. Ex: 8 1 2 5 7 and insert 6.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-118-campus-internship/
Adobe Interview | Set 11 (On-Campus)
Adobe procedure consisted of two online rounds back to back.
1) First Online Round- It was Aptitude Test of about 50 minutes and 40-45 Questions were there.
The questions were easy and everybody could easily solve that, speed should be good in order to
attempt all the questions.
The questions were of type- some geometry based questions,some easy puzzle type questions (like
there are 5 painters, one painter passionate about scenic beauty, 2nd painter has interest in… , and
other information was given and 3-4 related questions were there),some simple comparison based
questions and some quantitative aptitude questions.
2) Given a 2-D binary matrix(nxn)(elements are either 0 or 1) such that in each row,all the 1’s in the
array are present before the 0’s.You have to return the row number of the row with max. no of 1’s.You
just have to implement the function whose prototype looks like-
Int max_row(int *arr,int n);//here arr is a pointer to integer and nxn is the size of matrix.
4) A recursive program to multiply two numbers with addition such that there should be minimum no.
of recursive calls.
5) Given an array of n integers, find pair of numbers if present whose sum is equal to a given target
sum.
6) Every number with 3 at it’s unit place has a multiple which has all 1’s like for 3,the multiple is
111,for 13 multiple is 111111.The multiple can exceed the integer range i.e,it can be very large
number(try storing it in a string).
7) Given a mathematical expression, check whether the parenthesis used in that expression are
balanced or not.Possible parenthesis used can be {},[],() only.Eg.(2+3)/4*[9+{8*5}].
8) Three processes p1, p2, p3, p4 – each have sizes 1GB, 1.2GB, 2GB, 1GB. And each processes is
executed as a time sharing fashion. Will they be executed on an operating system.
Technical Interview 2
In this round,first of all I was asked some networking questions,then virtual memory concepts,some
scheduling questions etc.
Then he gave me a problem which I had to implement in C.The problem goes like this- There is an
application which is again and again fetching data from database and then using that information in
further processing,but since the application is again and again accessing the same database so inorder
to increase the speed of accessing data we have to implement a cache.(Property of cache-keep the
most frequently used data and remove the least frequently used data if cache is full,assume limited
size of cache).
Solution that I first gave was using a linklist (wrote all functions inC)
He was happy with the solution but wanted me to think about more efficient solution so I told him
using Heap and Hashing,implemented it in C again.He was impressed by this solution …:)
Technical Interview 3
In this round he asked me about DHCP,DNS working protocols etc.(I wrote these terms in my
resume).He asked about unions,bitfields,structures,asked me to write 6-7 complicated
declarations,asked me the meaning of some declarations(like int *const *const *i).Then asked C++
Questions about default functions in C++,how would you detect that error has occured inside the
constructor and destructor,lots of c/c++ output questions.I was also asked about reimplicit cast etc.
but since I never studied so I simply denied(If you don’t have any idea about something or heard the
term for the first time,it’s better to simply tell that u don’t know that,rather than fooling around..).
Output questions were easy if you have done 295C Questions and GeeksForGeeks C/C++ Output
Questions.
HR Interview
My third technical and HR Round were scheduled on second day and after my third tech. round I got
more confident which really counts in HR round.You should be really confident about each and
everything you speak and kindly think before speaking something so that he may not be able to trap
you.
First of all he asked my iit rank and AIEEE rank, then why among all the options I chose this college,
then tell some unique and different quality that you possess so that i should hire you(he warned me not
to say words like honest, hard-working, determined etc., it should be something unique also think of a
situation if u could fit in with that quality), why adobe?, what is my weakness and how will I
overcome it, then he gave me a puzzle to solve. Also I forgot to add the most common question which
you are asked if interviewing in adobe and you are not among the toppers, where do you stand(rank)
in your class, what is the reason of your low pointers(prepare a genuine answer to this question).
In the end all went well and in my favor and I got recruited for the company. I really want to thank
geeksforgeeks because of which I am at this position. It is really a great platform where you could
find lots of problems to practice and these are repeated by many of companies in their coding round
and interviews.
I hope that this experience of my interviews might prove helpful to some of you.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-set-11-campus/
Amazon Interview | Set 119 (On-Campus
for Internship)
The selection procedure consisted of an online round followed by two Personal Interviews.
Online Round:
The first round had 20 mcq consisting of 3-4 questions from aptitude, 2 questions from os and rest
were from Basic C and Data Structure. There were 2 coding questions as well.
Question 1: You are given a phone keypad like following diagram, where each character corresponds
to a digit mentioned in the same box.
You are given n strings and you have to find their decimal representation. You have to print the string
and corresponding decimal representation in descending order.
Like if you are given “amazon” then its corresponding decimal notation will be 262966.
If more than one strings have same decimal notation then you have to print them in the order in which
input is given.
(Given that given string consists of lower case alphabets only.)
Test Case 1:
5
Amazon
Microsoft
Facebook
Aa
Bb
Output:
642767638 microsoft
32232665 facebook
262966 amazon
22 aa
22 bb
Question 2: Given a string. Print all Possible permutations of different lengths in sorted order.
Input: abc
Output:
A
Ab
Ac
Abc
b
Bc
c
Candidate who could solve at least one question out of 2 coding questions was selected for personal
Interviews.
Round 2(P.I. 1) :-
Firstly interviewer had a deep discussion of my project. He also asked me to write code for one of
my mini project (Backtracking).
Then he asked two back to back coding questions –
1. You are given a bst. You have to print the kth smallest element.
(http://www.geeksforgeeks.org/find-k-th-smallest-element-in-bst-order-statistics-in-bst/).
2. You are given two sorted arrays and you have to print the median obtained after merging them in
log(n) time complexity.
(http://www.geeksforgeeks.org/median-of-two-sorted-arrays/)
Then he asked the language in which I am comfortable for coding. I said C . Then he asked me to
allocate the dynamic memory of 2-d array in C( I used malloc function for this). Then he asked me the
difference b/w malloc and new (c++) function.
Let us say :
Given nodes are B and C : Answer would be 2.
Given nodes are A and E : Answer would be 0.
Given nodes are D and G : Answer would be 4.
After all these rounds I and my friend both were selected :). A total of 16 candidates were
selected.
I really thank to GEEKSFORGEEKS for all the support and help in my preparation.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-119-campus-internship/
[TopTalent.in] Nothing Could Stop Zubin
from Landing a Dream Job at Goldman
Sachs
It’s not often that you come across a story which is so motivating and inspiring that telling the story to
your audience is what you crave for. Zubin Sheth from Jadavpur University is someone special.
Having been born with certain physical disabilities, he has crossed many hurdles in his life which an
average person wouldn’t have to. Zubin is an inspiration for all who crib about how unfair life has
been to them and try to find excuses in their circumstances.
He has proved that if you are passionate about something no one can stop you from achieving your
goals, no matter how thorny the road might be. When we at TopTalent.in asked him about how he felt
after landing a job at Goldman Sachs, he said “it feels really great and satisfying getting into one of
the best in the club. But yes, I am still ‘hungry’ as there’s more to achieve. The journey has just
begun.”
We say more power to you Zubin. In case you would like to download his resume please click here
and download his resume.
I stuck to basics. That’s what I’ve always done. I also used to practice writing code on whiteboard
and paper more than system. Maybe that is something different that I used to do apart from regular
practice and problem solving.
What resources did you consult? Where did you practice problems from?
I started off with Cracking the Coding Interview and after completing it I moved on to
GeeksForGeeks. I was never a TopCoder fan! I also used to discuss solutions with my friends which
made sure I was solving it in the right way and to the best possible solution.
What kind of skills do you think helped you getting this job?
For Goldman Sachs, your aptitude and coding skills are not enough. Soft skills like communication –
whether you are able to communicate your thoughts to the interviewer, your presentation skills and
your confidence are equally important. I think my confidence and the way i explained my solutions
struck. Goldman Sachs takes your CV seriously! They look for all-rounders and people who have
tried different things.
What’s your advice to students who are aiming for similar placement offers as yours?
Don’t do something because everyone else is. Do what you love doing. Even though i was pursuing
engineering, I was working part time in Online Marketing. That helps you widen ways in which you
think, which is a great skill to posses in the industry. Also in college, we have the time and resources
to try and see whether we like something or not. One should NOT waste that opportunity.
Importantly do not jump to higher levels unless you have your fundamentals right. Trust me, this is the
best piece of advice I can personally share. Trying DP (dynamic programming) before getting your
recursion and stack calls straight, just to sound cool will end you up in a disaster. I am sure this
applies to any field for any profession.
Your resume should first, look good. Spend time on alignment, font, size, everything. Keep it short.
One pager is good. Only mention your strengths. Remove every word which is not required.
In case you missed, you can also download his resume. Click here to download.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/toptalent-nothing-stop-zubin-landing-dream-job-goldman-sachs/
Arista Network Interview | Set 2 (On
Campus Full Term)
Lately, I had an on campus interview with Arista Networks. Here are the details of the company’s
written and interview process.
4. Given a sorted integer array. Convert it to a balanced BST (Size of array is given)
6. A simple o/p question based on fork() (This question always comes in Avishkar and Mock exams)
7. Given an array of n integers which contains integers from 0 to n 1, with any of these integers
appearing any number of times. Find the repeating integers in O(n).
9. Merge two sorted singly linked lists into one sorted singly linked list. Allocate no extra node.
struct node
{
int val?
struct node *left, *right, *parent?
}?
3. A router’s table is given. There are 4 rows and 3 columns (Destination IP, Mask, Next Hop) in
the table. Given the destination IP address of a packet. Determine its next hop. (Hint : Longest
Prefix Matching)
3. A practical problem :
Given a project P. P has m modules (M1, M2, …, Mm). Each module has some tasks (t1, t2, .., ti)
where i can vary for each module.
There are E engineers. Assume that every engineer can do any task of any module. More than 1
engineers are allowed to work on a task simultaneously. Efficiency of each engineer for each task is
given (No. of days it will take ith engineer alone to complete task tj of module Mk). Each task is
atomic. So you start a task only when you know you can finish it completely without any pauses in
b/w. There can be dependencies b/w the tasks too (Say t3 of M2 depends on t4 of M1, t3 of M2
cannot be started until t4 of M1 has been finished). You have to o/p the no. of days it will take to
complete the project (Assume that wherever possible tasks can be run in parallel too). Design data
structures to represent resources (Engineers, computer systems etc.), tasks and dependencies b/w
them so as to minimise duration of the project.
Thank you geeksforgeeks for helping me throughout my journey
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/arista-network-interview-set-2-campus-full-term/
Expedia Interview | Set 3 (On Campus Full
Term)
Lately, I had an on campus interview with Expedia. Here are the details of the company’s written and
interview process.
Part 2 : 2 coding questions (There were lots of different questions. Everyone was given 2
random questions out of them)
1. Count LRU cache misses where page nos. referenced are given in array
2. Insert an element in sorted circular linked list
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/expedia-interview-set-3-campus-full-term/
Online Round:
There were two questions.
1. N strings are given.Convert all string to corresponding decimal value typed in an Alphanumeric
Keypad (e.g. “bdg” -> 234). Then print all strings in decreasing order of their decimal value. If they
have same decimal value then print lexicographically smaller first.
Input:
5
Amazon
sun
run
Output:
262966 amazon
786 run
786 sun
Interview:
Round 1: 45 minutes
This started with a brief discussion on project. She quickly moved on to Coding questions.
She made me write an error free code for “Count all pairs which sum to k in a BST”. Also she added
that duplicates may be present but on left side only.
First she discussed for approach and then constrained the space complexity to be O(1). She checked
the code rigorously.
Then there were 3-4 coding questions. She just discussed approach.
-Update all nodes in a bst to be sum of all elements greater than or equal to it.
– Stock problem/ Given an array ‘arr’ find maximum difference between two elements (max(arr[i]-
arr[j]) where i>=j).
-Then there was this awesome question… Given a perfect binary tree.
print nodes in a specific manner. e.g-
15
/ \
13 14
/ \ / \
9 10 11 12
/ \ / \ / \ / \
1 2 3 4 5 6 7 8
print - 1 8 2 7 3 6 4 5 9 12 10 11 13 14 15
I told her approaches having some space complexity. Again she restricted space complexity, and I got
an efficient solution by recognizing some pattern .
Round 2: 25 minutes
There were just two questions.
1- Given a string having no spaces, and a dictionary.Problem was to find if that string can be splitted
in multiple strings such that all the splitted
strings are in dictionary. I was provided a function search(string str) which will tell if a particular
string str is in the dictionary or not.
I quickly gave a recursive approach.
2- The second question was well known vertical order traversal of a binary tree. She just discussed
how to implement various approaches in C++.
Then there was discussion on types of projects assigned to Interns and blah blah.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-120-campus-internship/
Amazon Interview | Set 121 (On-Campus
for SDE-1)
5-quant, 15 technical, (no verbal reasoning and English).
Round-1
1. Heaps-insertion.
2. Advantages of heaps over arrays.
3. Find 2nd min element from given array
4. Given an array and a sum s find all pairs of numbers which whoose sum=s
(assume array is already sorted)space complexity-O(1),time complexity-O(n)
Round-2
1. Given a tree construct a mirror tree and return root of mirror tree.
2. Level order traversal of a tree.
3. Given a stack output a sorted stack.(hint use recursion).
Round-3
1. Given a tree populate the sibiling of the tree node with the next node in same level.space
complexity-O(1).
2. What happens when you type amazon.com in browser.
Round-4
1. Linked list problem http://www.geeksforgeeks.org/write-a-function-to-get-the-intersection-point-
of-two-linked-lists/
2. A simple problem in linked list.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-121-campus-sde-1/
Online Round
In this round there were 20 MCQ’s to solve and 2 coding question. Of the 20MCQ’s a couple of
questions were on Quantitative aptitude, relationships, OS, DBMS, Data structures etc. there was
negative marking for every wrong answer so I attempted only 15 for which I was sure.
Q2- given a binary tree where each node has some weight. You have to return the max weight in the
binary tree.
Maxweight = value of root node + value in its left subtree and right subtree.
Ex 2
/ \
-1 3
Output = 4
After this round 33 students were selected for face 2 face round.
Ex - 1
/ \
2 3
\ /
4 5
Output - Yes
Q2 – given a sorted 2D matrix and you are given a value you have to search that value in the matrix. I
gave him two solutions. O(row + col)
Q3 – given two arrays in sorted form. The first array has some empty space equal to the size of
second array at its end. You have to merge both array in the smartest possible way in the first array.
With constraint that auxiliary space O(1).
Ex – arr1[9] = {2,4,5,7,8,_,_,_,_};
arr2[4] = {3,6,8,9};
after merging arr1 should be = {2,3,4,5,6,7,8,8,9};
For every question I was asked to write a working code with all corner cases handled. I impressed
the interviewer very much in this round :). Then I ask him some questions like – how an intern
contribute to the amazon’s claim to be the most customer centric company and a few more.
Minimum no of iterations for tree below is 6. Consider passing root information first to any child
except A-B answer will come more then 7. So 6 is the minimum answer.
I gave many approaches for this question but he was not satisfied with any approach. I said I will try
to do it in a binary tree then I will generalize it for n-ary tree. He said your binary tree approach is
correct but the way you are generalizing it to n-ary is wrong. The interviewer gave me many hints and
said you have almost solved the question but missing a single point which I was not able to find till
the end. Finally he moved to other question.
Q2- given a binary tree you have to check whether it is BST or not.
This question was very easy. I solved it within minutes (one inorder traversal approach O(n)) but to
my surprise the interviewer was saying it is wrong. I explained to him but again he said it is wrong.
His motive was to pressurize me but I stick with my solution and finally he moved to other question.
My answer was correct.
Q3 – given a BST find the Nth maximum and Nth minimum element.
I solved it in O(n). He was fine with it but he said do it in logarithmic time. I did it too with some
preprocessing and coded both the approaches.
Some tips:
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-122-campus-internship/
Adobe Interview | Set 12 (On Campus for
MTS-1)
1. Online Technical Round (2 hrs)
7 coding problems were given along with 13 mcqs. Coding Problems were very easy.
3. Round 1 PI
This round was all about concepts of C, C++, Compiler, Debugging, Design patterns
a. Tell about different sorting algorithms and their complexities. Why so many sorting algorithms
present where only one can serve the purpose. Advantages and disadvantages of quick sort and merge
sort.
b. What happens when a C program is compiled and executed in details.
c. Where are local variables, dynamic allocated variables, global variables stored?
d. Where are static variables stored?
e. Tell me about the design patterns which you know. Which design pattern have you followed in your
project.
f. Write a pseudo code for Singleton Pattern.
g. Consider the code snippet
main()
{
cout
Without touching the above code snippet print
Hi
Hello
Bye
b. Difference between process and thread. Give me a real life example where thr
d. Write a client server simple code. How will you handle multiple requests? Wi
e. How google handles 1 billion request in 1msec.
g. Real life example where hashmap can be used. Real life example where array c
i. What happened in Microsoft last round?(I was rejected in Microsoft last roun
5. Round 3 PI(HR Round)
Basic HR questions were asked. A puzzle was given where three tires are given wh
6. Round 4 PI
a. Find the number of occurrences of a key in a sorted array. Handle the base c
b. Implement a stack where you can search an element in the data structure. He
c. Two strings were given. You have to find whether they are permutations of ea
I thank geeksforgeeks for maintaining such a great site. It helped me a lot whil
If you like GeeksforGeeks and would like to contribute, you can also write an ar
Source
http://www.geeksforgeeks.org/adobe-interview-set-12-campus-mts-1/
Flipkart Interview | Set 13
Hi, I was interviewed at Flipkart few days back. I was contacted by one of their head hunters. The
process was as follows :
2 – Telephonic interview
1 – Machine Coding Round
1 – Problem Solving Round
1 – Hiring Manager Round
Telephonic-1 :
He asked about my previous projects in detail and then asked one problem.
Find the next smallest palindrome give a number. He asked me to write the complete working code.
Telephonic-2 :
Started straight away with the problems.
1. Find the median of a stream of integers. I knew the solution and discussed the heap solution for it.
2. Given an array of integers, find a triplet having sum equal to K.
3. Given an array a1, a2, a3 …. ,an, b1, b2, b3, ……bn. Rearrange this array to a1, b1, a2, b2,
….an,bn. This needs to be done inplace.
Input can be positive or negative. In this round, focus was on Design and Coding Skills.
I was given 1 hr 30 mins to code for the problem. I completed in around 1hr 15 mins. Then he asked
me extend my code for decimal numbers as well. I told him the approach. Then he asked me how will
i do the division as well.
He basically wanted to know how i think and how many approaches i can think of, and whether i can
challenge him or not that its not possible. and yes i did.
Then he asked a stock span problem. Given stock prices in an array. Find the buying and selling time
so that profit earned is maximum.
Hiring Manager round –
He asked me some behavioral questions.
Why do you want to join Flipkart. Then What would you do if something goes wrong on production,
and you are unable to find the bug, etc.
Them he discussed the projects i had done in my previous company.
I would like to thank GeeksforGeek team for building such an awesome site and platform for
interview preparation and helping out the geeks over there to grab good opportunities in the industry.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-set-13/
Interview Experience at Samsung
Research Institute - Delhi
I am an off-campus hire. Please find my interview experience below:
a. First is aptitude (25 Arithmetic Aptitude + 25 Data Interpretation). The questions were easy
but time consuming. In this round, both speed and accuracy matters. We have to solve around 35
questions to clear this test. So, we have to be accurate in solving 35 questions. In this test there is
no negative marking, so after solving 35 questions, you can mark all the remaining questions and you
are through this round.
b. Second is the technical test (20 Questions). They give an option to choose from C or C++. In this
test, you have to solve 14 – 15 questions to get through. In this round, there are no options; we have
to write the output on the space provided.
After this round, I get the phone call after 15 days that I am selected for the interview.
a. First round was based on Operating System concepts. They asked about semaphores, inter-
process communication, scheduling algorithms etc.
i. Write down the program to tell whether the stack is growing in which direction in memory.
ii. Write down the program to find all permutations of the string and discuss the time complexity.
c. Third is the HR round where negotiation about salary is there. It was just the formality.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/interview-experience-samsung-research-institute-delhi/
Telephonic interview for Tower Research
LLC, Gurgaon internship(High Frequency
Trading)
1. Brief explanation of a research project done in summers.
2. Algorithmic:
An infinite stream of numbers is given. The stream is stopped at an arbitrary point. Return any number
of the stream read till now with equal probability, using O(1) space.
3. Knowledge based:
(It was determined whether the candidate has done a course on Data Structures and Algorithms.)
A weighted, undirected graph is given, in which two vertices are specified. The objective to
determine the shortest path between the two vertices. It was asked whether there exist any algorithms
for this.
(It was observed by the candidate that the Dijsktra’s algorithm is a suitable algorithm for this
question.)
The interviewer proceeded to demand a detailed explanation of the algorithm and the time
complexity.
4. Probability Theory:
Given an array of size n, return the maximum element.
(The candidate demonstrated an O(n) time algorithm, in which a variable stores the maximum value.
The array is read serially, and the variable is updated whenever an element with a value greater than
that of the variable is found.)
An array of size n containing distinct numbers is given. The elements can be in any permutation with
equal probability.
In the O(n) algorithm for finding the maximum element explained above, the variable containing the
maximum element is updated multiple times over the pass of the array. Find the expected value of the
total number of updations(changes) on the variable, over the pass of the array.
5. Game Theory:
A two-player game is described, in which each player can pick any number from 1 to 10 arbitrarily.
The objective is to end at a position where you(a player) pick a number such that the sum of all the
numbers picked by you and the opponent till that point(including the number picked at the end by you)
is 50.
Find a winning strategy, if it exists.
The strategy should also include the information whether you play first or second.
6. Mathematical Puzzle:
Given a sphere, find the maximum number of points can be placed on the surface of the sphere such
that all are equidistant from each other.
Explain the solution.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/telephonic-interview-for-tower-research-llc-gurgaon-internshiphigh-
frequency-trading/
Amazon Interview | Set 123 (On-Campus
for Internship)
Online round: In this round there were 20 MCQ’s to solve and 2 coding question. Of the 20MCQ’s a
couple of questions were on Quantitative aptitude, relationships, OS, DBMS, Data structures etc.
there was negative marking for every wrong answer so I attempted only 15 for which I was sure.
Q2- given a binary tree where each node has some weight. You have to return the max weight in the
binary tree.
Maxweight = value of root node + value in its left subtree and right subtree.
Ex - 2
/ \
-1 3
Output = 4
2nd round :
Q1. Connect sibling pointer in a binary tree
http://www.geeksforgeeks.org/connect-nodes-at-same-level/
http://www.geeksforgeeks.org/connect-nodes-at-same-level-with-o1-extra-space/
Q4. Problem statement was very long but it was topological sorting.
http://www.geeksforgeeks.org/topological-sorting/
I used adjacency list representation, he asked me why
And finally asked me to code it.
Some tips:
Never give up
Don’t start with coding ,first explain the approach.
Be honest
www.geeksforgeeks.org – my guidebook.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-123-campus-internship/
Oracle Interview | Set 7
On line test consist of 4 sections analytical, quant, computer science and English.
On interview day
0th round(no elimination):
given 3 questions:
1. Given array of 14 integers and asked to build max and min heap pictorially.
2. Given array of integers and element find whether sum of any two elements equal to given number.
3. Given array of rotated sorted integers and asked to search for an element.
I completed these questions in 35 min and returned paper then immediately they called for interview.
1st round(1hr30min):
1. Difference between java and c
2. Questions based on above 3 questions (how you solved)
3. He asked me “given a big file and i want count of all words in file” define your own data structure
for it and implement algorithm to it.
Once implemented asked me to implement efficiently.
For both algorithms time complexity.
4. Given around 10 sql queries i wrote the queries and then he given 2 tables and asked me the output
for all the queries.
5. Given a complete binary tree and if you wants to insert a new element how to do it. I told him if
tree represented in array representation then 2i and 2i+1 concept. Then he asked me another way then
i said using queue.
6. In both using array and using queue representation how you will implement max/min heap.
2nd_round(1hr):
Completely on resume.
In detail explanation about previously done projects.
Questions based on oops concepts.
3rd_round(50min):
Questions based on structures unions and structure padding.
He given array of elements and asked me to build binary tree, Binary search tree, avl tree.
Asked questions on all trees.
Then questions based on current project.
HR_round(around 15min):
Tell me about your self which you did not mentioned in your resume.
Out of all the projects which you did which one you like most and why.
And job location priority etc.,
I hope this may helpful to some one. Thank you guys without your help i cant make it.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/oracle-interview-set-7/
Directi Interview | Set 6 (On-Campus for
Internship)
Recently Directi visited our campus for intern selections. There was 1 Online coding round hosted on
codechef, 2 Algo Interview round and 1 Technical round.
Question 1. There is a compressed string eg. ”ab2c3”, the string has lowercase characters and
numbers. We can uncompress the given string as follows: whenever we get a number “n” in the string,
the portion of the string before the number will repeat “n” times. So in the above example, we get a 2,
so string will become “ababc3”, now we get a 3, so final string will be “ababcababcababc”.
Given a compressed string and a number k, you have to output the k’th character in the uncompressed
string.
They shortlisted 12 students after this contest for the next round.
Question 2. Suppose there are two piles of plates in the table. One has ‘m’ RED plates and other has
‘n’ BLACK plates. In his/her chance, a player can either pick any number of red plates or any number
black plates or equal number of red and black plates. A player loses if he cannot make a move in
his/her chance. You are playing this game with your friend. Given that you begin the game and both
the players play optimally, output ‘L’ if you will lose or ‘W’ if you will win.
example:
input: m = 1, n = 2
output: L
input: m = 2, n = 2
output: W
After this round, they selected 4 people for the next round of interview.
Question 2. You have an undirected weighted graph, given input ‘x’ and ‘y’, which are any two
vertices of the graph, you have to output all the edges that are in any of the shortest path from x to y.
Note that there can be multiple shortest path from x to y. We have to output all the edges in any of
those shortest paths.
He asked few more small questions which I don’t remember, after which the interview ended.
Tips:
1. There main focus was on string and graph, prepare well for them.
2. Practice your codes on paper or google doc, you will not get any editor for coding.
3. Keep your concepts clear on all the topics, they can ask you about any minute detail of any data
structure or algorithm.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/directi-interview-set-6-campus-internship/
[TopTalent.in] Exclusive Interview with
Anubhav from BITS Pilani who cracked
EBay
confirmation of a job offer from EBay. He recalls ‘I did not expect everything to sail through so
quickly. It was a rather quick back to back, I guess 2 hours of interview, and they offered me the job.’
But we know it’s not so easy to land a job in one of the fastest growing companies in the world.
Behind this is a lot of determination, hard work and talent which eventually resulted in achieving this
amazing feat. We at TopTalent.in spoke to Anubhav about his experience of giving an Ebay interview
and what advise he had to offer for others looking to achieve something similar.
You can also download his resume by logging in and see what you can learn from it which can help
you with your job interviews.
TopTalent: Can you give us a brief account of what you felt was the toughest interview?
All the interviews were more of a discussion. I was given a problem and then there were
modifications. So I did not feel very uncomfortable once it started. I would say the third round of
technical interview can be considered the toughest. It involved questions based on your interests. I,
being particularly interested in Computer Networks, was asked to design a complete WhatsApp
application and server. It not only included the design, where I had to tell what all will be
implemented on server and client on an abstract level, I was also asked to code for the client with
few features. The discussion then moved to Java, OS and bit manipulation questions.
I just prepared myself to tackle the problems as they came and made sure the interviewer knew what I
was thinking. I think it is very essential to have effective communication with the interviewer in order
to truly showcase your abilities.
TopTalent: What resources did you consult? Where did you practice problems from?
I looked through the problem sets on GeeksForGeeks and CareerCup but not extensively. The problem
discussions I had with my friends were the most useful according to me.
TopTalent: What kind of skills do you think helped you getting this job?
My open minded and application oriented approach to problems. The interviews were based on my
past work and the discussions were also focused on creation of applications and how I will go about
it. So there was no right or wrong solution, it was about how you implement it and upgrade it with
changing needs. We ended up designing a basic WhatsApp server and client application.
TopTalent: What’s your advice to students who are aiming for similar placement offers as
yours?
Just be true to yourself and be confident. Things will work out. If you are learning something new
everyday ( even if it is not in your course ) then you are not wasting your time, just keep learning and
be curious. Not knowing is okay, not learning is not.
As far as study topics are concerned, I would say, as many others, that DSA and OS play an important
role. If you are good at OOP ( any language, like Java ) that is a plus, as most of the industries work
on these platforms. Don’t waste your time during the summers, take up some internship or freelancing
project or get involved in some opensource project.
Do not put in anything you cannot talk about for at least 5 minutes. One of the rounds ( ~1hr ) was
completely based on my resume and I enjoyed it because I knew everything I had done. One of the
project was based on Android sensors and location accuracy and that extended into a discussion of
how PayPal uses it. So make sure you know what you have done. Keep it short and to the point.
In case you missed, like the blog article and wish Anubhav a very happy b’day and you can also
download his resume by logging in.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/toptalent-exclusive-interview-anubhav-bits-pilani-cracked-ebay/
Adobe Interview | Set 13 (On Campus for
Internship)
We had Adobe visit our campus recently. First they shortlisted students for an online test on the basis
of CGPA. A few students even got direct offer.
Online Round
There were 8 questions in total. 5 MCQ, 2 Coding and 1 question was based on creativity.
The MCQ’s were on heap, and probability. Finding the expectations and the running time
complexities for heaps were the main focus of the MCQ’s.
In the coding questions we had to write pseudo code, not actual C++ code.
1st question: There is a stream of incoming integers, how would you maintain its median using a
minHeap and a maxHeap.
(http://www.geeksforgeeks.org/median-of-stream-of-integers-running-integers/)
2nd question: You have the start time, end time and index number of racers in a race. You need to tell
the rank of each racer. The rank is calculated as following: if racer B starts after racer A but finishes
before racer A, then the rank of racer A increases by 1.
Eg,
Index Start Time End time
0 100 170
1 80 150
2 120 165
3 110 145
Output
Index Rank
2 0
3 0
1 1
0 2
I did it in O(n^2), but I think there should be an O(nlogn) algorithm for this.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-set-13-campus-internship/
Facebook Interview | Set 2 (On Campus for
Internship)
Recently facebook visited our campus. There was an online round first. 7 people were shortlisted for
the telephonic interviews. And then there were 2 telephonic interviews taken by people from the US.
Online Round
2 coding questions were given, and the time was 75 minutes.
1. There are n trees in a circle. Each tree has a fruit value associated with it. A bird can sit on a tree
for 0.5 sec and then he has to move to a neighbouring tree. It takes the bird 0.5 seconds to move from
one tree to another. The bird gets the fruit value when she sits on a tree. We are given n and m (the
number of seconds the bird has), and the fruit values of the trees. We have to maximise the total fruit
value that the bird can gather. The bird can start from any tree.
I forgot the examples, sorry:(
2. You are given the encoding for a base 58 number. You have to convert all the numbers from 1 to n
to a base 58 number using the encoding given.
The questions were not difficult, and the shortlisting basis was very strange. My friend finished much
before me, but he was not shortlisted. I think they looked at your CV and projects.
1. You are given the start time and finish time of n intervals. You have to write a a function that returns
boolean value indicating if there was any overlapping interval in the set of existing intervals. (Sort
and check, time complexity O(nlogn))
2. You have 2 sparse vectors (large number of 0’s). First tell me a way to represent and store them,
and then find the dot product.
(To store them, we should store the value and index of those indexes that have a non-zero value, and
then finding the dot product is very straight forward).
1. You have an array of n elements, and a sum. Check if any 2 elements in the array sum to the given
sum. ( Expected time complexity O(n). Use hashing)
2. Extended the previous problem to sum of 3 elements in the array summing up to the given sum.
A few pointers:
? Always explain what you’re doing and why.
? First explain the algorithm and then start coding.
? If he gives a hint, take it and use it.
Thanks geeksforgeeks.org
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/facebook-interview-set-2-campus-interview-internship/
Adobe Interview | Set 14 (On Campus for
Full Time)
Round 1(aptitude and coding) Two tests:
Test 1 (50 mins)
45 questions on analytical reasoning, quantitative and geometry.
Analytical Reasoning Questions were tough, with lengthy and confusing statements.
b) Implement the qsort() in c/sort() in c++ library or your own custom sort which will sort any type of
data on user defined criteria. write the function prototype, definition and another requirements.
c) How much memory is made available to a user program by the kernel, is there any limit to it? What
is the range of addresses a user program can have at max, what determines it?What happens if excess
memory is allocated to a user program, say malloc in an infinite loop?
d) What is the difference between mutex and a semaphore. Write down a crude implementation of
both. How would you solve the mutual exclusion problem using semaphore. Propose a solution to the
readers-writer problem.
e) Other OS related problems.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-set-14-campus-full-time/
Microsoft Interview | Set 33 (On-Campus
for Internship)
Recently Microsoft IDC had visited our Campus for Intenship. There were 6 rounds in total for me.
Objective Round :-
The objective round was taken in Cocubes.com, there were 15 questions (1 question was repeated in
my set). There was a question about “Rectangular Collisions in an array” which I had no idea about.
Coding Round :-
There were two coding questions :-
1) Find an element in a sorted array which has been rotated circularly at only one location in O(logn)
time.
(Refer http://www.geeksforgeeks.org/search-an-element-in-a-sorted-and-pivoted-array/)
(My solution was a recursive implementation returning a bool having only one return statement using
relational operators and two global variables, one for checking if it is the first occurance of a ‘.’ and
other for checking if the sign ‘+’/’-‘ occurs in 1st location or not).
2) Bing wants to improve the experience of users by giving reward points to users. Devise an
algorithm to assign reward points to different users.
You are given a bot and the dimension of a maze having walls and some blocks having gold, check if
the bot can reach a block containing gold.
(Use dfs graph traversal using the recursive implementation and return true if the current position has
gold and return false only if you cannot move any further).
(Refer http://www.geeksforgeeks.org/tree-isomorphism-problem/)
2) You are given an array of n X m dimension. You start from (0,0)th location. You can move from
(i,j) to any of (i + 1,j),(i,j + 1),(i + 1,j + 1)th locations. Find the total number of paths starting from
(0,0)th to (i,j)th position.
(For all i and j,dp[i][0] = dp[0][j] = 1, dp[i][j] = dp[i – 1][j – 1] + dp[i][j – 1] + dp[i – 1][j]).
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-set-33-campus-internship/
Sandisk Corporation On Campus Interview
for Software Developer
ROUND-1
Written test-including 10 basic aptitude questions, 10 questions of C and 2 Coding Questions.
–Design data structure to implement sparse matrix.
–One bit manupulation ques.
ROUND-2
Technical Interview
1. Ask about written test,about questions in written test -how you had solve them.
2. Ask me about the projects you have made.
3. Which language you like the most and why?
4. Other basic questions…
ROUND-3
Technical Interview
2..People are sitting on round table and we have knock out each of one in alternate order eg 1 2 3 4 5
6. These 6 people are sitting in circular table. If we knock out 2 first. Output should be 2 4 6 3 1 5
ROUND-4
HR Round
I would like to thank geeksforgeeks.org which helped me lot throughout my placement process.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/sandisk-corporation-campus-interview-software-developer/
MAQ Software Interview Experience
30 Multiple Choice Questions ranging from quantitative aptitude and puzzles has to be done in 30
minutes, 25% negative marking was there.
Algorithm round
There were 2 questions, for 1st question we have to write the working code and for 2nd question we
can write algorithm
Coding round 1
Technical round 1
Tell me about yourself, then they asked me to explain the code i have write in coding round, snake
ladder algorithm, give a program to write (sum of factorial series of n terms) and then asked me to
optimise that code and about my projects.
Coding round 2
Sort a matrix such that rows in ascending order and columns should be in descending order.
Technical round 2
Start from project, asked about the role in project, i handle database so he asked SQL queries. Also
asked puzzle (from two dice make calendar), virtual function, function overloading, function
overriding, program to find nth prime number and then optimise the code.
Communication test
HR Interview
Tell me about yourself, family background, questions from what i have written in Communication test.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/maq-software-interview-experience/
MAQ Software Interview Experience | Set 2
1) Written Test: 30 ques in 30 mins consisting of simple quantitative aptitude, 2-3 puzzles.
3) Technical Round 1:
15 mins coding test: write a working code to print first non repetitive character in a a string.
explain the code, optimize it. General questions on dbms like transactions, 3-4 simple sql queries, 2
puzzles, basic oops concepts like inheritance, polymorphism.
Few simple codes were asked like factorial of a number with and without recursion
4) Technical Round 2:
15 mins coding test: working code to sort a matrix, so that the rows are sorted in ascending order and
columns are sorted in descending order.
I was asked to optimize the code. question on data structure like find the common ancestor of given
two nodes of a BST both with and without recursion, finding loop in a linked list, finding middle
element in a linked list, whether a linked list is circular or not, Y node problem in a linked list, 1
question based on clock, 2 eggs puzzle
I was asked to explain the components of my project in detail
6) HR Round
Tell me about your self, your family background
Tell me something which is not mentioned in your resume
What you found most interesting about the company
What type of work you want to do at company
Any experiments you have done in your life
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/maq-software-interview-experience-set-2/
Oracle Interview | Set 8
Company Name : Oracle (Server Technology)
Oracle procedure consists of
1) Written Round
2) Coding Round
3) 2-3 Technical Rounds and 1 HR Round
After about half an hour, one of the interviewers came out and formally announced “YOU ARE
SELECTED”
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/oracle-interview-set-8/
SapientNitro Interview Experience
1. Recruitment process
There was a written test which had four sections. Technical, Logical Reasoning, Quantitative
Aptitude, Verbal Ability.
Shortlisted candidate went for technical interview round.
Then further shortlisted candidate went for hr interview round
Those who got shortlisted after the hr round got the full time offer.
Written Test
Technical sections had questions from almost all the sections(C, C++, DBMS, DS, OS)
Quantitative aptitude’s questions were good.. All were almost of R. S. Aggarwal’s level though
few exceptions were there too
Logical reasoning and verbal ability was good.. Some questions were tough.
Technical Interview
HR Interview
Interview tips
Prepare for hr round as well, it’s important too. If two people have same technical skills then
obviously the one with better hr skill stands with and upper hand
Your positive attitude matters a lot. Try to have a smile on your face when you enter the
interview room
Should have good communication skills
Stay confident throughout the interview, even if u dn’t know abt any particular thing dn’t panic
just try your best..
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/sapientnitro-interview-experience/
Flipkart Interview | Set 14 (For SDET-1)
The first online round was an online test from HackerEarth. It had 3 programming questions, out of
which we had to program any two. The questions were:
1) To reverse the words in a given string
2) I don’t remember this question properly but was something similar to this…. Finding all the factors
of a given number and finding if the one’s position of the factorial and the number were same..
There were 30 other MCQs from aptitude, programming, data structures and algorithms.
The first PI round was taken by a team member and he asked many questions regarding my final year
project. He was also asking different flows and testing involved in them.
He asked me some SQL queries too. He also asked me a question like if you are given a sorted array
of size 7 but only 4 elements in it and a sorted array of 3 elements. How would to combine the
elements into the first array in such a way that array is sorted.
One more question which i remember— How do you find if a string is a palindrome or not?
In The second PI, I was given two scenarios to write test cases(apart from UI
testing). One was the flipkart coupon textbox from checkout page and the other was the gmail
application. He also asked me sql query to remove all duplicates from a table having multiple
duplicates.
That’s all for now. If i can remember more questions, then I will definitely write to you.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-set-14-sde-1/
[TopTalent.in] Exclusive Interview with
Vivek Ruparel who got into Amazon
Vivek was quite happy when he cracked his first ever interview
on campus. The thought of enjoying the college life in last year without the pain of campus interviews
seemed quite pleasant. He could crack this amazing company by being dedicated and disciplined in
his interview preparation. As he recalls ‘I used to practice atleast 6 problems a day for two months
before my interviews.‘ We at TopTalent.in spoke to Vivek from Jadavpur University about his
experience of giving an Amazon interview and what advise he had to offer for others looking to
achieve something similar.
You can also download his resume to see how you can do it too.
TopTalent: What companies did you get offer from apart from Amazon?
As Amazon was the first company in our campus, I didn’t get a chance to sit for other companies. So
its only Amazon interview that I can share with you.
It feels great. No better feeling than hearing your name in the final bunch of shortlisted students. If one
puts his effort with full dedication, it does pay off.
TopTalent: Can you give us a brief account of what you felt was the toughest interview?
Since I have only gone through the Amazon interview process, so its Amazon by default. I can
definitely share the toughest round I came across during my interviews. It was a question based on
arrays. It was pretty tough. I was able to solve this question and I think this question sealed my place
in Amazon.
TopTalent: What was your preparation strategy?
Not just going through the codes but finding the solution and implementing them on my own, no matter
how long it took. That is the most important thing according to me that helped me crack this interview.
Second thing was regular coding to crack the online coding rounds. I used to practice atleast 6
problems a day for two months before my interviews. Third was the getting familiar with all data
structures and algorithms.
TopTalent: What resources did you consult? Where did you practice problems from?
TopTalent: What kind of skills do you think helped you getting this job?
TopTalent: What’s your advice to students who are aiming for similar placement offers as
yours?
1. Don’t just go through the codes. First try it on your own, that’s very important. Once you have
cracked a problem, write it in a paper and check for the corner cases.
2. For the coding part, once you have cracked a problem, always try to run the program at one go.
3. OS, DBMS and Networking. If you get a good hold on these subjects, it will make you stand apart
from other candidates.
My resume had only one page in it. I would suggest to keep only relevant information in the resume.
Most important thing, one should be ready to answer any query on everything in his or her resume.
In case you missed, you can also download his resume by logging in.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/toptalent-exclusive-interview-vivek-ruparel-got-amazon/
Samsung On Campus Interview
Recently Samsung visited my campus for full time recruitment.
Round 1:
One hour was given and around 70 were shortlisted to next round
Round 2:
We then had next round the very same day and it was coding round. There were three questions and 1
hr was given
1. Given two polynomials as linked lists, return a linked list which represents the product of two
polynomials
3. Given a boolean 2D matrix, find whether there is path from (0,0) to (i,j) and if there is one path,
return the minimum no of steps needed, else return -1
Technical Interview I:
It started with a formal introduction and the interviewer asked about me. Then he started asking me
about my project on Distributed Systems and various questions based on that. Then questions on
TCP/UDP, which is better, how, etc
Then he asked me questions from the linked list question asked in coding round. As I didn’t complete
that question and he asked me how will i do it. They had the code and asked me to correct it.
Given two arrays of equal size 100, one array contains 100 consecutive unique numbers in random
order. The other contains numbers with the same range as the first, but they need not be unique and
there will be repetitions as well as some numbers missing. Now return the array which has unique
elements
As i said i was interested in mobiles, he asked the differences between Android and iOS
Again in this round, my project on Distributed Systems was taken and there was a thorough review
about it. How i implemented, why did i do that way, etc.
Finally the dynamic programming question asked in round 2 was reviewed and he asked for
optimizations.
Few were selected for HR from round 2, but i had another round of technical interview where again i
was asked questions from networks and OS basics, scheduling, difference between mutex and
semaphore and many more conceptual questions. There wasn’t any coding related questions this time.
HR Round:
Then finally i was called for the HR Round. Following questions were asked:
3.Why do you want to join Samsung, when you have an offer already? (I had an offer from the
company I interned)
4.What were the companies you attended previously and why do you think you failed in them?
6.Questions about how the previous rounds were and what department you’d like to work and few
more i forgot.
Finally after a long wait, the results were said and I was lucky enough to get selected. Thanks a lot to
geeksforgeeks without which I couldn’t have prepared well.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/samsung-campus-interview/
[TopTalent.in] Exclusive Rapid Fire
Interview with Gritika Who Got a job offer
from Microsoft
For Gritika, and for many others like her, Microsoft is a dream company. As she
We at TopTalent.in spoke to Gritika from Jadavpur University about her experience of a Microsoft
interview and what others can learn from her experience. You can also download her resume to see
her detailed profile.
My toughest interview was the third round of my Microsoft interview, after which I was asked to
leave. But, seems like I was destined to get the job and was called back Even the HR round
was quite grilling, the interviewer was very friendly still the answers he expected had to be prompt
and precise.
Your Preparation Strategy: I worked on data structures. I feel if you have a sound knowledge of the
various data structures, it helps in optimal problem solving. But practicing codes is also very
important, as it enables us to identify all possible bugs and test cases.
Resources: Geeks for Geeks, I owe my success to that site. My college seniors were also very
helpful. They guided me, which enabled me to only study the relevant topics from the pool of
available topics.
Your Skills: Writing codes efficiently (on paper as well), this helps in the PI rounds as we can
develop linear program writing skills. Identifying test cases, as we know Microsoft puts great
emphasis on test cases.
Advice: Have a mind of your own. Don’t just mug up efficient solutions to problems, try to come up
with your own solutions. This is what makes you stand out from the others when you are confronted
with an unknown/unexpected problem.
Resume: Keep it precise (within 2 pages). Highlight your skills and achievements. Doing project
work is certainly helpful as it demonstrates that you are capable of developing something useful from
just a list of requirements.
In case you missed, you can also download her resume to see her detailed profile.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/toptalent-exclusive-rapid-fire-interview-gritika-got-job-offer-
microsoft/
Aptitude Test (60 min):
4 sections, no negative marking but they had sectional cut-off.
Section 1 (C, C++ ):
15 questions.
Mainly questions of type what will be output of following, type of error.(compile time or run time
,etc.) [Do pointers, pointer to functions and OOP concepts in detail]
This section was quite easy.
Section 2 (Operating System):
10 questions.
Questions on deadlock, process scheduling, priority inversion , look-aside buffer memory, etc.
This section wasn’t that easy…..
Section 4 (Quant):
8 questions.
Questions on probability, series , simple logic puzzles.
Easiest section of apti.
No. of people shortlisted after the aptitude test = 20
Coding Test (2 Questions 30 min)
3 questions were there out of which we had to solve only 2
1. Implement stack (push and pop) operations using linked list.
2. Find the first non-repeating character in a given string in O(n) time complexity.
3. Given co-ordinates of two rectangles find co-ordinates of intersecting rectangle.
No shortlist after this test.
Interviews:
ROUND 1 (Technical Interview):
Questions:
1. Tell me about yourself
2. What is your goal?
3. Find whether no. is even or odd…(I gave mod2 solution)
4. Then he asked about machine cycles required registers required ….what exactly happens at os
level…….then drawbacks of all these….
5. So asked to give another solution to do same….so I suggested (X &1)….
6. He said still it require 1 extra register…. I gave another solution using shift operator
7. What are sockets, pipes, inter-process communication?
8. What is little endian and big endian?
9. WAP to determine whether your system is little endian or big endian?
10. Convert little endian to big endian in constant time.
11. I asked what does nvidia exactly do in s/w development section?
12. He asked to give my opinion …. I told they take diff OS n optimize them to work more efficiently
(in terms of time and memory) with nvidia cards and GPUs.
13. He said your guess is correct….and explained even more.
They shortlisted 7 people from this round.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/nvidia-interview-set-2-on-campus-for-r-d-team-pune/
Morgan Stanley On Campus Written
Round
Recently, Morgan Stanley visited our campus for the written exam for December placements. Here
are the questions for the written round.
Coding Ques —
1. Given an array and a number k. Find number of pairs in the array having sum equal to k.
2. Given a number N. We can divide the number into N/2,N/3 and N/4 at a time rounding all these to
integer value. Now you can repeat above procedure for newly generated numbers.
Get the maximum number that you can generate from a given number.
Example – Given Number = 12
12 –> 6 + 4 + 3
6 –> 3 + 2 + 1
4 –> 2 + 1 + 1
3–>1+1+0
So max number generated = 13 (6+4+3).
3. Various dates are given to us in a specific format. Find the least date among them.
example – Given-
13 Jan 2014
24 Dec 1994
08 Feb 2000
Ans – 24 Dec 1994
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/morgan-stanley-campus-written-round/
Category: Interview Experiences Tags: Morgan Stanley
Sapient global market Interview
Experience
1. Recruitment process
There was a written test which had four sections. Technical, Logical Reasoning, Quantitative
Aptitude, Verbal Ability.
Shortlisted candidate went for technical interview round at their office in gurgaon
Then further shortlisted candidate went for hr interview round
Those who got shortlisted after the hr round got the full time offer.
Written Test
Technical sections had questions from almost all the sections through AMCAT(C, C++, DBMS,
DS, OS)(level :moderate)
Quantitative aptitude’s questions were good.. All were almost of R. S. Aggarwal level though
few exceptions were there too
Logical reasoning and verbal ability was good.. Some questions were tough.
Technical interview
project discussion
asked me to write code of module written in project as my project was in c++
Linked List : find middle node, DLL data structure, Sort Linked List,count nodes,how to free
linked list.
Polymorphosm,Virtual function,types of polymorphhism,
Testing,Black Box Testing,types of testing,difference between spiral model and incremental
model.
Then they came up to global market questions ,For eg,sensex,Banks
interest,RBI,Finance,Loans,Acoounts.(mad tho)
Puzzles,Train problem,Petrol Tank problem
HR(most difficuilt)
introduce yourself
How will you show that you are confident
leadership qualities
GK questions(again mad tho)
few testing based question.
Test cases
Hypothetical situations
why you Graduation marks are low?
Puzzles
They asked do you have any questions?i asked about work culture and relocation
they asked to tell two qualities of us(hr team)(confused)
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/sapient-global-market-interview-experience/
Athena Health Interview Experience
In Athena Health you can apply for anyone Development or Testing(QA) jobs.
1. The first round is for checking problem solving ability. It will contain some 10 questions and no
negative marks.
2. The second round is coding . the questions for coding may differ for developers and testers. I am
sharing the questions that have been asked for developers
i) Check whether every row is valid if anyone is invalid print it as invalid row
and the values corresponding to that row.
iii)Check whether every square is valid if anyone is invalid print it as invalid and
the starting and ending position of that square.
b. For the given sentence and 2 words find the distance between 2 words.(i.e number of
words between those 2 words in the given sentence). If those words are not present in the
sentence then print as -1.
3. It is technical round, you will be having 2 or 3 members per panel and questions may be from
database,object oriented programming,operating systems, linux commands and algorithm may be
asked for problems
a. Maze problem.
b. exchanging the numbers opposite to each other in a clock. Replace 12 by 6, 1 by 7,2 by 8 and so
on. The numbers may differ. not only 12 numbers. it should be exchanged depending on the number of
elements given in the circular list.
Source
http://www.geeksforgeeks.org/athena-health-interview-experience/
Amadeus Labs Interview Experience
So recently Amadeus Labs visited my college for Campus Placements and finally picked 10 students.
It also offered us 6 month training before the job.
ONLINE TEST: The online test was conducted by SHL and was really tough. you are allowed
calculators for numerical reasoning questions(YOU WILL REALLY NEED IT). The questions in
maths were pretty long and therefore required quick reading and analysis skills.I would recommend
reading the full question first before you proceed. It will surely save your time. Dont crosscheck your
answers. You will not get enough time. You need to be really fast. Keep a good track of the time
otherwise you will fail to complete the test. The verbal part was comparatively easy and would be
easy to crack. Always remember to stick to the paragraph and do not deduce answers from your own.
To practice for the test i would recommend you to go to SHL website and try out practice papers only
for NUMERICAL AND VERBAL. It will really help you a lot!!!!
15 students out of 200 got shortlisted for the interviews. Thankfully I made it through.
INTERVIEWS: First of all there was a technical interview.I went in and shook hands with the
interviewer. I believe its always a good idea to shake hands even if he hasn’t offered first. I don’t
think there is any harm in offering a hand. He asked me about myself and I tried to drive the interview
according to my strengths. He was very thorough with my CV and questioned me about my projects. I
made a Ticket booking system which clicked with him as Amadeus does the backend for travel
industry. He asked me the drawbacks in my system and ways to improve it.He was really pleasant and
patient with me. I would really recommend you guys to be very thorough with your projects and know
every bit of it. He then asked me how i would make an unmanned Parking lot management system. He
gave me various obstacles in that but I turned out just fine. He then asked me about ROWID(sql).
Then he asked me about normalization. He asked me how i would delete duplicate entries from a
table. I just explained him the logic and the SQL query i wrote down was garbage. He crosschecked it
n questioned me if it will work. I honestly told him that it wont but I tried to explain him the logic. He
was not at all disappointed by that.He asked me where do i see myself after 5 years. Then he asked
me what is multiprogramming, multiprocessing, multithreading (It was purely because my CV said i
scored ‘A’ grade in OS). His aim was to test my knowledge and confidence.If u can justify your
answers and make him realize that you are great with ideas he will definitely select you.
Then i was called for the second round of interview(HR). The guy looked kinda unconcerned(I
believe he was testing my comfort level). If the interviewer tries to look disinterested don’t be
bothered at all. Just stay polite and confident. Its their tactics to test u. He asked me about myself then
about my projects. He then gave me 3 puzzles to solve-
1) A father and a son are in a car. car crashes. father dies. son taken to hospital. doctor refuses to
operate saying “That’s my son!”. How?
2) 6 eggs 1 basket. 6 people. each pick one egg. still the basket contains 1 egg. how?
3) one mother has 2 sons born at the same hour, same day, same year but they r not twins. how?
I could easily solve all three problems and was then asked to wait outside.
Finally i was called for the final HR round which i believe was more of a formality. He asked me
normal questions about myself and what would I do once i m in Amadeus etc etc.
Finally I got thru all the rounds and got selected in Amadeus Labs Bangalore!!!!
All the best guys! If its your day… You will make it Large!
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amadeus-labs-interview-experience/
Ques2. Design a valet parking lot with basic use-case of assigning ticket to customer and retrieving
the car later. Three sizes available. Use best fit and nearest distance.
If you like GeeksforGeeks and wold like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-telephonic-interview-questions-sde-1/
Coding Round:
Then after this a large number of students were selected for the next coding round, where we had just
one problem to code and time limit was 30 minutes. Problems were randomly distributed, it’s just that
coding interface was not that good so many fellow mates of mine faced problem getting the output to
the console in the right manner.
A number x supports a number (x+b) where b is the number of set bits in binary representation of x,
like if x = 3 then x supports (3+2)=5 as 3 has 2 1’s in its binary representation. Now you are provided
with an array of numbers you have to print SUPPORTED if number is supported by any number if not
print BLEAK else if there is an invalid input print 0.
After this round 77 students were selected for the interview rounds. A big panel of 9 members had
arrived to conduct these interviews.
Interview Round 1:
1. Code :- A simple C program to reverse the words in a string , like if string is “Oracle @ App
Dev”, then it should become “Dev App @ Oracle”
2. Puzzle: – Two persons X and Y are sitting side by side with a coin in each’s hand. The game is to
simultaneously flip the coin till anyone wins. Player X will win if he gets a consecutive HEAD, TAIL
however Y will win if he gets a consecutive HEAD, HEAD. Now you have to tell is the game fair or
not.
3. Some DBMS questions like normalization, joins and composite key.
4. Code: – Given the value of a starting position and an ending position, you have to reach from start
to end in a linear way, and you can move either to position immediate right to current position or two
step right to the given position. You have the print all the possible path to reach from start to
destination. (DP)
This round went for like 45 minutes, the interviewer was really nice and was giving certain clues in
between to guide me.
Interview Round 2:
This was a long and scary round, it lasted for like 2 hours.
1. You are provided a CSV (Comma Separated Values) in file like E1:12, E2:32 etc. You have to
generate a tree with maximum height 3 only with the given values in the following manner :
E is the root of tree having n nodes to E1, E2, E3 … En. E1, have n nodes E11, E12, E13 … E1n, this
is how things go on second level. Similarly for E111 types of element will be modelled.
Restrictions : You can read file only once , you must take care of the fact that if E1 is not in file but
say E11 is there you must not include it.
2. Provided a string a character and a count, you have to print the string after the specified character
has occurred count number of times.
Ex: String: “This is demo string”
Character: ‘i’
Count: 3
Output: “ng”
However, solving this one must take care of corner case when character is not in string or its not in
string count number of times etc.
3. Design a website similar to bookmyshow.com for booking cinema tickets but it must be for a single
location only which can have multiple theatres in it. In this he wanted me to design a basic rough GUI,
relevant database tables and linking GUI to database and also showing the whole data flow in system.
Site must also provide features like advance booking, user login, user registration, movie rating
option, saving card details etc.
4. Puzzle: Given 10 coins, arrange them such that we get 4 different rows each containing 4 coins.
5. Puzzle: Gi1ven 4 coins, arrange then to make maximum numbers of triangle of the figure.
6. In the end he asked Database Normalization and all the normal forms in detail.
Interview Round 3:
It was a technical + HR round, the interviewer asked me about the previous codes that I had made in
previous rounds. He was more concerned about the approach than code. Then he start questioning
about the site I made in round 3 regarding how I will amend it if it has to go global to all
type of customers. Then there were some basic HR questions.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/oracle-interview-set-8-campus-application-developer-2/
Microsoft Interview | Set 34 (On-Campus)
1st Round (Online)
13th august:
Top 20 students were selected for the next round. 8 had direct interviews while the rest 12 of us
had another elimination round. The selection was done using the total score of both the online
rounds
The interviews were on in parallel and when I went for my 1st interviews some were already rejected
while some even had their 2nd and 3rd interview rounds.
1. Suppose you have an array of elements which has duplicates except 1 number, ex. 1,2,3,4,3,2,1.
You need write a pseudo code to find the unique number. Here ans – 4. Also asked the
complexity of my code which was O (n).
2. Tell the pseudo code to reverse a linked list.
I started to make the logic for O (n) but he said it might not be possible to do it in 1 iteration so not an
issue. But I gave him the logic of O (n) and 1 iteration.
3. You have a matrix a[m] [n]. Transpose it into a matrix b[n] [m] in minimum iterations. I could
think of m*n/4 at most.
4. Questions on OOPS
5. Difference between OOPS and C
6. Difference between abstract classes and interface. Gave cases for me to tell the error or right
ans in abstract classes.
7. DBMS: 5th largest salary of employees from a given table. I answered using rownum and then
limit but he wanted a general ans. So all I could tell was using nested query.
8. Puzzles:
– There are 25 horses. Only 5 can run together at most. You have no timer. Min no. of runs reqd. to
find the fastest horse.
– There are 4 people who want to cross a bridge. Minimum time they take to cross a bridge is 1, 2, 7
and 11 respectively. There is only 1 torch and at most 2 people can cross a bridge at a time. But no
one can cross the bridge without torch (Someone has to come back to give the torch). Find minimum
time in which all 4 cross the bridge.
2nd puzzle I 1st answered 22 but then corrected myself and answered 18 (1 and 2 cross. 1 comes back.
7 and 11 cross. 2 comes back. 1 and 2 cross – total time 2 + 1 + 11 + 2 + 2 = 18).
I was informed 5 minutes after my interview to be ready for the 2nd Round.
Was asked about self, my project on cloud computing and questions related to it.
1 technical question.
I wrote the code but missed the case where n = 0. So as he was checking the code I told him the case I
had missed. He was confused if the code would work if there were less than n + x elements but I
showed him that it would.
Was a short interview compared to others and was scared of being rejected but finally was called for
the hr interview in sometime.
He first told me about the code I had written in the elimination round that it was the best code he got
in the day. Following it were typical hr questions.
Tell about myself, my strengths and weaknesses. Why do I want to join Microsoft?
What would you like to improve in yourself 3 years from now (other than knowledge)?
Finally after the whole day of interview I was selected with 1 more guy from our college.
Thanks to geeksforgeeks.org and geeksquiz.com for helping me prepare and crack the
interview.
Important Points:
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-set-34-campus-2/
Microsoft IDC Interview | Set 35 (On-
Campus for Internship)
Online test: This test was organized by cocubes.com, and had to be completed within an hour.
struct node
{
int x,y;
node* next;
};
We had to implement a function which takes the head of linked list, and if any three consecutive points
lie on same horizontal or vertical line, we had to remove the middle node. The linked list will either
be empty or will contain atleast two nodes. The function prototype was:
Example:
Input: (1,2)->(2,3)->(2,4),(2,5)->(3,4)
Output: (1->2)->(2,3)->(2,5)->(3,4)
2. Given a sorted array, convert it into a height balanced binary search tree. A height balanced tree is
one in which for every node, the height difference of left and right subtree is at most 1. Node of binary
tree was:
struct node
{
int data;
node* left;
node* right;
};
Function to be implemented was:
Interview:
There were 3 rounds of interview, and we had write code on paper.
Round 1:
There were two questions:
1. Given a string, remove all continuous occurences of ‘a’ and any occurence of ‘b’.
Example: Input: “aacbccdbsssaba”, then output: “acccdsssa”
2. What data structure should be used if we have to implement insert and delete functions in a text
editor? The functions should be as fast as possible.
Round 2:
Question 1: Given a string and two positions in that string, shuffle the string, that is, move the given
substring to the front. Example:
Input: abcdefgh, 4,6
Output: defabcgh
This has to be done inplace with O(n) time complexity.
Question 2: How to implement dictionary data structure in C++? What kind of hash functions shall we
use? How to manage collisions?
Question 3: How would you implement vector data structure in C++ on your own? What would be the
accessing time complexity? How can you make it O(1)? How to resize the structure?
Round 3:
Question 1: Given a k-ary tree, how to print the elements layer wise?
Question 2: Given a singly linked list and a number ‘n’, write code to reverse every ‘n’ elements of
the linked list. Example:
Input: 1->2->3->4->5->6, n=3
Output: 3->2->1->6->5->4
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-set-35-campus-internship/
Akamai placement questions for the role
of Associate Network Infrastructure
Engineer or Associate Network Operations
Engineer
It was of 3 rounds :
1st round was aptitude (written test) which contained 30 general aptitude (which includes 2 analytic,
5 mathematical aptitude, also pie diagrams where 4 questions has to be answered using this diagram.
other i don’t remember) and 20 technical questions (which includes networks, unix commands, c
programs to find out output and DBMS ) it was quite easy. You have to get minimum 15 in general
apti and minimum 10 in technical apti.
3rd round was HR round even there some of basic questions on networks and linux was asked to my
friends. and communication skill is important in HR round.
Source
http://www.geeksforgeeks.org/akamai-placement-questions-role-associate-network-infrastructure-
engineer-associate-network-operations-engineer/
Aptitude Part : There were 30 questions to be completed in 45 minutes. There were 10 aptitude
questions which were quite time-taking. Questions were
from Data Interpretation as well. Then we had to choose a section out of C/C++/JAVA and the rest 20
questions were from your chosen section. The chosen section was also time-consuming.
Coding Test : There were 3 questions to be completed in 1 hour. Program 1 was to find the required
element of Pascal’s triangle. Program 2 was to count all the palindromic substrings in a string. I am
sorry but I do not remember Program 3.
2. TECHNICAL INTERVIEW 1 : It lasted for around 30-35 minutes. Questions were on array, hash
map, file handling and string theory. All questions were generally algorithmic in nature.
3. HR INTERVIEW : It lasted for around 50-55 minutes. We were basically grilled in this interview.
4. TECHNICAL INTERVIEW 2 : It lasted for around 1 hour. In this round, there were questions
based on real-life scenario like designing a shopping cart for an e-commerce website etc. Then there
were algorithmic questions on queue, graph and trees. A problem was given and I was asked to
reason out the best data structure to solve that problem. There were simple problems on linked list.
5. GROUP TASK ROUND : It was an entertaining round but was quite pressurising. We were
divided into groups and asked to make something with LEGO Blocks that they had provided. There is
a time-constraint in this round. We had to explain all the design aspects of our construction like name,
choice of colour, significance of buildings, structure strength etc.
Finally after 5 rounds of interviews, I got selected. I thank my parents, friends and my seniors. Of
course, geeksforgeeks is not to be left behind!!!!!!
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/morgan-stanley-interview-set-12-on-campus-for-technology-analyst/
Amazon Interview | Set 124 (On-Campus)
Hello friends, recently amazon visited our campus selecting 2 FTE and 7 interns for different roles.
I would like to say about rejections. I’ve got rejected in many companies (even in Amazon) but finally
got placed in a good company. So be strong, there is always a door opened for us.
Round 1:
Around 500 people attended this round. As usual 20 MCQ and 2 programming questions.
We need to do at least one programming question to get through this round.
MCQ’s include various topics like OOPS, OS, CN, DBMS etc.
Two coding questions were:
1. Merge two linked lists of different size such that nodes from each list are arranged alternatively.
Round 2:
It’s a group fly round and people are divided into groups and asked to sit in different class rooms.
We were given a question in a paper. Here everyone got a standard question. The question which I got
was “Finding the largest contiguous sub array, start and end indexes must be printed with sum “
(kadene’salgo).
My friends got questions like “Boundary traversal” etc.
So, This round is very simple and if you are strong in standard problems, you can clear it with ease.
29 got shortlisted to next round.
Round 3:
It was very simple for me because we were running out of time. Only one question was asked.
“Find the kth element from the end in a SLL “
Different approaches were discussed and he asked me to code for the best one.
19 got shortlisted to next round.
Round 4:
It was one of toughest round for me. I was very much interested in SDE role but I was interviewed for
SE/QAE role. I dint dare to ask the interviewer about the role. We are not said before the interview
that they are going to interview for that roles. I mean it is in their hands to decide the role that matches
your skills.
Questions were a bit tough for me in this round because am not much good in troubleshooting and
testing. And this round went almost for 1 hr 30 mins.
Questions:
1. Given start and finish times of a youtube video and how do you confirm that the video is
completely watched by the user or not? I gave a solution, we can set flags when the user watches a
particular unit of video. He asked me how discrete? I said it may be in terms of seconds. He then
asked me, If a user is just watching in terms of microseconds? I was not able to give the right answer.
2. A web application is running. We have only a text box. If we enter a name in the text box, we get
the details of the person whose name is entered. Now the question is to troubleshoot the application
when it stopped displaying the results after entering a name( whose details are present in the data
base).
I answered many points here, like server is disconnected and there may be locks on the details such
that only one user can access the data at a time. And many other, but he was not much satisfied.
3. Give the test cases for the Gmail login page. At first I got tensed on hearing this question but I
answered well. I almost gave 10 test cases quickly but, the interviewer want to extract as many he
can. So he started noting down all the points which I said and kept asking me further points. Finally
25 – 30 test cases were covered.
5. And 2 more questions were asked (I forgot ) They were from testing and troubleshooting.
First, Tell me about yourself. I request everyone to be well prepared for this question in any
interview. It looks so simple, but its very difficult to impress the interviewer with your answer here.
Next was a question from trees. Find the vertical sum in Binary tree. I said I’ve done it before and I
know the solution. He asked me to go ahead. Then I answered the same thing which was given in
GFG. He then asked me to do it in a single traversal. I gave another solution but it also took 2
traversals. He scolded me that it is also taking 2 traversals. I was not able to think anymore after this.
But it was very simple one. ?
Next he asked me to find the duplicate chars in a infinite length stream of chars. I gave a hashmap
solution and he asked me about hashmaps. He then extended the question that we have Integers also.
Even then I said hashmap solution suits. He asked me about collisions here. He asked me how much
size of hashmap you need?. And also about the range of elements that can be mapped? I answered
well all these questions because I’ve read a lot about hashmaps.
Next he asked me a troubleshooting question. I answered this like the one which I faced in the
previous round.
Next he asked me “what happens during withdrawal of cash from ATM “? (only during withdrawal ?)
I was not able to convince him with my answers. He was expecting a lot in terms of internal clocks
and stuff in ATM.
Next He asked me “what happens when you enter an URL in a web Browser “?
I read this question in many interview experiences, so I answered it well But, He asked few questions
in between. Like what is HTTPS? What does ‘S’ stands for in ‘HTTPS’?
And finally I was in a trap by this final question. What is a Web server? I really don’t know. But I
dared to answer, But to my bad luck I answered DNS server instead of Web server. He was very
All the impression was gone by just one simple mistake of mine and I dint get through.
Finally 9 people got offers out of 14.
2 were FTE and 7 were given INTERN.
TIPS:
If you are aiming for AMAZON then just try to solve as many questions as possible in GFG.
Try to be frank in the interview. If you don’t know the answer, Just accept that you don’t know.
Finally be Strong. Rejections are inevitable unless you are very cautious.
I hope this will help others.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-124-campus/
Amazon Interview | Set 125 (On-Campus
for Internship)
Online Round
In this round there were 20 MCQs to solve and 2 coding questions. Of the 20MCQs a couple of
questions were on OS, Quantitative Aptitude, Data structures etc. Most of them are there on
www.geeksquiz.com. In MCQs there was – 0.25 marking for every wrong answer and +1 for right
answer. Coding questions were of 10 marks each.
Q1- Given an array of positive and negative numbers, arrange them in an alternate fashion such that
every positive number is followed by negative and vice versa maintaining the order of appearance.If
the count of negative numbers is more keep the extra at last in array
Q2- Given an array of random numbers, Push all the zero’s of a given array to the right end of the
array in minimum possible swaps. Order of appearance doesn’t matter. Print the total nonzero
numbers and minimum swaps needed to do so.
Round 1 F2F :
Q1- Two linked lists merge at one point, return the converging node. Constraint- O(1) space and
O(m+n) ,where m and n are lengths of lists.
Link: http://www.geeksforgeeks.org/write-a-function-to-get-the-intersection-point-of-two-linked-
lists/
Input:
1
/ \
2 3
/ \ / \
4 5 6 7
/ / \ / \
8 11 10 12 13
Output:
1
/ \
3 2
/ \ / \
6 7 4 5
/ \ \ / \
13 12 8 11 10
First he asked to do it without recursion and then with recursion. O(n) time complexity.
Q3 – Write an efficient function that takes two strings as arguments and removes the second string
from first string (in place). (Shifting not allowed)
input:
str1: aabcabcb
str2: abc
output: ab
Q4 – Insert an element into a sorted link list which is having loop somewhere and duplicate elements
as well.
Q5 – Make your own data structure. which inserts, deletes and gives a random number in O(1) time.
Hint : Use hash table and array.
Round 2 F2F :
Q1 – You have n pencils, each having l length. Each can write 4 kilometers. After writing 4
kilometers it has l/4 length. Then you can join 4 pencils which are having l/4 length and can make 1
pencil. You can’t make pencil of pieces if remaining pieces are 3 or 2 or 1 in number. And you can
include these remaining pieces whenever you need. Write a recursive relation independent of l,length
of given pencil, for how much one can write from n pencils. Write mathematical equation also.
Input:
1
/ \
2 3
/ \ / \
4 5 6 7
/ / \ / \
8 11 10 12 13
output:
13 12 11 10 8 7 6 5 4 3 2 1
You are permitted to use extra space and now print them in separate levels too.
Output:
13 12 11 10 8
7654
32
1
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-set-125-on-campus-for-internship/
U2opia Mobile Interview Experience
Applied through Greymeter and received call next day for the recruitment process of Software
Enginner(Product Development-C, C++, Java)
In Java,C++ questions were totally concept based and you have to attempt all of them as there is no
negative marking.
Java:
String s1 = "Hello";
String s2 = "Hello";
if(s1==s2)
System.out.println("Yes");
else
System.out.println("No");
String s1 = "Hello";
if(s1=="Hello")
System.out.println("Yes");
else
System.out.println("No");
if(s1.substring(0,3)=="Hel")
System.out.println("Yes");
else
System.out.println("No");
What interface or class you have to implement or extend to override java’s default mechanism :
________________________
______________________
_______________________
C++:
int *p=10;
cout<<*p;
int *p=10;
count<<p;
C inherit B and B inherit A, what are the data types of B and A ,C can access
1.Protected and Public
2.Public and Private
3.Private Only
4.Protected Only
Aptitude :
1. He draw a tree structure on board and ask me to store the structure in a table without disturbing
relations.
2. How to implement Automatic Garbage collection in C++?
3. Write a program for queue ?
HR Round :
Discussion about Products company made till date, and what my role will be if I got selected.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/u2opia-mobile-interview-experience/
Payu Interview Experience | Set 3 (On-
Campus)
Recently Payu visited our campus and its process of selection was as follows:-
Online Test :
15 technical questions + 5 Coding Questions(I solved all the coding and about 10 technical
Questions). Luckily i got shortlisted for the personal interviews. There were 4 technical rounds and 1
HR round.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/payu-interview-experience-set-3-campus/
Expedia Interview | Set 4 (On-Campus)
My Expedia Experience:-
Online Test:-
MCQs on almost all topics (DS, Algo, C, C++, OS, DBMS, Quant, Verbal)
2 coding problems:-
1. Rat in a maze(Basic Recursion Problem).
2. Given a undirected graph check whether it is a tree or not(Easy BFS problem).
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/expedia-interview-set-4-campus/
Category: Interview Experiences Tags: Expedia
CommVault Systems Placement
Experience
My CommVault Experience –
First Round(Coding):
First round was a coding round. There was 1 demo question, and 6 real
questions. Coding had to be done in their own environment. Partial marking(for partial passing of test
cases) was there.
Questions were:
1. Given 2 integers m, and n (decimal system), write a program to perform right shift on m , n times.
2. Given a stack (implemented using linked list), and some pre-defined functions : push(int), pop(),
and isEmpty(), write a recursive
function to reverse the contents of the stack. (No loops allowed).
3. Given a string s, and a mask string m, delete all characters in s that were common to s and m.
4. Given a 2-D array of x’s and o’s, write a function that first rotates the matrix by 90 degrees
clockwise, and then pushes all x’s to the bottom and o’s to the top in every column.
5. Given preorder and postorder of a binary tree, write a function to find the inorder of the same tree.
Each node has 2 members, the coefficient(coeff) and the exponent(exp). Nodes given in decreasing
order of exponent. For example, linked list:
(5, 4)->(2,3)->(3,1)->(4,0)
represents the linked list:
5x^4 + 2x^3 + 3x + 4
So, given two polynomials as 2 linked lists, return the sum of these 2 polynomials as a linked list.
Second Round:
This was a 7 hour coding round. We had to complete their code for a virtual file system. There were
certain milestones which had to be completed. At the end, only 4 students were shortlisted.
First, I was asked to walk through my CV. They asked some basic questions about my projects, and I
answered. Next, I was asked 3-4
hard puzzles. After that, coding questions, mainly from OOPS, DS and Algorithms.
HR Interview:
The HR interview was mainly about my CV. I was asked about my projects and roles held, and what
all work I had done. It was pretty basic.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/commvault-systems-placement-experience/
Microsoft Research India Interview | Set 36
(On-Campus for Internship)
Recently Microsoft research india invited application for internship.They shortlisted based on CV
(projects related to your topic of interest and CGPA).
Then he was satisfied with the answers, he asked few more questions based on my project. I pushed
some codes of project on github and provided link of the same in my cv so he asked about who came
up with the design and how did you do this and that..
Special tips:
Be confident during whole interview.
Have positive attitude and talk with the interviewer while solving any question.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-research-india-interview-set-36-on-campus-for-internship/
F2F round 1:
1) Given a few points in first quadrant – (x1,y1) …..(xn,yn) and given another set of points
(a1,b1…..an,bn), determine whether all the points (a1,b1…an,bn) have already occured in (x1,y1)
…..xn,yn)
2) Given a graph where every two nodes are either friends or enemies with each other. Find a way to
go from one node to the other.
Restrictions:
1) You can also travel from one node to next if they are friends with each other
2) You have some “magic potions”. You can convert an enemy path to a friend path with a magic
potion.
F2F round 2:
1) Discuss one good, one bad feature of facebook. How you will redesign it to improve it?
2) Implement auto complete.
3) Given numbers a1…an find the minimum index, whose element occurs twice in the array. Do it in
one pass of the array ( or less that O(n) if possible?)
e.g 3 2 4 4 2
Output : 1 (is the lowest Index) since, ‘2’ repeats twice.
Follow up:
Return the element that repeats at the earliest in the array. Output: 4
F2F round 3:
With GM. General discussions about projects/work culture/goals.
I got a call after two days that I’ve been selected. Many thanks to geeksforgeeks.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-set-37-sde-1/
Amazon Interview experience | Set 126
(For SDE-1)
Recently I got interviewed with Amazon for SDE1 position and here is my interview experience
which I would like to share with others.
Telephonic round:
1. An array is given with element name and their respective pH values. Print the combination of 2
elements which make a neutral compound.
A discussion started and best solution was O(n) time complexity and O(1) space complexity.
Then I got call for F2F interviews and here are those-
Round 1:
1. Print Matrix in spiral form.
2. A store have n customers and any 1 can visit them any time through out the year.Data is stored in a
file.Design a data structure to find given person visited on so n so date or not.
Round 2:
1.There are N packages P1, P2…Pn. A package may depend on another or many other for its
compilation. Given a matrix of dependency, find a sequence of package compilation.
2.A 2D matrix is given, with each elements representing number of gold coin at that position. I have to
travel from (0,0) to last element of matrix collecting maximum no. of coins.I can travel either right of
an element or down of it.
3.In Galaxy there are trillions of stars. I am provide distance of every star from earth. Tell me nearest
1Million stars to earth, provided with best time and space complexity.
Round 3:
1. Implement LRU.
2.In Android phones we have 3X3 grid for making a pattern. Given a length, find number of
combinations for that length in that grid.
Round 4:
1. Project deep discussion.
2. Few given scenarios and how you will tackle.
3. Strengths and weaknesses.
4. Given a file with many statements. Print all the strings with their anagrams through the file.Logic to
check anagrams and to store them.
The whole process started in 1st week and yesterday got a call from HR for I am invited to be part of
Amazon.
Thank you geeksforgeeks for providing such a nice platform to learn and share.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-126-sde-1/
Interview Experience with Indus Valley
Partners
Round 1 :
~200 students
Duration 60 minutes
Written round, comprising of aptitude question, logical puzzles, and technical questions.
(basic aptitude + heavy java)
Round 2 :
20 students shortlisted and 6 were in waiting list
I was among the shortlisted students, and the fourth one to give the technical round !
2 interviewers
They started with tell us about yourself, a brief summary of the projects I did.
Then they asked oop concepts and java questions . Questions like threading, diamond problem, virtual
destructor, run time polymorphism, compile time polymorphism, operator overloading, operator
overriding, searching, sorting, basic algorithms, exception handling, schema, database design, sql
queries like finding the second maximum element and joins were the main questions asked .
One of the interviewer gave a table and asked to normalize it. Explain everything you know !
Since I worked with python on a research project they asked questions about it.Then questions about
GSoC, GCI and a matlab project . You need to be confident of what you have done and how you have
done .
I was also asked a logical puzzle based on the concept of binary search.
I was also asked about the ruby scholarship as I was selected for that and about a technical group for
women of whom I am the co founder. One of the interviewer said he felt racial as I made a group only
for females 3-4 times (may be he wanted to know how I will react under stress ) I explained with an
example of the ratio of females working in Indus Valley Partner (females have increased in Ivp
according to them )
They were happy at the end as they said it was really nice talking to you
It lasted for 45-50 minutes, within few minutes, I was called for the hr + director round ..
Round 3 :
~10 were called
Duration : 30 minutes
HR + Director round
HR questions like what do you know about ivp, weaknesses, why we should hire you were asked,
hobbies
Director asked questions about algorithmns and again projects were asked .
I was asked about sorting techniques, I explained about quick sort, merge sort, insertion sort,
selection sort, bucket sort, radix sort, count sort with their complexities and auxiliary space used.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/interview-experience-with-indus-valley-partners/
Samsung R & D Interview Experience for
Internship
There were total 2 rounds.
Round 1:
There were 60 MCQs(20 English + 20 Logical reasoning + 20 Data Interpretation ) to be solved in 1
hour.
Round 2:
I got 3 coding questions.
1) Given two numbers. I have to find the number of bit which are required to change in binary
conversion of 1st number so that It get converted into second number.
I have to simply compare the bits of both the numbers and whenever the bit is different insrease count
by 1 and return count at the end.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/samsung-r-d-interview-experience-internship/
Q1: A matrix of 1s & 0s are given, you have to find no of groups of adjacent 1s. Adjacency was
based on 8-connectedness. (Finding no of components in an undirected graph)
Q2: A number is given and you had to translate it to string form (Indian system – lakhs, crores etc. not
millions, billions etc .) The word “and” had to be added at the appropriate place (after 100s place if
there was a digit in 10s or 1s place)
101 => one hundred and one
2311 => two thousand three hundred and eleven
900020 => nine lakh and twenty
35 => thirty five
3 => three
1
Source
http://www.geeksforgeeks.org/citrix-interview-set-2-written-test-experience/
First there was an online round on hackerrank where they asked 4 simple coding questions about DP,
strings and stacks. In this round the selected 3 candidates.
Then there were 2 telephonic rounds, both were technical, both simple.
In first round they asked me 2 coding questions where he asked me to code as close as possible to
the actual one.
First question was you are given a array of string followed by two words. You have to find the
minimum distance between the two words in the given array of string. For example:
(“the”, “quick”, “brown”, “fox”, “quick”)
distance(“fox”,”the”) == 3
distance(“quick”, “fox”) == 1
Second qustion:Given two sorted array of Strings, Implement a merged sorted array of string
A[ ] = {"good", "person" }
B[ ] = { "he", "is" }
return { "good", "he", "is", "person"}
After this round they selected all three.
Then in the second round they asked a little about tree and told me to code 2 codes.
First one : You are supposed to do a level order traversal of a binary tree(not necessarily complete)
and have to print a special character(say ‘$’) after completion of each level.
Second: Given a number print all the combination in which no. can be printed.
for eg.
Input:
3
Output:
2 1
1 2
1 1 2
Tips for the interview: Just be relaxed interview will be simple you just need be calm and do not
make small mistakes like ‘;’. Interviewer’s? main focus will be on end cases, so keep all end cases in
mind while coding. Before start anything keep clear what you are going to code. Finally think out
loud. Best of luck.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/linkedin-intership-interview-software-development-engineer/
Amazon Interview experience | Set 127
(For Internship)
Amazon visited our campus for summer internship. I prepared from Amazon Interview Sets which
were pretty helpful!
Here is my experience :
DAY 1
They had an online aptitude test on day 1. It was 90 minutes: 20 MCQs + 2 coding questions (choice
between C/C++/Java for coding). MCQs were based on DSA, OS, and Math. They were apparently
difficult.
Day 2:
eg :- 1->2->3->4->5->NULL , k = 3
3->2->1->5->4
2. Search for an element in an array which has elements who’s values are first increasing and then
decreasing. (Use modified binary search)
Try giving THE most optimal algorithm which satisfies edge cases too.
2. Given a sorted array which can have repeated elements, find the occurrence of an element. (Most
optimal solution is O(logn) – Using binary search to find start and end occurrence)
3. Make a data structure and implement an algorithm to print all the files in a directory. (the root
directory can have sub-directories too.)
I used an n-ary tree and BFS to print files. It can also be done using Stack.
OS – Scheduling
DBMS – Normalization, Transaction
OOPS – Abstraction
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-126-internship/
[TopTalent.in] Exclusive Interview with
Abhishek who got into DE Shaw
feat. They try to hire the best candidate out there in campus by offering awesome Job Profile and
Salary.
Abhishek could achieve this even though he was not in Computer Science initially. In his own words,
‘I felt a different kind of happiness, something out of this world.”
We at TopTalent.in spoke to Abhishek from NIT Kurukshetra about his experience of a DE Shaw
interview and what others can learn from his experience. You can also download his resume to see
his detailed profile.
TopTalent: What job offers did you have apart from DE Shaw?
DE Shaw was one of the first companies to visit our campus for recruitment. The placement policy of
our college doesn’t allow a candidate to participate in subsequent recruitment process once you are
dream placed. So currently, I have a offer only from DE Shaw.
I sort of screwed my AIEEE exam and wasn’t able to get the discipline of my choice in NIT
Kurukshetra. My interest was towards computer sciences since initial days. We have a provision
where you can change you discipline based on your performance in first year. I was fortunate enough
to get my branch changed. Needless, one thing led to another and I got this job offer. When the panel
announced their results, I felt a different kind of happiness, something out of this world.
TopTalent: What is the profile offered to you in DE Shaw and Why did you choose this opportunity
over others?
The profile offered was that of Member Technical, in this capacity, we will be required to designs,
implements, and maintains the firm’s computer and communications infrastructure. I chose this
opportunity over others because DEShaw has very less number of employees ( around 1300). It feels
good to be among the best few.
TopTalent: Can you give us a brief account of the whole interview process?
First, a pen and paper test was conducted, it was a MCQ type paper of 50 minutes. 20 – 20 questions
from quant and computer sciences and 10 question were more about recent trends in field. Around 14
students were shortlisted out 150 who appeared in the written test. The level of quant was very high.
Average questions solved were 4. I solved 7. There were three rounds, two technical and one hr. In
technical rounds, questions were asked from a number of subjects like networks, databases and OS.
Puzzles were also asked. I was also asked some design question like implement your own garbage
collector. HR round was fairly simple for me.
TopTalent: What was your preparation strategy?What resources did you refer?
I have always believed in making the fundamental concepts of subject very strong. i think that helped
me a lot. Apart from that, I practiced a lot on Codechef. I read cracking the coding interview and
cormen’s book for algorithms. Geeksforgeeks is also a very good resource. It has a vast variety of
questions touching every nook and corner of Data Structures and algorithms. The strategy is to know
what you are studying inside out.
TopTalent: What’s your advice to students who are aspiring for similar kind of achievement?
My advice to aspirants aiming for top tech companies would be that reading previous year questions
is fine, but you should also be able answer if something out of the box is asked. If you tell all the
standard questions, and not able to answer something tricky, it will give a very bad impression.
In case you missed, you can also download his resume to see his detailed profile.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/toptalent-exclusive-interview-abhishek-got-de-shaw/
Intuit Interview | Set 3 (For SE-2)
Written round:
1. Write a parser which takes java file as input and give count of uncommented lines as output. I
wrote code with regular expressions, but I think he was expecting some state transition sort of
approach.
2. Given a large file in which one no. occurs in strict majority(>50%). Find that no.
F2F:
1. Mostly discussed written round questions.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/intuit-interview-for-se-2/
3 Round-TECHNICAL
It was a technical round and there was no specific pattern of questions. It was purely dependent upon
you interviewer what you’ll be asked. Although overall areas covered were OS , DBMS , C output
question and some networking too.
2)question-
Asked me about my project. I explained him problem statement first then what was the solution and
then it’s implementation. He had some cross questions and I explained those.
5)question-
Why did I choose IT in b.tech.
I must tell you this was not a question where you can throw anything as an answer because when I
tried to do that my answer was thrown back at me and I had to give him reasons for my opting IT
branch. It was a tech round and even though this question was not very techy but you must explain
yourself logically and in steps.
6)question-
He said and I quote- “I want to hack your college network. How do I do it.”
Now some questions are asked in that way for which answer cannot be to the point and short. So first
make it very clear what does interviewer actually want to do/know. So I asked him-
What kind of hacking are we talking about here cause we have DNS server ,database sever ,proxy
server and web server. Which one do you want to hack into.
Then he said okay but first I will need to be on the network. How do I do that.
So I said for that you can plug your computer in LAN, you’ll be on the network. Next step is proxy
server authentication to use network. So as we don’t know password (that’s why we are hacking, isn’t
it?) we will have to try all different combinations for user id and password and for that we can use
tool like hydra(thank god I remembered this tool from somewhere).Then he asked me some other way
to do it as it might take forever to guess the correct combination. So I suggested him that many
students will also be on the network and they have vulnerable open ports. So we can scan the network
using NMAP and find such open port then use them to get into network. So now we are in the network
next thing I asked now which server you want to hack. He said database server-
So I replied that we can use SQL injections. He asked me to explain that and I did. He asked if I knew
any other way. Thanks to once seemed useless cryptography, I remembered “MAN IN THE MIDDLE
ATTACK”.I explained that to him. He seemed very satisfied.
7)question-
He took his i-phone and showed me it’s fingerprint scanning feature + password feature in case of
fingerprint scan fails. Then he asked me to write code for it. I wrote code for that. One line in code
was if(scanned fingerprint=system stored fingerprint) so he asked me that fingerprint scanner is very
small and our thumb is very large. How would one part of thumb will be matched to another part
(cause it may happen that you had given lower part of your thumb print initially and now you are
trying with upper part of thumb).How do we resolve this issue in programming. I explained him it’s
not about exact matching but it’s about pattern of thumbprint and for that we can use pattern matching
instead of simple “=” operator. Then a little bit about pattern matching.
8)question-
He asked me how good am I in puzzles.
I told him that I am good in puzzles. So he started asking me one. As soon as he started to explain
puzzle I recognized that puzzle and told him that what he was going to ask and solution as well. He
seemed impressed but apparently I dropped an axe on myself. He got the idea that I am very good at
puzzle and he asked me a tough one that I didn’t read about ever so I tried all that I could but couldn’t
find the solution. Then he moved on to the next questions but seemed disappointed as he was starting
to expect much from me.
9)question-
He asked me what is a data structure and why do we use one.
Explained him.
He asked some real life example of stack and queue.
All I could gave him was programming examples but when he insisted on real life examples I gave
him some weird made up not so real life example. :-p
10)question-
He asked me about recursion
Explained him.
As we were talking very much on each question. He felt like talking more and from tech he went
around for some biggest learning from a mistake/biggest achievement of life kind of questions. There
were other questions too which I can’t seem to remember now.
He told me that he is done with the interview and If I had any questions.
I asked him about opportunities to go foreign in future and he told me that there will lots of trips and
opportunities to go Germany, US and other countries.
So this round went for more than 1:30 hour but it was good.
After this round 6/18 were cleared for the next round.
4 Round- MANAGERIAL
In this round initially introduction then he gave me a problem for making class diagram for an online
shopping website within 5 minutes.
I made that then he had some questions and also pointed out some naming mistakes but apart from that
conceptually he seemed satisfied with my diagram.
Then he asked me that he has explained different areas that SAP Labs in working in. which one I
would be interested to work in. Now here comes the problem as I couldn’t remember what those
areas were. So I said I’m interested in technical work and will be hoping to work on a managerial
post after 4-5 years. He said that’s okay but as all the
work we do is technical but which field i would like to work in. I was getting his point very clearly
but I was afraid to say an area name in case SAP Labs is not working in that field and I’ll be screwed.
So I said “I’m sorry sir.I am not getting your point”. He explained me that our company is working in
ERP, Analytics, Cloud computing and gave some other name too(now I got all the names ? ). I thought
for 10 seconds and chose cloud computing and analytics. He asked me why these and why not others.
I explained him that my project was on analytics so I loved that I am also fascinated with cloud
computing. He said okay how are you fascinated and what do you know about cloud computing. I
explained him all that. He seemed happy.
Then he asked me what career path I’ll be following. I didn’t remember those as well clearly so he
drew all of them and then I selected one path and explained him my reasons. Lucky me that he wasn’t
looking for how much attention I paid in PPT.
ADVICE- pay attention during ppts.
Then he asked me if I have any questions for him.I replied that I had but I asked in last round.
(NEVER SAY “NO” WHEN GIVEN OPPORTUNITY TO ASK SOMETHING EVEN IF YOU
DON’T HAVE ANY REAL QUESTIONS JUST ASK ANYTHING OR EXPLAIN THAT YOU HAVE
ALREADY ASKED THEM IN PREVIOUS ROUND BUT NEVER SAY “NO”.)
Only 4 students made it to HR round.
5 Round- HR
Initially intro.
Then some situational question.
Biggest disadvantage of working in a team.
What would I do if I was given to complete 30 days of work in 1 week.
Explained him with some made up stories and partial truth about my internship and he seemed
satisfied.
And some more HR questions. Can’t seem to remember them now.
Then he said he is done and if I have any questions for him. Never say “NO” in HR for this.
So I asked him about promotion criteria in SAP Labs.He explained very well.HR are really good.
The way they categorize objective instantly and then start talking is really awesome. The way he
explained the simplest question of mine was awesome.
Then he told me to wait outside for results.
Now all 4 students were done with HR. We waited for 20 minutes and then they came with 4 packets
of gifts announcing selection of all 4 students.
After that we went for dinner with recruiters.
ADVICE
Try to be truthful as much as possible in interview.
Do not lie about your skills in resume.
Use preparing materials like-
For written exams—
a) ***must do 295 C for o/p question practice.
b) ***Solve geeksforgeeks quizzes, gate exam papers. c/c++ sections.
Geeks for geeks is best source available for cs/it students. Use it well.
For interviews—
Prepare basics well during 3rd year in all subjects.
Read all famous puzzles from puzzles sites.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/sap-labs-interview-experience-developer-associate/
Belzabar interview experience for
Computer Scientist
First round was a written round.
second round was a written coding round.
third was a technical personal interview round.
fourth and fifth were HR and director round respectively.
First round
It was a online test which includes 90-100 questions based on aptitude, c++, java, sql queries,
computer networks, linux. Questions were not too tough. They were basics based on what we have
covered in our academic subjects.
Second round
They shortlisted 60 – 70 students for this round . It was a coding round . Only one question was given
and we have to solve it on a notepad without using any compiler. The question was
Rotate a matrix by 90 degree and explain the algorithm.
It is not necessary that code must compile. If it has some compilation errors they will consider it until
and unless algorithm or approach is correct. We were required to explain used algorithm on each and
every step so that it can be easily understood. (mention time and space complexity ).
Third round
In this round they shortlisted 20 students . It was approx 1 hour round . They were asking questions on
data structure , arrays , os , dbms , sql queries, OOPS .Questions were mainly covered from
geeksforgeeks .
It is not necessary that all of these topics will be asked from you .They will also see your resume and
ask according to your interest . Like they asked me Question on my interest area( coding, DBMS) .
Fifth round
This was a telephonic director round in which he asked basic puzzles, explanation of your projects
and again basic HR questions.
Now if this round doesn’t goes well dont panic . If your HR round went well , they will consider you
.
And finally out of 6 they hired 4 of them.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/belzabar-interview-experience-computer-scientist/
[TopTalent.in] “It’s the best feeling of my
life” says Krunal after cracking Google,
Mountain View
“I will never forget the day I received my offer letter. Its a dream come true.” Landing a job in Arista
many but for Krunal Patel from BITS Pilani – Goa it was just the beginning. We at TopTalent.in spoke
to Krunal about the Google Interview Process, how he managed to crack it and what are his
suggestions for aspirants looking to achieve something similar.
Google conducted APAC test for 2015 graduating students in Asia pacific regions. I was 8th overall
and 2nd in India after Divanshu. I was called for interviews at Google Bangalore office after that. I
had 4 interviews in total and all of them were based on data structures and algorithms. A few basic
questions were also asked from OS.
TopTalent: Can you give us a brief account of what you felt was the toughest interview?
According to me all the interviews were of similar difficulty level. They were testing different
domains in Algorithms and Data structures. The last interview was relatively at a bit higher difficulty
level.
I revised all my computer science CDCs before the placement season started. Lecture slides were
good enough for that. I prepared for the GATE exam in the beginning of the year and it saved a lot of
time for me during placement season. In my last 4 years my goal was to learn as many new
technologies as possible. I gained introductory knowledge in web designing, Machine learning,
Network Science, Application development etc. Apart from that I regularly practiced on codechef and
topcoder to improve my programming and problem solving skills. I also thoroughly revised my
projects which were mentioned in my resume before the interviews.
TopTalent: What kind of skills do you think helped you getting this job?
Mainly programming skills. I like participating in various programming contest and it improved my
knowledge in algorithms as well as my programming skills. For eg. I learned to spend more time in
designing the solution than in coding. Special thanks to my friend N Hari Prasad (Google Hyd) who
guided me all the time.
TopTalent: What resources did you consult? Where did you practice problems from?
For my computer science subjects I mainly used my textbooks and lecture slides. For Algorithms I
used Cormen and various tutorials on internet.
Google asked for my grade sheet after all the interviews were over. Hence it was part of their review
process. Good grades always make a better impression.
TopTalent: What’s your advice to students who are aiming for similar placement offers as
yours?
1) Writing code after you solve a question or learn a new data structure or algorithm is equally
important. Make a habit to write neat and readable code as that helps your entire team. Make sure you
get your code reviewed. In case of programming puzzles, see the setter’s solution.
3) Find your passion and never give up on it. Rest all follows.
In case you missed, you can also download his resume by logging in to your account.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/toptalent-best-feeling-life-says-krunal-cracking-google-mountain-
view/
Zoho Interview | Set 2 (On-Campus)
Recently Zoho visited for the campus placement. I would like to share my experience to
Around 150 students shortlisted for this round. It was a local machine coding round. A staff will be
assigned to a group of 5 students. He made note of the time took for solving each question. There was
totally 7 questions and I solved 4 questions and did not complete the 5th question.
1) Alternate sorting: Given an array of integers, rearrange the array in such a way that the first
element is first maximum and second element is first minimum.
Input : (((ab)
Output : (ab)
3) Form a number system with only 3 and 4. Find the nth number of the number system.
Eg.) The numbers are: 3, 4, 33, 34, 43, 44, 333, 334, 343, 344, 433, 434, 443, 444, 3333, 3334,
3343, 3344, 3433, 3434, 3443, 3444 ….
Input : (ab)(ab+)
Output : Invalid
Input : ((a+b)
Output : Invalid
R3 | - - - |
R2 | - - - |
R1 | - - - |
C1 C2 C3
Each of the 9 cells can either be empty or filled with an atom. R3, R2, R1 are the rays that originate
from the left. C1, C2, C3 are the rays that originate from the bottom of the box.
Input : Position of the atoms and the rays that gets originated from the outside of the box.
Eg.) 3
3 1
2 2
1 3
3
R3 C1 C3
Rule 1:
A ray that has an atom in its path should print ‘H’ (Hit) If it does not have any atoms in its path, the ray
should pass to the other side.
C1 C3
R3 | - - - | R3
H | - X - |
R1 | - - - | R1
C1 H C3
Rule 2 & 3:
A ray that has an atom in its diagonal adjacent position should refract.
H | - - - |
H | X - - |
R | - X - |
R H R
H | - X - |
R2 | - - - | C3
| - - - |
R2 C3
Rule 4:
A ray that has atoms in both of the diagonal adjacent positions should reflect back.
Input ray: C2
| - - - |
| X - X |
| - - - |
R
Input ray: R2
| - X - |
R | - - - |
| - X - |
Rule 5:
The deflection of rays should happen in the order of the input rays.
The final task was to implement these rules for dynamic matrix size.
H | - - - X |
| - - - - |
| - X - - |
| - - - - |
H
The final task was very confusing and it had to handle all the cases. There are chances for a ray to end
at the starting position if the number of rows and columns are more than 5.
5) Fifth Round : HR
General HR questions like why zoho, how do you see yourself after 5 years, why did you choose
CS/IT stream, tell me about your leadership skills etc.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/zoho-interview-set-2-campus/
Arista Networks Interview | Set 3
I had an telephonic interview with Arista Networks couple of days ago. To apply for Arista Networks
(Internship) CGPA >=8.5, luckily i had. Here are the details of the company’s interview.
Round 1
1. Tell me something about yourself ?
2. what do you know about arista networks ?
3. output of given program
void print()
{
char s[10];
gets(s);
printf("%s",s);
}
int main()
{
print();
}
Round 2
1. Tell me your interest subjects and grade .
2. How will you implement phonebook such that we can search using first name?
3. Following same question , How you will do if you have one more requirement as search with last
name also ?
4. Following same question if you have to search using phone number ?
5. How can you show frequent calls list (list can have at most k items) for a phonebook ?
6. Following same question , how you can solve if two or more calls have same count(and still
maintaining k items only) ?
7. Find duplicates in a file containing 6 digit number(like uid) in O(n) time .
8. Implement bitArray in C .
9. Why do you want to join our company ?
10. do you have any questions ?
I would like to thank GeeksforGeeks team for building such an awesome site and platform for
interview preparation. After 4 days i got confirmation that you are selected for Arista Networks,
feeling awesome .
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/arista-networks-interview-set-3/
Amazon Interview experience | Set 128
(For SDET)
I was interviewed for the position of SDET-1 few days back at Chennai. Here is my interview
experience:
F2F-I:
1) Given a phone number. Check whether it is unique or not(ie no duplicates)
I gave a o(n^2) TC algo first which he wanted to optimize. After 3 series of optimization ,I came up
with a o(n) solution with o(1) space complexity.
3) An array of numbers are given such that the absolute difference between adjacent elements is
1.Given a value…Return the index of the 1st occurrence of that element.
I gave an solution where in the 1st value is subtracted from the search value and hops in the array by
that difference. if the reached value is the search value ,then return the index or just continue this
process. The interviewer was impressed by my solution and told me to code it.
F2F-2:
1) Brief discussion of work in current company
2) A given array represents a tree in such a way that the array value gives the parent node of that
particular index.The value of the root node index would always be -1.Find the height of the tree.
Ex: Array: 1 5 5 2 2 -1 3
5
/ \
1 2
/ / \
0 3 4
/
6
I gave a iterative solution which was told to be optimized. I did optimize it using memorization
concept. I had to code it too.
3) Write a program to find the median of 2 sorted arrays when merged.
4)Write an optimised program to find the number of factors for a particular number
This was a very simple qn.
F2F-3:
1) Brief discussion of work in current company. Why Amazon?
2) Why do you want to leave current company? What do you like most and dislike most about your
current company?
3) Design a automation framework to test a simple site with a login page .Give the various test cases
also that should be considered. Later they told me to give some enhancements to the code too.
4) Design a automation framework to test twitter api’s that is used in a particular site .
5)Give the various automation scripts and tools that I implemented in my current project.
F2F-4(Hiring Manager):
1) Lots of HR, behavioral and team fit questions
2) Describe the most challenging project I have worked on…and why is it challenging.
3) An e-commerce site has a particular functionality created by a group A and another functionality
created by group B. Design a testing framework that could test the work by A as well as
A/\B(intersection).
4) I was working as a security Analyst.So I was asked about 5 critical hacking techniques that can be
used to a e-commerce site and describe each.
F2F-5(Bar raiser):
2)Write a program to check the validity of sorting algorithms used to sort Linked lists.Consider the
case where 2 nodes have equal values too.
I gave a optimized code using hash table concept. The interviewer was pretty satisfied with my
coding ability and started asking me about my projects.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-128-sdet/
Amazon interview Experience | Set 129
(For SDE 1 Off-Campus)
In the recent past, I attended interview with Amazon. Here is my interview experience.
2. Given an array of integers where each element represents the max number of steps that can be made
forward from that element. Write a function to return the minimum number of jumps to reach the end of
the array (starting from the first element).
3. Given the coordinates of billion stars in the sky, find the closest 100 stars from our current position
(0,0).
10
5 15
2 3 12 18
16 21
Though I didn’t get the offer, it was an amazing interview experience with Amazon. Thanks to
GeeksforGeeks, an ultimate portal for learning DS & problem solving and for cracking the coding
interviews.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-130-sde-1-campus/
Microsoft IDC and IT First Round
Questions
Microsoft conducted their first round of shortlisting for placements and internship. The online coding
round was organized by CoCubes like last year.
The test was for 1.5 hrs and had 2 coding questions. Allowed programming languages were C, C++
and Java.
1) Given the head of two linked lists , find the merging point of both the linked lists. In case the linked
lists do not merge then return NULL.
2) Given a 2d array of 0s and 1s where 0s represent water and 1s represent land. A connected patch
of 0s count as one single water body and if a water body is covered by 1s all around it then it forms
one pool. Write a function to return the total number of pools in the 2D matrix. In case a water body is
present on the boundary of the array immediately return -1.
Input :
11111
10101
10111
11111
11111
Output : 2
Input :
11110
11111
11011
11011
Output : -1
Input :
11111
10111
10011
11011
11111
Output : 1
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-idc-first-round-questions/
Question 1: Given a string of words return all words which have their reverse present in the string as
( (word1 , reverseword1 ) , (word2 ,reverseword2) )
eg .
Input -
Sachin tendulkar is the best tseb eth nihcaS
Output -
{ ( best , tseb ) , ( the , eth) , (Sachin , nihcaS) }
Question 2: Finding the just smaller number formed using same number of digits.
Print -1 if not possible .
eg
input - 371
output - 317
input - 456
output - -1
Roiund 2 (Interview)
First round of interview was based on basic data structures
1. Interviewer asked me to write code for the 2nd maximum element of an array . Then the 3rd and kth
largest element in array was discussed .
Round 3( Interview)
Question 1: Asked to write code for level order traversal in binary tree. Question was further
modified to do a spiral order traversal. Both were supposed to be done in O(n) time complexity .
http://www.programmerinterview.com/index.php/puzzles/3-ants-on-a-triangle-riddle/
The interviewer wanted to test my understanding about semaphores and asked some tricky and
confusing questions .
Round 4(Interview )
Question 1: Write code to get maximum and second maximum element of a stack. The given function
should be in O(1) complexity .
Then he made it more interesting by extending the question to Find kth largest number from stack at
any instance in O(1) time. Stack supports push ,pop , peek , and kthmaximum function .
He was very particular about the O(1) constraint .
I gave plenty of solutions but he wanted me to reach a O(1) solution.
Finally i gave him a solution which used an additional heap and a binary search tree and was able to
get O(1) time complexity .
Question 2: Given a biotonic array ( first numbers increase and then decrease ) write code to search a
given number. Time complexity O(logn)
The question was further modified to write code for 4 cases to search –
1 Array could be sorted ascending
2 Array could be sorted descending
3 Array could be first increasing and then decreasing
4 Array could be first decreasing and then increasing
The idea was to first detect which case it was and then search accordingly
Time complexity O(logn)
Question was further modified to handle duplicates. In case of duplicates my algorithm became O(n)
The he started with a small discussion about my projects and research paper .
He then moved on to data structures and asked me how to choose a relevant data structure for a given
problem .
– I gave him advantages of every data structure and certain problems where specific data structures
could be useful .
Then he gave a question and asked me for what data structure should be used keeping time complexity
in mind
Question: Given a list of students and their marks write a function that would print all students with
marks in a given range l , r
eg .
Akshay 30
Atul 25
Angay 20
Sahil 10
Then if input is l = 12 and r = 26
Output - Angay, Atul
I gave a solution by indexing marks with a link list of students creating an array of link lists
He then modified the questions by adding marks in floating points were also allowed .
I gave him a solution using map (c++) based on a key value pair of marks and list of students
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/hike-interview-set-2/
Chalk Studio Interview Experience
Hi, chalk studio recently visited my campus. Here is my interview experience.
The best part was we can view our performance after taking the test.
A correct answer carries 1 mark and wrong answer has a penalty of 0.25 marks.
1. Find remainder when a number is divided by another number without using modulus operator.
3. A cipher was given. We have to write a code to decrypt the cipher alone( no other inputs).
Design a front end for mobile mcq test site. We can use html, css,photoshop, paint etc to design
– The saddest part of this round was first we started with design ques and when interviewer says
switch we have to switch to next question. He said switch in interval of 5-7 mins and we switched
between questions for every 5-7 mins.
Finally 7 people were shortlisted from this round,and 2 people were hired.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/chalk-studio-interview-experience/
Microsoft IDC Interview Experience | Set
38 (For Internship)
I completed my internship at MS-IDC this summer. Here is my interview experience.
Round 4:
Firstly he asked me about myself, then my projects. Then he asked me to write a code to remove
comments from a C file. Then he asked me the approach to detect a loop in a linked list. Then he
asked me to design a system that would add two polynomials.
Round 5:
He gave me a very tough question of graphs. It was similar to a traveling salesman problem but had
two paths, one path or no path to every other city. One possible way of reaching the other city was via
plane and the other was a taxi. The salesman had a fixed number of coupons for both taxi and plane.
He had to save maximum coupons at the end. Then, test cases for this problem. I wasn’t the only
interviewee in this round. I had another person sitting next to me. He was rejected while I made it
through.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-idc-interview-experience-set-138for-internship/
Category: Interview Experiences Tags: Microsoft
Informatica Internship Interview
Experience
Informatica recently visited our campus to hire full time employees and interns. About 70 students
appeared out of which 4 were given internship and two were given both internship and full time job
offer. I was lucky to get an internship. Here is my interview experience.
Round 3:(Interview)
1. Discussion on ethical hacking
Round 5:
1. Implement insertion sort using stacks. Temporary memory, input, ouput etc, everything is in stacks.
2. Implement 2-D array in heap segment. This has to be used for page faults and related OS tasks.
What modifications will you make?
4. Find a magic index ‘i’ in an array in o(1) time, such that a[i] = i. The array is already sorted
Round 6:
1. Flatten a multi level linked list
3. Check whether an array of strings can form a cycle, i.e., last element of one node can occur
anywhere in the first of other
Round 7:(HR)
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/informatica-internship-interview-experience/
Belzabar Software Interview Experience
Belzabar recently visited our campus to hire full time employees. About 120 students gave the first
round, 50 made it to the next round and finally 11 people had interviews. One of was selected for the
post of computer scientist and I was lucky to be that one person.
Round 4:
HR round. Not much of an effort. Be yourself.
Round 5:
Director’s round. He asked me to find greater of two numbers without using if, else, conditional
operator, >,
Source
http://www.geeksforgeeks.org/belzabar-software-interview-experience/
Round 1:
There were 3 sections – Apti, MCQ based on Java question + C++, coding each for 20 min.
Aptitude exam too difficult at least as student I had never prepared for aptitude round even in college
as I was not interested in preparing for CAT therefore I found it too difficult. However, students who
have prepared for CAT exam may find it easy.
Even more important point to note is that they don’t even evaluate Aptitude round as I have made it
through the written round twice without marking a single answer on MCQ. Though I used to do some
random rough work on the question paper . Because of my experience I am inclined to believe that the
aptitude round is just to make a candidates feel stressed. Difficulty level was 6 out 5. 5 being the
highest difficulty level.
Section B was the technical MCQ round in which question were asked from various topics like C-
enum, recursion, stack and queues, Least Recently Used memory allocation, nested union. Java –
Overriding, abstract functions, serialization, one networking question based on TCP protocol
something based on congestion window. I was able to solve 17-18 questions. Difficulty level was 3.4
out of 5. 5 being the highest difficulty level.
Section C :- You are given the data of reported and manager. There is a company which wants to
reduce the hierarchy level. To do the same, the manager who has only one reportee , the manager will
be moved to another department and that single reportee will be moved under the manager of
reportee’s manager.
Ex
Reportee Manager
A B
B C
D C
In the example above since B has only one reportee A, then B will be moved to another department
and A’s reporting will be moved under C.
Round 3: Started with the discussion why do you want to join DE shaw. Since prior to my current
company, I was working with a finance based company so they asked why do you want to come back
to finance base company.So they asked my about debentures, bonds, mortgages and other financial
jargons.
Algorithm based questions :
1.) How will you find 3 numbers in an array which sum to a given number
2.) You are given in and out time of trains, how many minimum number of tracks are required.
Discussion about my projects.
Internal fragmentation v/s external fragmentation.
Write a SQL query to find employee with third highest salary, without using TOP or inner query.
Another query to find the department which has maximum number of employees.
Discussion of Abstract classes V/s Interfaces and why multiple inheritance cann’t be done in Java but
can be done in c++.
Can a main function return Boolean rather than an int in main function.
What makes Java platform independent.
Round 4: I am not sure whether it was HR or another F2F, may be it was their call depending on a
particular candidate.
Though I would like to add a few questions which other candidates were asked like how will you
divide a triangle into equal area triangles. What are register variables . Keep a track of minimum
element in a stack.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/d-e-shaw-interview-set-6-campus/
Intuit Interview | Set 4 (For SSE)
I recently cleared Intuit Interview. It was a life changing experience and I am very happy to crack the
interview for SSE.
Round 1:
Java basics:
1. int v=2
v += v++
what is output of V?
2. Design a compiler for throw and throws key words. OR, how does compiler interpret those
keywords.
3. Why string is immutable and then some tricky questions on that .
4. Algorithms:
a. sorting of 0 and 1 in place in n time.
b. stack option problem with maximum profit in O(n) complexity
Round 2:
Algorithm 1: Write a code to max sub array by considering elements not next to each other
Algorithm 2: design a dice face such that one normal dice is played with the designed dice then the
ouput of any value should have same probability.
Some logical puzzle.
Round 3:
Lot of OS questions and distributed system generic questions
How to decide which DB to use in application
Some design pattern
Difference between Design pattern and framework
My projects related questions and challenges
Logical puzzle
REST Framework questions.
Round 4:
1. Program to sort handle 1GB data in a 64KB RAM.
2. How to handle caching in distributed environment
3. Challenges in my current project
4. Logical puzzle (sorry dont remeber now).
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/intuit-interview-set-4-sse/
1st round: Technical questions were from all core subjects including 5 to 7 quantitative aptitude
questions. (30 questions : 30 Minute) (cutoff may be : 25+).
2nd round :
1. Space and time complexity to “Detecting a Loop in a Singly Linked List ” .
2. Executable Code to Detect a Loop in a Singly Linked List without any mistake in first time with all
boundry cases if any.
3. As I’ve implemented Floyd’s cycle finding algorithm he asked me to drive a mathematical
expresson in terms of variable why this algorithm works .
3rd round :
1. what is microprocessor ?
2. what is microcontroller ?
3. what is the difference between microprocessor and microcontroler ?
give an example for each and what is intel i7 ?
4. difference between functional and oo approach of problem solving .
why oops is best.
5. The Three Door Puzzle.
6. Program to convert a given number into words
(ex: input -197 ; output : ONE HUNDRED NINETY SEVEN).
4th round :
1. Generate all circular prime numbers from 1 to 10,000 .
( A number is called circular prime if all the numbers formed by using the digits of that number are
prime .
ex: 17-71, 13->31 , ….)
— > First he told me to write it on paper As I did It in 5 minute he told me to write the code on an
online compiler as it is.
5th round : HR
Simple HR questions were asked (kind of formality).
At last but not least something I would like to tell you geeks :
– The most important thing you should have within you is Confidance.
Everybody says yes I am confident but I think not really .
– The second thing is dont bluff in anything what you dont know .
-” BE YOURSELF. ”
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/interview-experience-service-now-hyderabad/
1. Comment removal
Given a piece of code, the task was to remove all the comments from the code.
Eg. Input
int main(){
// this is a comment
int i = 1;
/*
some more
comments
*/
cout<<i;
cout<<endl; // this is for new line
return 0;
// last one
}
Output:
int main(){
int i = 1;
cout<<i;
cout<<endl;
return 0;
}
PS : take special care of corner cases, how to deal with string properly.
2. JSON matching
Given two JSON objects, find the values of fields. whose values are different.
Eg. Input
{"Geeks":"Test1","Are":"hey","Cool":"yeah"}
{"Geeks":"Test1","Are":"20","Cool":['B','C']}
Output:
Are:Cool
PS : take special care of input and output format.
The questions were easy but the main task was to read the input correctly and string parsing related
stuff.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/browserstack-written-round-experience/
2. 1st technical rounds: Be strong in dbms you can clear this easily and strong in your projects
3. 2nd technical round: slighly difficult than 1st one… if you are strong in basics.. you can clear it
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/zoomrx-campus-interview-experience/
4. English – 10 questions
Duration was 75 min and 53 members were selected for next round among 200 aspirants.
First Round:
Interviewer introduced himself and asked me the question “Why Oracle?”
He then read my resume and asked me about the projects that I have done and about the things in my
resume. Then he asked me to explain algorithm of the project that I’m going to do in the upcoming
semester and asked me code it.
He asked me what my favorite subject was. I replied that it was Data Structures. He asked me few
simple questions from DS like:
1. Implement queue using linked lists
2. Reverse a string
3. Find the number of palindromes in a big string.
Finally he asked me the following puzzle
He drew this diagram:
Engine is of length 12m. A and B are 2 bogies of 10m length each. Engine can turn only in obtuse
angles but not in acute angle. For example Engine can turn as FEH but not as FEA. Now, the task is
that I have to exchange the positions of A and B with the help of Engine and the engine should remain
at the same place.
I tried for 15 minutes but couldn’t solve this problem.
Second Round:
The interviewer went straight into questions. This is the toughest and longest round. I am posed with
the following questions:
1. Explain interfaces in Java
2. What is overloading and what is overriding. Explain each with example
3. What are abstract classes in Java and what is the difference between an abstract class and an
interface.
4. Find the fifth largest element in a linked list
5. Find the common ancestor of two given nodes in a tree
6. Explain heap sort
7. Find the duplicates in an array
8. An array of elements were given. You have to insert them into BST, Max Heap, B Tree
9. Merge two sorted linked lists
10. Explain three normalizations with example
11. Two SQL queries:
1. Find the maximum salary in emp table
2. Find the name and department of the employee with highest salary
12. Difference between semaphore and mutex
13. PUZZLE: There are 25 horses and only 5 horses can be raced at a time and the top 3 are
announced in each such race. What is the minimum number of races required to find the top 3 among
25 horses
14. How is undo operation (ctrl + z) implemented internally?
15. Explain 8 queens algorithm
16. What is time complexity of 8 queens algorithm
I haven’t answered 12, 13 and 16 questions.
Third Round:
In this round I am asked both technical and HR questions.
1. Tell me about yourself
2. Explain your project
3. What is your favorite program and why is it so.
4. Write code for Towers of Hanoi problem
5. What are ER diagrams for?
6. Draw ER diagram for leave application of an employee in a department
I am not that good at DBMS. So I failed to answer the last two questions. I told him that I have more
than 8 months of time before getting into Oracle and would concentrate on DBMS. He was impressed
with my answers for other questions.
Then there was another round. In that round I am asked questions like “Is Hyderabad ok for you as
work location?”, “What’s your email ID?” and then she explained me employee on boarding process.
Finally I am one among the 6 who got selected . Data Structures and Algorithms are the key subjects
that helped me get this job. I should thank GeeksforGeeks a lot for helping me very much in my
preparation.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/oracle-interview-set-9-campus-application-development-profile/
Amazon interview Experience | Set 130
(For SDET 1)
I attended an interview with Amazon for SDET-I position, about a month back. I did not clear the
interview, but I would like thank GeeksforGeeks for the great learning period before the interview.
GeeksforGeeks helped a real lot in my interview preparation and in general, my understanding of data
structures and algorithms got deeper and stronger. Thank you very much GeeksforGeeks and all your
valuable contributors!
Telephonic 1:
1. Given an array and a number, check whether there are any 3 elements in the array which add up to
the given number.
For example:
Given an array {1,2,3,4,5} and the number 9, return true, as 2,3,4 add up to 9.
Given an array {1,2,3,4,5} and the number 3, return false, as there are no 3 elements which add up
to 3, in the array.
2. Given a number, find the nearest perfect square(modified binary search)
For example:
Given 50, return 49
Given 25, return 25
Telephonic 2:
1. Write a method to check whether two binary trees are mirrors of each other
http://www.geeksforgeeks.org/foldable-binary-trees/
F2F 1:
1. Fill an array with the next greater elements (using stack)
http://www.geeksforgeeks.org/next-greater-element/
2. Given a binary tree, count the number of occurrences where there are two nodes with the same
horizontal distance. To make it clearer, if we assume each node in a cell of a matrix, then count the
number of occurrences when there is a collision of two nodes in the same cell.
Here the count is 1 because 5 and 6 occupy the same cell in the matrix
F2F 2:
1. Given a linked list, write a program to check if it is a palindrome
2. Write some test methods for stress testing of Furniture class
3. Some discussion on automation testing
Hiring Manager:
1. Discussion about my current job role
2. Several behavioral and team fit questions
3. What are the things you will consider (both from Developer’s perspective and User perspective)
while trying to develop an application for computer aided competitive examinations like CAT, GMAT
etc.
Bar Raiser:
1. Given a singly linked list, write a recursive method to reverse every 3 nodes in the list.
I did not write a clean code for this. He moved on because of lack of time.
2. Again discussion of my current job role and about the projects I have worked on.
3. Tell me 3 things that you want to learn/change in yourself
4. Again several team fit questions.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-130-sdet-1/
Aricent Group Chennai Interview
Experience
Aricent is a telecom(network) based company.
2. Technical interview … questions from networks, datastructures, os, dbms and ooad and also
wireless networks.
for eg… what is the difference between vlr and hlr?
the interview duration went off for 45 minutes.
3. HR interview: I was very comfortable with the HR. They also asked me to speak about a topic for
about 2 minutes, the topic is of your choice.. And some question is about the company and why
aricent… etc
The total selection process was very long.. i came to college morning 8 clock and went to home at
11pm.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/aricent-group-chennai-interview-experience/
F2F 1:
1. Given an array of integers
you have to output sequence a1,a2,a3,a4,a5,a6,a7 such that a1a3a5a7
For example:
Given 10,20,30,40,50,60,70
You have to print 10, 30, 20, 50, 40, 70, 60
At first, I gave answer using sorting. But my interviewer asked me to do this without sorting the input
array, and I did it.
2. A simple question on Tree data structure which i don’t remember.
3. Questions related to my project.
F2F 2:
1. A matrix is given which is sorted row wise and column wise
You have to print the sorted order.
For example:
Given
123468
233478
234578
234588
344689
455789
You have to print sorted order
2. Questions related to my project during my internship.
F2F 3:
1.What happens when we type amazon.com
Relating to this the interviewer asked me every step in detail including all 7 layers of networks.
Protocols like: HTTP, HTTPS, DHCP, DNS, IMAP, POP, TCP, UDP etc. Their uses and differences.
2. Describe ACID property of a transaction (DBMS).
Bar Raiser(Telephonic):
1. Given a singly linked list, write a recursive method to reverse every 3 nodes in the list.
He asked me to inform if I have seen the question.
And I replied : Yes sir, it is the similar question I faced in coding round of Amazon-internship last
year.
But he didn’t changed the question.
I solved it with a silly mistake which i corrected when mentioned.
2. Long discussion on my internship and about the projects I have worked on.
3. Tell about your criticism.
4. 3 weaknesses currently i am working.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-131-sdet-1/
Amazon interview Experience | Set 132
(For SDE Intern)
Online Round :(Duration – 90 minutes)
Q1– Given an array of numbers, arrange them in an alternate fashion such that every number is
followed by a number of opposite sign. Also the order was to be maintained. If the count of negative
numbers is more keep the extra at last in array and same for positive numbers.
Example :
Input: -3 -2 6 0 7 -1 -8
Output: -3 6 -2 0 -1 7 -8
Introduce Yourself.
Q1– Design a shuffle function which would play songs randomly in your device (unique song_id)
and code it.
After i gave him a solution with hash function , he asked me to improve the algorithm such that once a
song is played it should be played only when all the other songs are played,
Solution’s Complexity : Space – O(n) , Time – O(1) ; n—> number of songs
After that he asked me to improve my solution and do it without using extra space.
Solution’s Complexity : Space – O(1) , Time – O(n) ; n—>number of songs
Hint : Maintain indices and once a song is played shift it in range of played songs index.
After that i was asked about each part of the hash function and how i came up with that.
Input : 1->2->3->4->NULL
8->2->NULL
Output : 1->3->1->6->NULL
First he asked to do it without recursion and then with recursion.We also talked about the problem
we face if we store the value of the linked list in an integer or long if the number of digits were above
certain limits in the non-recursive function.
Introduce Yourself.
Q1 – Find the largest subtree which is binary search tree in a given Binary Tree. Then to optimise
it and then asked me to code it.
Q2 – Given a linked list with a next pointer and an arbitrary pointer pointing to any node in the list ,
copy the linked list.
After i gave him a solution which changed the links of the initial linked list, he asked me to do without
changing the links.
So i gave him a O(n^2) solution . He asked me to give another way or optimise my solution.He helped
me to figure out the solution.
The interviewers were really helping and supporting and were more interested in seeing the efforts
you make and the way you get to the logic.They help throughout by giving hints.
Best of luck .
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-132-for-sde-intern/
Aricent Interview | Set 4 (On-Campus)
There were 3 rounds consisting of Written, Technical Interview and HR round.
Written Round:
Aricent organized an online written test via amcat(aspiringminds). The questions were very easy.
There were total 5 sections.
Section 1:
Questions on computer fundamentals were there. It comprised of questions from os, dbms, c etc. for
example paging, referential integrity, output based on pseudo codes. Finding the distance moved by
disk head in CSCAN algorithm in processing some requests. Brush up your basic concepts no need to
go into details.
Section 2:
This was based on Quantitative aptitude. There were questions based on profit and loss like given SP
and profit find CP, averages, HCF LCM, finding unit digits etc. This was an easy section just be
through with all the formulas. But don’t spend too much time on one question otherwise you are gonna
miss some questions.
Section 3:
This section was to test your English. Few questions asked the synonyms and antonyms of a given
word. There were questions with fill in the blanks and you need to select the correct option, questions
where some part was italicized and you need to replace it with some other phrase preserving the
meaning of the word. Comprehensions were given and you need to give the answers.
Section 4:
This was based on logical ability. Questions were based on data sufficiency, blood relations, coding
and decoding, direction test, linear arrangement, clocks. This section was easier than aptitude one.
Section 5:
This was based on programming. Pseudocode based questions were there. Output finding, Stacks,
queues based questions were also there. Clear all programming and ds concepts. No language
specific questions appeared.
This time there was no GD and Critical Incidence Form filling. There was some other form HR asked
us to paste a passport size photograph, personal details, educational details, achievements/honors (if
any), whether any problem with bond and job location preference, family member details, whether
had any criminal history or not. This form was to be submitted with a copy of resume and copies of
mark sheets graduation, school etc.
Technical Interview:
He first asked me to introduce myself. Then he asked me to declare a static variable, a global
variable and local variable. Then he asked their usage, memory storage, scope, lifetime etc. He asked
me the difference between declaration and definition. Then he asked me to write a statement for
allocating 40 bytes to an integer. I wrote it using malloc. Then he asked me to deallocate it. I write it
using free(). He asked when you allocated memory you specified the size but when you deallocated it
you didn’t mentioned the size, how come compiler able to deallocate only 40 bytes.
He then asked me to write a code for inserting a node at the end of a linked list where I am provided
only with head pointer and handling all the cases. He also asked me to delete a given node from the
same list. I did it in two scans. He said can you know how can you do it in only one scan, I said yes
then he moved on.
He said an array is given containing only 0’s and 1’s in random order, you have to sort it. I knew this
question so I said that I know this one. Then he moved on. He asked me how to check if there is a
loop in a linked list. I knew this one too so he moved on. He then asked me that given two lists you
have to merge them in a sorted order and asked me only the complexity. Then he asked me are you
comfortable with networks, I said no. So he moved on to DBMS. He said have you used any tables in
DBMS. I mentioned him about my project so he asked me which tables I used there and what all
attributes were there. He was asking questions from my project. He asked me that any other project I
have done, besides websites.Then I told him. Then he asked questions about nfas dfa etc. He then
asked me to give a real world example of nfa.
HR interview:
She started with asking me to introduce myself. Then she asked me do you like to work on a specific
technology, mobile applications and all. Then she asked me about my project which I explained to her
from the scratch by giving examples. Then she asked me about whether I am comfortable in testing, I
said yes I am comfortable with both testing and developing but I like to do coding. In the end she
asked me if I have any problem with the bond and about job locations. That was it.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/aricent-interview-set-4-campus/
BrowserStack Placement Paper
PROFILE: SOFTWARE ENGINEER
PAPER DURATION: 3 hours
NO. OF QUESTIONS: 2 (20 marks each)
MAXIMUM MARKS: 20*2 = 40 marks
QUESTION 1:
JSON Prettier:-
Write a program which takes JSON as input and gives prettified JSON
1. You need to read JSON from STDIN. Input gives one line of uglified JSON.
2. Output should be formatted JSON. Check the standard output link.
3. Use 2 white spaces (not‘\t’) for one indentation.
SAMPLE INPUT:
SAMPLE OUTPUT:
“group” : {
List : [1,2,3]
},
“list” : [“a”,”b”,”c”]
EXPLANATION: Input will be uglifiedjson in one line and output will be prettified format of that.
QUESTION 2:
Evaluate an expression given in XML format. Keys will be Expr- contains the entire expression. Elem
– contains the digit, sum, Prod- contains two or more keys whose evaluation needs to be summed or
multiplied respectively. Sub will contain 2 keys or more, where the second key onwards will have to
be subtracted from the first one. Div- will contain 2 keys in which first key will need to be divided by
second.
SAMPLE INPUT:
<expr>
<sum>
<elem>4</elem>
<elem>6</elem>
<elem>7</elem>
<elem>3</elem>
</sum>
</expr>
SAMPLE OUTPUT:
20
EXPLANATION:
Input will be xml file through standard input. End of xml file marked by </expr>.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/browserstack-placement-paper/
[TopTalent.in] Exclusive Interview with
Arushi Who Got Into Flipkart
It’s not easy getting into one of the hottest companies in India. As company is growing at a crazy pace,
Flipkart always looks for best talent out there to keep up with their growth. Arushi could crack it and
in her own words, ‘ When I got placed at Flipkart it was hard to believe. Took almost a day to sink
in’. We at TopTalent.in spoke to Arushi from BITS-Goa about her Flipkart experience and what are
her suggestions for aspirants looking to achieve something similar.
TopTalent: What job offers did you have get apart from Flipkart?
Apart from Flipkart.com I had an offer from Housing.com – A mumbai based start up.
When I got placed at housing it was hard to believe. Took almost a day to sink in. Getting placed at
Flipkart was a similar experience. Felt good that I had offers from 2 such awesome companies.
Choosing Flipkart was but natural having worked there for a year as an intern. Also Flipkart is neither
a fully fledged multinational nor a start up any more. This presents a perfect learning opportunity
I actually had two internships with Flipkart, for 6 months each. I was pretty raw when I first came.
But all the people were pretty patient and their main aim was to teach me. Getting the work completed
actually was at a lower priority. The second internship was better. It was a very open ended and fuzzy
problem which involved quite new technology. I was given complete freedom to explore solutions
and solve the given problem in the best possible way. It was a very different experience and
definitely helped me grow a lot. All the engineers, no matter how busy will always have time to listen
and give suggestions regarding any technical problem you go to them with.
TopTalent: What kind of skills do you think helped you in getting this job?
I think apart from the technical knowledge being a fast learner and persistence is important. Also a
very important thing seen in Flipkart is the sense of ownership everyone has. No matter what
designation a person is at.
TopTalent: What’s your advice to students who are aspiring for similar kind of achievement?
The usual technical knowledge and knack for problem solving. The interview at Housing was pretty
straightforward. It was mostly based on the work done in Flipkart. And a few puzzle solving.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/toptalent-exclusive-interview-arushi-got-flipkart/
Intuit Interview | Set 5 (On-Campus for
Internship)
Intuit visited our campus for summer internship for positions of Software developer and Software
Quality Engineering. I was among the 5 people to be selected for the internship. The details of the
process are as follows:
Written Round:
This was a written round. Proper code with correct syntax to be written on paper.
There were 4 questions to be solved in 1 hour. Some questions needed test cases and time complexity
to be answered as well.
1) Binary numbers are given as linked lists. Add and store result in linked list.
2) A number starting from 1 can be got by either multiplying 3 or adding 5 to it. Given a number, find
the sequence of operations to get it or say it’s not possible.
Eg: 13 = 1 * 3 + 5 + 5, 15 ; Not possible
3) Given an input array on integers. Output an array of same length such that the value at ith position
of output array is the product of all numbers in input array except that at ith position.
Eg: Input: 3, 5, 7 Output: 35, 21, 15
4) Sort a stack in ascending order using another stack.
Design Round:
This was NOT an elimination round.
It was a problem solving team exercise to understand their way of working.
The interviewers were making notes though during the exercise, don’t know if it affected our
selection.
Thank you!
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/intuit-interview-set-5-campus-internship/
Adobe Interview | Set 15 (For MTS-1)
Recently I got the oppportunity to be interviewed for the position of MTS-1 at Adobe. Here is my
Interview Experience:
Written Round:
Part A (50 mins):
45 questions based on logical reasoning, DI, quant and geometry. The questions were easy but the real
issue was time in this round.
F2F Round 1:
a) I was asked to allocate a 2D array dynamically. I did that. I was then asked to free the allocated
memory.
b)Implement an averaging filter assuming a fixed window size on an image. Entire code was
required.( We can ignore the border cases). I first did it using a brute force approach. The interviewer
then asked me to optimise it. I did it using extra space to store the sum of elements in a fixed window
size so that we do not have to compute it for each pixel of the image
c) He told me that for a very large image (2D matrix) the row major traversal is better than coloumn
major traversal. Why?
Entire array cannot fit into main memory at same time. Rows are contigously allocated. Therefore
benifits from locality of reference.
F2F Round 2:
a)Implement queues using linked list. Entire working code with all corner cases was required.
The interviewer was impressed as I had handled all the test cases properly.
b)Most optimal code to calculate the number of set bits in an integer. (i.e. O(no of set bits))
c)Difference between process and threads, multiprogramming and multithreading, multithreading and
multitasking.
c)Consider there are 9 balls. One ball is defective (might be heavy or light). Find the defective ball in
maximum 3 weighings.
I went into the wrong direction as I thought that I had done this before. But he gave me one or two
hints and based on that I was able to come to correct answer.
F2F Round 3:
a)There are 2 people A and B. Both A and B have equal speed of walking. Both A and B have equal
speed of running. Now assume that A runs for half the time and walks for half the time. While, B runs
for half the distance and walks for half the distance. Can we tell conclusively who will win in a race?
b)There are two arrays. One contains n digits and the other n-1 digits. How to find the missing digit in
the second array?
I asked the interviewer if I can assume that the elements are unique. He said yes. Then I solved it
using XOR method. He asked what if the nos are negative or fration. I said that as two negative
numbers or 2 decimal numbers will be stored in the same way in memory therefore XOR will work
for that cases as well.
d)Find whether the number ‘n’ is a palindrome or not. He wanted the best optimal solution with all
special cases.
Finally after a lot of hints I was able to bring it down to O(1) space complexity and O(log(n/2)) time
complexity. He was pretty satisfied !
It was an amazing experience as the interviewers were very friendly and made me feel at ease. I
would like to thank GeeksForGeeks team for creating such a wonderful portal which helped me a lot
in my interview preparations.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-set-15-mts-1/
Amazon interview Experience | Set 133
Recently had a interview with Amazon, through employee referral. All face to face rounds. I didn’t
clear, so no offer.
Given an integer, find the next biggest integer whose digits are in increasing order.
Example:
Input: 118
Output: 123
Input: 127
Output: 234
Input: 987
Output: 1234
After two rounds asked to leave. I guess I didn’t answer as per standards.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-133/
Attempt 1
Round1:
1. Given a number N, find the number of correct combination of parentheses possible.
2. Print all root to leaf paths using iterative algorithm in linear time.
Round 2:
1. Given ‘m’ and ‘n’ (m < n), print all nodes between levels ‘m’ and ‘n’ in level order.
2. Print a matrix in spiral order.
Round 3:
1. Check if two trees are mirror images of each other.
2. Given inorder and preorder traversals, build a binary search tree.
3. Print all the boundary nodes of a given binary tree.
I was rejected after this round. I applied again after few months.
Attempt 2
F2F – Round 1:
1. Given a singly linked list and a value ‘k’ such that kF2F – Round 2:
1. Given a BST and given that 2 nodes are swapped in the tree. Identify the 2 swapped nodes.
2. Given a BST and 2 nodes. Identify the length between the two nodes of the tree.
F2F – Round 3:
1. Detailed discussion of current projects.
2. How would you design the meeting invite feature of Microsoft Outlook? Considering each meeting
invite as an object and that Web server is the storage space for the invites, design a data structure to
receive and send invites to user in an efficient manner. The message objects must be received in a
sorted manner based on the time of meeting. I gave an O(NlogN) solution and he was pretty
impressed. I was then asked to code it.
3. An array is given whose every ith index is the child node of a[i] as shown in the example below.
The root node is represented by -1. Find the height of the tree.I did it in linear time.
Input: parent[] = {1 2 -1 2}
Output: 4
The given array represents following Binary Tree
2
/ \
1 3
/
0
F2F – Round 4:
1. Cultural info and projects discussion. What errors have you performed in your career path? What
are the major challenges that you faced?…and other such questions.
2. Design a parking lot system. She was very much concerned with all the edge cases.
3. How would detect whether a singly linked list is a palindrome or not?I gave a solution with O(n)
time and space complexity. But she asked to optimize it further with O(1) space complexity.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-134-campus-sde/
Nagarro Interview Experience | Set 2
First Round:
1.Aptitude Questions, basically logical aptitude, Not the standard aptitude questions which we get in
other companies, it included some questions of geometry, trigonometry, and puzzle type questions,
analytical ability,
Question were like – find the measure of an angle in the figure, solve the trigonometric equation, data
interpretation-a data table was given and based on that table question were given, find the sum of a
given series, arrange in descending order -sruds ka, etc..Paper was not so easy
Second Round:
Technical ability test: questions on basic C language, like predict the output, find error, then puzzle
type question of queues and stacks, then write level order traversal after insertion in a heap, dry run
of bubble sort and quicksort, and some very basic question like no of nodes in binary tree and all…
Overall this round was very easy.:):):)
Third Round:
Coding Round: Three questions
1. You’re given a m x m matrix. Write a function to rotate submatrix within the matrix by 90degree
clock wise. Function takes x and y as starting row and column coordinate of matrix and N as size of
submatrix as argument. Inplace rotation was required. I gave brute force I.e. With extra memory.
2. You are given a sorted array containing both negative and positive values. Resort the array taking
absolute value of negative numbers. Your complexity should be O(n)
Ex. A = {-8,-5,-3,-1,3,6,9}
Output: {-1,-3,3,-5,6,-8,9}
for eg{1,2,3,4,2}->{1,2,3}&&{4,2}
{1,1,3,3,2,8}->{1,3,3,2}&&{1,8}
{1,3,4,7}->no subset
Fourth Round:
He started with tell me something about urself. Meanwhile he was going through my coding paper.
Then he said lets dry run the first program.. We started, then he was confused in my program, I said
should I explain it to u?? He said let me see it.. Then he startedd asking why this variable, can I use
anything else.. Finally, he was done with my first code,. Code was correct. Then he came to second
code and again he said lets dry run it.. I used mergsort sort merging technique, so he said ok explain
me this, and again why this variable, and can u do any thing else other than this and so on.. Maine
third code m kuch nhi likha tha, so he asked the reason. Maine kaha ki mai sol tak nhi pahuch paya tha,
toh usne kaha tell me jitna socha tha, then I told him jo maine socha tha.. Then he asked, ki is problem
k baare m fir socha ya nhi free time m, I said yes, he said so how it is solved then, I said dynamic
programming. He asked nothing..
He gave me a extra question- Given a text string and a sample string. Find if the characters of the
sample string is in the same order in the text string.. Give a simple algo..
I gave him few solution.. He was done with my interview, and he was happy with my solution.
Fifth Round: HR Round:
Tell me about ur strength and weakness.. PS: Try to give ur weakness such that it is counted as
strength… My strength : Hard Working and dedicated to work. My Weakness : Relationship,
relationship is the first priority before any work.. Give me incident when u ranked relationship above
any other work.
What do u know about Nagarro? PS:For this question just concentrate in the company ppt.. That will
be sufficient Basically Jo ek do line Maine ppt m suni Thi use hi bol Diya Tha Maine..
Kuch lines aur jaise Ki there is small DUCS family there in nagarro, alumni batate hai ki there is time
flexibility and a very good working environment…… Outings…. Festivals… Freshers party….
Headquarters… Etc….
Which area of the computer Science u liked most during this course of MCA? I said programming ,
data structure, Algorithm i liked the most
Which kind of programming u do, i told him him i usually do contests in codechef, geeksforgeeks
questions, and off course the curriculum assignments…
Tell me in which language u r comfortable for programming, I told him JAVA. then he said why not C.
I said, basically i also work in C but prefer java. But when language is not specified in assign, i
prefer only Java. Then i asked , which language is used in company. She said Java, C plus plus,
.net… Then i asked, which language will i get, she said it is decided after training. Are u comfortable
in working outside your city, i said yes.. Do you have passport, i said No, she said apply as soon as
possible.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/nagarro-interview-experience-set-2/
BrowserStack Written Test | Set 3
Following is the written round questions for BrowserStack on campus.
Sample Input: 9
Sample Output: 27
Sample Input:
5
aaaaaannndnnnnnnfffhfhhgjjjwkkkllclc
a.
n+
a*
an.
a.d.
Sample Output:
5
3
2
1
0
Explanation:
Input:
First Line: Number of sample test case (N)
Second Line: String
Next all will contain the RegEx.
The string will not contain the special characters that have already been mentioned. The pattern may
contain parenthesis, in which case the special symbol has to apply on all the characters inside the
parenthesis.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/browserstack-written-test-3/
1. We have to implement getIntComplement() function , that will give complement of an given integer
.
2. There are “n” ticket windows in the railway station. ith window has ai tickets available. Price of a
ticket is equal to the number of tickets remaining in that window at that time. When “m” tickets have
been sold, what’s the maximum amount of money the railway station can earn?
exa. n=2, m=4
in 2 window available tickets are : 2 , 5
from 2nd wicket sold 4 tickets so 5+4+3+2=14.
3. There is a particular sequence only uses the numbers 1, 2, 3, 4 and no two adjacent numbers are the
same.
Write a program that given n1 1s, n2 2s, n3 3s, n4 4s will output the number of such sequences using
all these numbers.
Output your answer modulo 1000000007 (10^9 + 7).
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/linkedin-online-coding-questions-campus-placement/
2. You have to find a string in two-dimensional array. The input contains 2-D array of characters and
given string. You can move in one of eight directions . The output contains location of first letter of
string if string found completely, otherwise return -1. Any one out of multiple answers is accepted, if
possible.
For example, Input:
btg
pad
r kj
String: rat
Output: (2,0)
F2F Round 1:
Brief introduction about myself and my project.
1. Given an array of positive and negative integers, rearrange positive and negative numbers in 0(n)
time .
First, I solved it using 2 arrays,each for positive and negative integers and place elements of array in
these 2 arrays and them combine them back by taking one element from each array. Then he told me to
do without extra space. I then segregated positive and negative elements using quicksort .Below is the
link:
http://www.geeksforgeeks.org/rearrange-positive-and-negative-numbers-publish/
2. Program to check whether strings are rotation of each other or not. I approached as below:
http://www.geeksforgeeks.org/a-program-to-check-if-strings-are-rotations-of-each-other-or-not/
He then told to solve without using strstr. I used naive searching method.
F2F Round 2 :
Brief introduction and some behavioral questions.
Given a BST and a key sum, design an algorithm to find all pairs of integers whose sum equal to key.
I first approached using an array and placing elements into it in inorder fashion and then find pairs.
He told to do in-place and I solved with 2 traversals (inorder and reverse- inorder ) .
F2F Round 3 :
Based on CS Fundamentals and also had 15 minutes discussion on my internship project.
1. What happens when we type amazon.com ?
2. Describe transaction process in detail if we want to transfer from one account to other. Also design
schema for it.
3. What happens on server side on receiving HTTP requests and how operating system interacts and
then discussion related with threading, thread pool ,synchronization, hashing etc.
4. Describe ACID properties in detail .
Given min_sum =8
1
2 3
4 5 6 7
So we delete 4.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-135-campus-sde/
BrowserStack On-Campus Placement
Questions
Online coding 3hrs
2 questions
20 marks each.
Problem 1:
Write a program which takes JSON as input and gives prettified JSON
a) You need to read JSON from STDIN. Input gives one line of uglified JSON.
b) Output should be formatted JSON.
Given two JSON objects, find the values of fields. whose values are different.
Eg. Input
{“Geeks”:”Test1″,”Are”:”hey”,”Cool”:”yeah”}
{“Geeks”:”Test1″,”Are”:”20″,”Cool”: [‘B’,’C’] }
Ans: Are:Cool
Answer shud be in above format ..
Problem 2:
Given a string and a Regular Expression pattern, give the number of the times the pattern occurs in the
string. RegEx symbols mean as follows:
. – 2 occurrences of the previous character, + – 4 occurrences of previous character, * – more than 5
occurrences of the previous character
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/browserstack-oncampus-placement-questions/
Round 1(a): Written test consisted of quant and logical aptitude questions (geometry, trigonometry,
pie chart etc). The questions were ranging from easy to average. What really matters in this round is
your speed to solve the questions. Very few people were able to solve all the questions. It had
negative marking too. Practice from RS Aggarwal.
Round 1(b): C-programming MCQ questions, though most questions were easy, there were few tricky
ones as well, macro, pointers, inbuilt functions, errors etc.
Then, there were coding test, followed by technical interview and HR interview.
1. Check if binary conversion of given number is palindrome or not. Ex: 6 (0110) is palindrome.
I used a recursive function for binary conversion and then check for palindrome using a loop. Refrain
from using inbuilt functions as they wanna check your logic. O(n) time complexity.
2. Separate 0’s and 1’s in that order from a array of only 0’s and 1’s.
I used partition algorithm (Quick Sort) to do the same. O(n) time complexity.
3. One Sentence (string) is given. find out the words, that has length even and greater than equal to 4
(e.g. 4,6,8.. etc.) and separate them with space.
e.g. Given String : “abcd abc abcde abcdef”
Output: “ab cd abc abcde abc def”
I allocated a new string dynamically, and used two for loops to copy one string to another, adding a
space at the middle of the word where word length was >=4 and even. O(n^2) time complexity.
It seems easy but it isn’t. I got to know that this can be minimized to O(n) time complexity in the next
round.
Round 4: HR interview:
This is a formality. You won’t be rejected unless you make a blunder during the interview. The
interviewer will mark you on various skills which you filled in the form before the 2nd round and
check that you filled the form seriously or not.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/nagarro-interview-experience-set-3-campus/
Amazon interview Experience | Set 136
(For SDE-T)
Phonic Interview
**********************
1. Let’s start with you introduction
In between introduction he asked me about my some project work experience and How have you
done?
2. Take a integer as a input and replace all the ‘0’ with ‘5’.
For example:
102 - 152
1020 - 1525
(Do not use any array for replacing the '0' to '5')
3. You are given two binary tree and write algorithm to check
Are two Binary Trees mirror image of each other?
1st Round
************
1. Project Detail & past experience
3. http://www.geeksforgeeks.org/intersection-of-two-sorted-linked-lists/
2nd Round
**************
This round was purely for checking Test Framework and Test Case Knowledge.
He has given me some scenario and ask to write test cases for them
1. you are given a web page into that simply one browse button and Image Holder is their.Write the
Test Cases for this.
2. You are given application like Google Analytics. How will you test this application ?
3. what are the basic features you will add into your own test framework.
3rd Round
*************
This round was purely a discussion based on past project experience.Like which project do you think
that was most difficult and you had a nice experience.
He asked me each progress point of the project.
1. how will you check that each page of amazon.com is having its logo or not.he also asked me to
write code for this also.
4. what happen between, when you enter a URL into a browser address bar and hit enter to actually
page gets loaded ?
In between he asked me few things about DNS Server,Router etc and some discussion was there.
4th Round
*************
1. http://www.geeksforgeeks.org/level-order-tree-traversal/
2. http://www.geeksforgeeks.org/reverse-level-order-traversal/
4. Some Project Experience & Automation Framework Discussion,which i have worked on.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-136-sde-t/
Axtria Interview Experience
Hello everyone! Axtria Inc. came to our campus for full time hiring of final year students. They had
shortlisted candidates for the interviews on the basis of online test which consisted of MCQs.The test
was divided into six sections of which the very first section was personality calculator which
consisted of 60 questions regarding the perceptions and thoughts of people about different things.
Only 10 minutes were given to us for it and rest 80 minutes were given for the other five sections
which consisted of Quantitative, Logical, Verbal and Technical questions. The paper was quite
lengthy, therefore one is required to have fast reading, interpretation and calculations skills.
54 students were shortlisted for further rounds.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/axtria-interview-experience/
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/cisco-interview-experience-set-8on-campus/
Expedia Interview Experience | Set 5 (On-
Campus)
Hello everyone! Expedia came to our campus for full time hiring of final year students. They had
shortlisted candidates for the interviews by taking an online test comprised of four sections
(Quantitative, C, Logical and English). Every section had a timer attached to it, so you need to think
and answer quickly. Although, the questions were easy but cutoff was quite high.
1. Apply MFU (Most Frequently Used) pages technique and count number of leaks (Given frame size
and order of frames).
2. Insertion in a sorted circular linked list.
We were given only 1 hr to code these questions. After that 35 students were shortlisted for face to
face interviews
2. You have an array of integers of size N. You have to find the sum closest to zero for any pair in that
array. The array is unsorted.
He then navigated on to my Codechef profile and asked a question that I did in the June14 Long
Contest. I explained him and he was satisfied (You should be prepared to answer each and everything
mentioned or referenced in your resume).
HR Round (F/F)-1 hr
When I entered the room, there were two people sitting inside the room. One of which asked my
introduction. The other then intervened and asked me to name any five Operating Systems. After that,
they both started questioning about the different scenarios and in between they asked me many
traditional questions like why should we hire you?, strengths and weaknesses ,why Expedia?, your
priorities etc. This all continued for about 1hr and asked me to wait for the result.
Result came after 2 hrs, my name was not there.
Note: The whole process is quite lengthy and one needs to have a sound sleep before interview.
Moreover, you need to be more than technical in order to crack Expedia.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/expedia-interview-experience-set-5-campus/
Flipkart Interview | Set 15 (For SDE-II)
1st round (machine coding)
You are given a catalog of books, which have following attributes.
Name
Author
Publisher
Publish year
Category
Price
Count (sold)
Implement following APIs on top of this catalog
addBookToCatalog(Book)
searchBook(by partial book name/author)
getMostSoldBooks(by author name/category, limit)
Expectations:
Maintain DB on memory
Code should be readable. Design, handle naming convention,handle exceptions & should be
running
What is the minimum number of dice tosses required to reach Tail from Head?
Hint: Problem can be boiled down to snake&ladder problem, where forward pointer is a ladder &
backward pointer is a snake.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-set-15-sde-ii/
Myntra Interview | Set 2 (For SDE-II)
1st round(coding)
1) Given a tree, in which leaf nodes for a doubly linked cycle Print cycle.
2) Tell me if binary tree is BST?
Source
http://www.geeksforgeeks.org/myntra-interview-set-2-sde-ii/
The first round was a MCQ test with 40 questions covering topics ranging from Data Structures,
Operating Systems, Computer System Architecture, Networks, aptitude. Level of questions ranged
from easy to moderate. Not very difficult to clear this round although 50% negative marking was
tricky.
Coding Round:
There were 2 questions:
1. Given a 5 digit number and 2 operators ( + and – ), find the minimum and maximum possible
positive integers using digits from the number and the 2 operators. Example: 12345,+,-.
Possible combinations may be: 1+2-345, 1-2+345 (344 : Maximum). Absolute values of results of all
operations was to be considered.
2. Given an input string ( 200 character limit, character set: a – z ), find all possible square sub
strings.
Square sub string: Strings formed by concatenation of any string. Example: abab( formed by
concatenating ab with ab).
Technical Interview 1:
Questions related to arrays, link lists, trees were asked. Operating systems questions was the major
focus point. Topics related to memory leak, segmentation, paging were also discussed. Discussions
about technologies worked on, projects worked on and general interests were also a major part of the
interview.
Technical Interview 2:
More operating systems related questions were asked. Topics included paging, thrashing, framing,
schedulers, scheduling algorithms. General concepts like sockets and ports were also discussed.
Again interviewer focussed on technologies used and discussions related to devops engineering,
automation engineering and tools like ansible, docker, selenium were also discussed.
Overall level of interview was moderate and main focus point being operating systems and projects
undertaken and technologies knowledge.
Geeksquiz and other geeksforgeeks questions were of great help. Galvin is the go-to book for
operating systems.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/paxcel-technologies-interview-experience-set-2/
Length of the largest subarray with
contiguous elements | Set 2
Given an array of integers, find length of the longest subarray which contains numbers that can be
arranged in a continuous sequence.
In theprevious post, we have discussed a solution that assumes that elements in given array are
distinct. Here we discuss a solution that works even if the input array has duplicates.
Examples:
Input: arr[] = cc
Output: Length of the longest contiguous subarray is 4
We strongly recommend to minimize the browser and try this yourself first.
The idea is similar to previous post. In the previous post, we checked whether maximum value minus
minimum value is equal to ending index minus starting index or not. Since duplicate elements are
allowed, we also need to check if the subarray contains duplicate elements or not. For example, the
array {12, 14, 12} follows the first property, but numbers in it are not contiguous elements.
To check duplicate elements in a subarray, we create a hash set for every subarray and if we find an
element already in hash, we don’t consider the current subarray.
class Main
{
// This function prints all distinct elements
static int findLength(int arr[])
{
int n = arr.length;
int max_len = 1; // Inialize result
Output:
Time complexity of the above solution is O(n2) under the assumption that hash set operations like
add() and contains() work in O(1) time.
This article is contributed by Arjun. Please write comments if you find anything incorrect, or you
want to share more information about the topic discussed above
Source
http://www.geeksforgeeks.org/length-largest-subarray-contiguous-elements-set-2/
2. Find smallest substring which contains all characters from a given string?
Input string1: “This is a test string”
Input string2: “tist”
Output: “t stri”
3. Given a maze. Drop a mouse in the maze randomly, and place a piece of cheese in any cell. The
mouse can move 4 directions
There are some walls on the way to block certain directions for certain position.
Note: the mouse does not know where he is, and where the cheese is. He cannot find x,y for the
position he is right now.
for instance
XXB
DXD
AXX
Mouse is A, cheese is B. Return true if mouse can reach the cheese else return false.
Note: if your code doesn’t compile, they will not accept it even if your logic is correct.
Round 3: (Technical Interview)
• A brief intro of yourself and discussion on my projects.
• Then he asked me about my fav. subject and language (DS and C++).
• Questions on OOPS (almost all the concepts were covered like polymorphism, overriding,
overloading, inheritance, concept of virtual fxns etc.)
• He wrote a C++ code and asked me to write the output.
• Some questions on DS and then he asked me to write algo for reversing a linked list.
• Then he asked me to explain one of the questions that I had attempted in the coding round. (They just
want to make sure that you know the logic).
Round 4: (Technical Interview)
• Topics in DS that I am comfortable with and the ones with which I am not.
• Unfortunately this time he asked me questions from the later. They don’t want a correct answer but
just want to see how you approach in such questions.
• Questions from bit-wise operators
• Then he asked me to explain other one of the two questions I had attempted in coding round.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/makemytrip-interview-experience/
Flipkart Written test for Placement
Flipkart recently visited our campus for written test for December placements.
Hosted on : cocubes.com
Time : 90 mins
No objective questions.
Two coding questions only. We have to complete the function only.
Ques:
Given a mxn grid, each of it’s element be either ‘.’, ‘R’, ‘G’ or ‘B’,
where ‘.’ -> empty, ‘R’ -> Red, ‘G’ -> Green, ‘B’ -> Blue
A Blue strip has width 1 and length greater or equal to one.
A Red strip has length 1 and width greater or equal to one.
If a Red strip and a Blue strip overlaps, the overlapped portion will become ‘G’.
Find the minimum number of strips required to cover the whole grid.
1Explanation:
Ex 1:
Only 1 vertical strip from (0,2) to (1,2). [Indexing from (0,0)]
Ex 2:
1 vertical strip from (0,2) to (2,2)
1 horizontal strip from (1,2) to (1,4)
1 horizontal strip from (3,0) to (3,0)
1 horizontal strip from (4,0) to (4,0)
so total — 4
Ex 3:
1 vertical strip from (0,2) to (2,2)
1 horizontal strip from (1,2) to (1,4)
1 vertical strip from (3,0) to (4,0)
1 horizontal strip from (4,4) to (4,4)
1 vertical strip from (4,4) to (4,4)
so total — 5
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-written-test-placements/
IBM ISL Interview Experience
IBM ISL On Campus Interview Experience.
This online test is timed, with each question allocated its own time limit of 2.15 minutes. About 18
number series questions and 18 numerical reasoning questions were asked.
Asked to write code to insert a node in its correct location, given a sorted linked list.
Asked to find least common ancestor given two nodes and the root; given a BST.
[ My other classmates were asked a lot on system calls, linker & loaders, multi-threading;
basically OS concepts in depth ]
Round 4: HR Round
[If you are lucky; you end up filling laborious employment forms]
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/ibm-isl-interview-experience/
Amazon interview Experience | Set 137
(Assessment test for SDE)
Coding questions:
1) Given two words, find if second word is the round rotation of first word.
For example: abc, cab
return 1
since cab is round rotation of abc
Example2: ab, aa
return -1
since aa is not round rotation for aa
2) Given two hexadecimal numbers find if they can be consecutive in gray code
For example: 10001000, 10001001
return 1
since they are successive in gray code
Aptitude questions:
1) Some based on finding relationships between given number/strings and find the missing one
Example: VTS: RPO :: AYX: ____
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-137-assessment-test-sde/
Category: Interview Experiences Tags: Amazon
Hike Interview Experience | Set 3 (For SDE
1)
Written round :
We all were required to write a code for LRU implementation with proper Locks and synchronization
so as it is thread safe.
Round-1
1. A sorted array is rotated K times. Sort it in o(n) traversal without extra space.
2. Median of a stream of array.
Round-2
1.Pirates and gold puzzle.
2. Why manhole is round ?
3. two pair with a given sum in a bst with o(log n) space.
4. K random numbers from infinite stream of array with equal probability.
question from projects were also asked.
Round-3
Lots of question from projects and technology used there.
How you choose tgose technology over the others ??
Given a file with student name and marks .. Print all student whose marks lies within a given range of
marks.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/hike-interview-experience-set-3-sde-1/
Round -1
1. Asked me again the logic for finding first non repeating char from a stream of character.
Then the discussion went how hash map internally works and what is the principle behind it .
How the hash conflict get resolved and write code for the same.
Round-2
1. Find the majority element in an array.
2. Print out all the numbers in sorted order from row and column wise sorted matrix
3. How to find a given key in a sorted stream of array(less than 0(n) complexity required)
4. One more ques dont remember
Round-4
1. In an array find three number which fits into pythagoras theorem(a^2+b^2=c^2).Find a,b,c
2. Find the number of island in a matrix of 0,1. The island which starts from edge of the matrix will
not be considered island
eg: no of island are 0 here
0100
0100
0000
0000
Round-5
Lots of in depth question about your project and its impact on the product.
Was asked to draw the architect diagram of the algorithm used in my project and explain with
example.
one tech ques : For a given string and given dictionary. Find all the anagrams of the string which are
also present in the dictionary.ie the string shud be a valid dictionary word.
NOTE : I WAS REQUIRED TO CODE EACH AND EVERY QUESTION WITH PROPER SYNTAX
AND EDGE TEST CASES on piece of paper after discussing the algorithm.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-138-sde-1/
1. Written test 90 mins which consisted of 2 coding questions and 18-20 MCQ from varied
computer science concepts.
2. Telephonic Round
1. Find the number of occurrences of a number in sorted array.
2. LCA in a Binary Tree.
3. Clone a Tree, where each node had 3 pointers left, right and random. Random pointer points to any
other node in the tree.
Round A with HM :
1. Check for a complete cycle in a graph. ( A complete cycle is one that covers all nodes )
2. Construct a tree using Preorder and Inorder Traversal.
3. Evaluate a random function.
Since this round was with a hiring manager he asked a few questions like why do you want to leave
your organization? Why so early? Plans for further studies and basic discussion of projects.
Round B Tech1:
Half an hour discussion on my projects. Then a question on strings. Write a program to output the
minimum size window which contains all the given characters with at-least the given frequency. This
was followed by Test Case design.
Round C Tech2 :
1. Given a Node in a tree and a value k , print all nodes at K distances from the given node.
2. Given a string and k, arrange the string so that all the same characters are K distance apart. If not
possible print -1.
Round D BR :
1. Given two arrays sort the first array in the order of numbers given in the second array. For the
numbers that do not appear in the second array, sort according to face value. Discussed methods and
codes. He always pushed to optimize the code.
This was followed by discussion on sorting techniques, there comparisons. In the end he asked a few
questions from OS mainly the scheduling algorithms.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-139/
Amazon interview Experience | Set 140
(Experienced for SDE)
Hi, Recently i had interviews with Amazon.
http://stackoverflow.com/questions/3757393/given-a-number-p-find-two-elements-in-array-whose-
product-p
2. He asked do I know level order traversal of binary tree. He ask me to code then, he changed the
question and asked about spiral order traversal of binary Tree and asked me to code it.
http://www.geeksforgeeks.org/level-order-traversal-in-spiral-form/
2. Given an integer array, find and print three element in the array whose product is maximum. Code
was required.
http://www.technicalypto.com/2010/05/find-three-numbers-in-array-which-forms.html
Why Amazon?
What does router do, what is static routing? Given a routing table, how would you decrease the time
taken by router to decide to which router packet must be forwarded?
Details of algorithm that could be implemented and discussion time and space complexities.
2. Given a number d and size of array N. Print all combination of element in the array such that first
element of array is d and next element in the array can be +1 or -1 the previous element in the array.
Code was required.
3. What is LRU and implementation of lru? Write pseudo code for the same.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-140-experienced-sde/
Microsoft Interview Experience | Set 39
(On-Campus)
?I like to thanks geeksforgeeks.org for my ?entire journey in placement.
In round 2 interviewer were very cool and supporting. try to shake hand while entering and ask every
detail of problem.
Round 2:
1. Explain yourself.
2. A backtrack problem on sudoku.
write full code on paper in any language. write failure case of your code.
3. Discussion on projects.
i had done a project on big data on frequent itemset.they were really interested in each and every
detail of big data paradigm.
4. Your strength and weakness and extra curricular interests,
Round 3:
1. there is a 3 million character string. u have to print the count of occurrence of each node.
do not jump on to the question. wait for him to complete. i gave count sort pf O(n) solution but he was
focusing on more optimized one.
2. again he jump to my big data project. he gave me a real life scenario and asked to design it.
you are giving the information of about 10,000 sites about their users and the product they had bought.
you are a consultant. give a big data solution to find out the places where users had bought the
jewellery in large amount. also give the name and details of users who had bought jewellery in large
amount.
he was quite impressed by my design. we discuss the design for about 30 minutes. then
instantaneously they told me that i am selected for 3rd round.
My tips is to stay cool and enjoy the interview. carefully tell your weakness. Don’t worry to ask
questions from interviewer. Take proper use of the time. Big data helps me a lot in every round.focus
on designing problems along with data structure.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-39-on-campus/
[TopTalent.in] Interview with Chirag Who
Got into DreamWorks
does it feel to work for a film like ‘How to Train your Dragon 2 ‘ or ‘Penguins of Madagascar’? This
guy has an answer to these questions because he worked for those Movies! For him, Experience with
every movie is like exploring a new World. This guy from BITS-Pilani, Goa is able to relish this
Awesome work experience by passionately working hard towards getting this Awesome Job.
We at TopTalent.in spoke to Chirag from BITS-Goa about his Dreamworks experience and what are
his suggestions for aspirants looking to achieve something similar.
TopTalent: What job offers did you have apart from Dreamworks?
I got a job offered at DreamWorks as a pre-placement offer after an year long internship. This
internship was a part of my college curriculum. When I was offered this internship last year, I also
had a 2 month summer internship offer from Microsoft IT, Hyderabad. I chose DreamWorks over
Microsoft as the dates were quite rigid and I had worked hard for the DreamWorks internship. Plus
animation interests me a lot. An year after my internship at DreamWorks Animation, Redwood City,
California, I was offered a job at DreamWorks Dedicated Unit, Bangalore, India. I had not applied
for any other job interviews then.
TopTalent: What kind of skills do you think helped you in getting this job?
The position I was seeking was Technical Director. One must realize that a Technical Director’s job
is purely based on programming and problem solving. It does not involve any artistic work. However
it is always an added advantage to know the workflow of an artist. I had started learning 3D
Modeling in Autodesk Maya in my sophomore year thanks to the many online resources available.
Once I was a comfortable with modeling I started exploring other areas like Rigging, Animation,
Lighting and MEL Scripting. I explored a lot of forums and learned a lot about the production pipeline
involved in making an animated movie. However the main skills required for this job are your
programming and problem solving abilities. My portfolio can be found at
www.agarwalchirag.wordpress.com
TopTalent: What’s your advice to students who are aspiring for similar kind of achievement?
The first thing every aspirant has to understand that this is not an achievement big enough to subside
your other aspirations. This is just the beginning of your career in this industry or in the field of
computer graphics. Do not blindly follow others just because the work sounds cool or fascinating.
Ask yourself if you would be happy doing this work every day. If you are truly interested then make
sure you are prepared before you apply for an interview. I would strongly advise to make your work
available online. For example, you can start a blog. This makes it easier for everyone to view your
work and approach you. Stay focused and keep practicing. Remember that there’s always, always
more to learn.. All the best! =)
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/toptalent-interview-chirag-got-dreamworks/
Amazon interview Experience | Set 141
(For SDE1)
Online written
20MCQS + 2 coding question in hacker rank
1. Find the pattern in string (Use Kmp)
2. Rotate matrix by 90.
See in this round your code should pass all the test cases given
Telephonic round
Find the loop in linked list and also given the starting node from where the loop starts.
3. U have given large stream of m size and you have size of n window . you have to find the k
minimum in each window . we are shifting the window by one at every iteration.
sol: I have used self balancing tree.First i have entered n element in tree and do in order traversal
upto k to find k minimum element.Now shift the window by one .Now we to remove first
element(logn time req) and insert the new element(logn time). Initially i was thinking for solution
using big extra space which was not accepted by the interviewer. Assume for every question they
asked what if you have 10 million data so your approach will fail if you have taken extra o(n)
space.Code should be scalable enough
4. N process can write at time in buffer and n process can read through buffer.Design a system for
read and write.
5. words are coming through a stream , u have to halt the problem when first repeated words appear.
Used trie data structure.
6. N words are given.u have one source word and one destination word .u have reach to destination
in minimum edit with the constraint that intermediate word should be from the words given.i have
given the solution using graph and used BFS traversal .complexity discussion
7. what happen when u hit url .I have tried to explain it using Django, he is expecting something from
domain name server. Be prepared
Good luck
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-141-sde1/
SAP Labs India | Set 2 (On Campus
Interview)
SAP LABS CAME TO OUR CAMPUS FOR BOTH R&D UNIT BANGALORE AND
CONSULTANCY GURGAON.
6th Round- HR
HR Round was more of a formality,though it also was also of 25-30 minuted duration.It was a typical
HR interview.Was asked behavioral questions and profile related questions!
Finally three students were selected for R&D and 1 for consultancy role.
Thanks to GeeksforGeeks for their awesome content! Contains pretty much everything to land u in
your dream job.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/sap-labs-india-set-2-campus-interview/
Adobe Interview | Set 16 (For MTS-1)
Recently I got the opportunity to be interviewed for the position of MTS-1 at Adobe. Here is my
Interview Experience:
Written Round:
Part A (50 mins):
45 questions based on logical reasoning, DI, quant and geometry. The questions were easy but the real
issue was time in this round.
F2F Round 1:
a) About my projects. Simple Questions.
b) How a program compiler and run. He wanted answer from scratch.
c) C++ Questions for what is cout, Object orientation.
d) Design a ladder and Snake Problem with TWO Player and Code it. I did not have played earlier.
F2F Round 2:
a) Discussion on Projects. A person can have 1 step, 2 step, or 3 steps. How much combination he
can have to climb on a ladder of n and code.
b) Min, push, pop in Stack.
c) C++ Question. VIRTUAL CONSTRUCTOR, virtual destructor significance. Design Pattern related
Questions.
F2F Round 3:
a) Basic Projects into.
b) In array only 1 element is unique rest are 2 times. How to find that? He further extend if one unique
and rest are multiple of 3.
c) Design rate Maze Problem.
d) Loop in a list and how to find out. I said it is a standard question and answer. he asked me. Okk,
now tell me why are you increasing fast pointer by 2 only. find the value that should be best match for
this.
e) Some of two elements in an Array. Code it.
d) Random Pointer in Linked list. Clone it.
This was the best interview, i have ever had. I learned a lot.
Thanks geeksforgeeks.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-set-16-mts-1/
Nagarro Interview Experience | Set 4 (Off-
Campus)
Written Round:
This round was for 75 minutes and there were three questions which have to be coded using any
programming language. First question was given an unsorted array find the Fourth largest in it O(n)
time complexity. Second was given and array of 0’s and 1’s sort the array in O(n). Third question was
given a string find the longest substring having at most 2 unique characters, if there are multiple
longest substrings return them all. Ex: given string “helloworld” then output should contain {
“ell”,“llo”,“owo”}. First two questions were quite easy the last one I did with brute force method
and there was no time constraint so I did it in O(n2) time.
After that there was a lunch break and after that they announced the names of people shortlisted for
technical interviews.
Technical Round:
The interviewer asked me to explain each of my code. He started with the sort 0’s and 1’s and asked
me how is it O(n), I explained him. Then he made it complex by saying that if there are numbers from
0 to k in an array of size n then how will you sort them in O(n), I told him the count sort, he agreed
with it and then asked me to quickly write down the code, I wrote it down, there was a silly mistake
which he pointed out and said that it’s good and then moved on to next problem. He saw my code for
fourth largest in an array, I did it using heap and time for creating heap is O(nlogn) then he checked
the code which was perfectly fine. He then gave me a hint and asked me to do it in O(n) using
something from quicksort. I told him that we can do it using partition algorithm of quicksort and
explained him that. He then moved on to finding longest substring having at most 2 unique characters,
he asked me to improve the time complexity I explained him that I tried doing it using DP but I’m not
able to do it for strings having length more than three, I told him that it seemed to be a variation of
longest palindromic substring. I explained my code to him he liked the way I used an integer to mark
the presence of characters in string. He then pointed some small mistakes and then for finishing
interview asked me the difference between ++i and i++. Results were declared and I was selected for
the HR round.
HR Round:
He started by introducing himself and then asked for my introduction. Then he asked me about my
family. He asked me about the technology I like and where do I rank myself in programming among
my batch mates and where do I rank myself in academics among my batch mates. He then asked me
how many rejections I faced till now. What do I dream of and what all I know about company. Am I
placed somewhere else, I told him that I am placed in Aricent. He then asked me what you will do of
multiple offers. He asked me about the clients of the company, who is the co-founder of the company,
the company is at what CMM Level, what information I gathered about company etc. etc. The HR asks
you such questions that you may contradict yourself so be truthful until and unless you don’t have good
sense of humor or convincing power. That’s all.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/nagarro-interview-experience-set-4-campus/
Amazon interview Experience | Set 142
(Off-Campus for SDE-1)
Round 1: Telephonic
Q1. Implement some functionalities of Minesweeper like connected component search and game
termination check etc.
Q3. Given a matrix of 0s and 1s find the row that contains maximum number of 1s.
Q4. Given a node in a binary tree, find all the nodes which are at distance K from it. Root node is
also given.
1. Insert a crate
2. Search the best fit crate
3. Delete the crate after allocating it.
e.g. 3 crates of weight 10, 20 and 30 are there. An item of size 15 appears then we’ll allocate crate of
size 20 and delete it.
Sol. Use binary search tree (balanced using red-black criteria or any) and implement ceil function.
Q2. Optimize above data structure for weekends where amazon have lots of crates but very less
search operations.
Q3. Given a function boolisValidWord(string str) you need to check whether a string is a proper string
or not. E.g. iloveicecream is valid : I love ice cream.
http://www.geeksforgeeks.org/connect-nodes-at-same-level/
General discussion on virtual memory.
Round 4: 2 SDE-1s
Q1. Given matrix of 1s and 0s where 0 is water and 1 is land. Find number of islands.
Q3. http://www.geeksforgeeks.org/maximum-of-all-subarrays-of-size-k/
Round 5: Dev Manager, 6yrs exp. (May be bar raiser round still I am not sure :P)
Q1. We started our discussion for very general problem where we have a long stream of characters
and we need to extract all the patters from that stream. There can be integers, fractions, words or
anything.
I explained the entire process which is used in lexical analysis phase of compiler design where we
give regular expressions and finally they are converted to NFAs and finally a single DFA.
Then a discussion went on how we’ll implement this system from scratch.
There are many algorithms for converting regular expressions to NFAs and finally DFAs and some
general discussion over Natural Language Processing.
http://algs4.cs.princeton.edu/54regexp/
Q2. Given M sorted linked lists of each of size N, we need to merge them to single linked list of size
M x N using no extra space.
Next day I got the call that they would like to extend me the offer for SDE-1 profile.
Important Tips:
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-142-campus-sde-1/
[TopTalent.in] Interview With Amit Who Got
Into Flipkart
Nobody could enjoy that moment more than him. He could barely put his feelings in words in
achieving that feat. Such was his joy in getting into the biggest Online store in
India, Flipkart. For a guy who is very passionate about coding could not end up in a better company
than this. In his own words, ‘I felt as if I was at the top of this world’. We at TopTalent.in got a chance
to interact with Amit from NIT Kurukshetra about what made this possible and what others can learn
from this.
In case you are wondering how the resume of a Flipkart recruit looks like, you can download the
resume by logging in.
TopTalent: What job offers did you have apart from Flipkart?
Placement policy of our college doesn’t allow one to sit for the recruitment process of any other
company on campus once you get a job in a dream company which Flipkart definitely is. So, currently
I don’t have any other offer.
No words can help me crystallize the feeling that this job offer brought to me. I felt as if I was at the
top of this world .My efforts finally paid off and Yes, the feeling is simply unforgettable.
TopTalent: What is the profile offered to you in Flipkart and Why did you choose this opportunity
over others?
Profile offered is SDE1 (Software Development Engineer).It wasn’t difficult for me to choose this
because to me, coding is the passion first, habit next and profession last. Flipkart was looking only
for this.
TopTalent: Can you give us a brief account of the whole interview process?
First round was online coding round in which we were supposed to solve 2 coding questions. Second
round was machine coding round. In second round we had to design and code one coding question. 50
minutes of time was given for coding which was followed by small interview where interviewer
expected the explanation of code. Third round was technical interview which continued for around 40
minutes. In it problems related to data structures and algorithms were discussed. Final round was
hiring manager round. It started with some general talk (seemed like some HR interview at the point)
but then interviewer shifted to technical aspects and asked some question from tree data structure.
After around 30 minutes, this round concluded with interviewer asking me whether I had any query
about working in flipkart.
1. Codechef.com
2. Spoj.com
2. Karumanchi
3. Geekforgeeks.org
1. Careercup.com
TopTalent: What’s your advice to students who are aspiring for similar kind of achievement?
Three things are needed to crack technical interview of any software company. Knowledge, Practice
and Approach. In my third and fourth round of interview, what I felt was, that both the interviewers
were more concerned about my approach than knowledge.
Incase you forgot, you can download the resume by logging in.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/toptalent-interview-amit-got-flipkart/
Amazon Interview Experience | Set 143
(Off-Campus for SDE-1)
Experience: 5 months
I would like to thanks GeeksforGeeks for providing us such a useful platform for interview
Preparation.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-143-campus-sde-1/
F2F Round 2:
1. Given an array of words, print all the words which are not anagram of any other word. For
example, Input {“cat”, “dog”, “tac”, “god”, ”rat”, ”toy”, “act”}, Output{“rat”, ”toy”}.
Variation of this http://www.geeksforgeeks.org/given-a-sequence-of-words-print-all-anagrams-
together-set-2/
2. Given a tree connect all the nodes at same level in both directions
Variation of this http://www.geeksforgeeks.org/connect-nodes-at-same-level-with-o1-extra-space/
Thanks to GeeksforGeeks for providing such a wonderful resource for interview preparation.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-144-campus-sde-1/
Citicorp On Campus Interview Experince
Citicorp (Citi Group/Bangalore) came to our campus for Full time Data analyst and intern profile.
Written round-
There were 15 questions from quant’s, 10 questions from data interpretation with 1 mark each and -.5
for wrong answer also there were 2 case studies with 10 marks each with no –ve marks. Total 45
marks question, I did only 9 from quant and 7 from DI total 16 out of 25 questions and didn’t touch
case studies. Quanta and DI were very basics level.
In those 16, 1 question was wrong so basically I did 14.5 out of 45, but with a accuracy of 90%.
Didn’t expect to get shortlisted but was very tensed and angry upon myself coz it was my level paper.
But around 12 mid night shortlist came and I was at 11th position out of 31 students in the list.
There were total around 90 students who appeared for written test. They allowed Mtech and Mca
guys not Btech.
First round-
I went there and greeted him. Firstly he told me to introduce myself, later he asked what I like the
most. I told analytical thinking and logical reasoning and yeah I relate it with data base.(since I knew
they came for Data analyst profile).
He asked me about join, gave me a table and told me to perform all joins. I did that and he asked me
about Order by clause and, having clause then asked me normal forms up to bcnf.
Later asked about pl/sql difference b/w sql and pl/sql, what is trigger explain in detail. Some basics
questions of DBMS theory asked me about my 2 projects and at the end he gave me a situation where
I have a grocery shop outside nit Surathkal, and from last few days/months I realized a downfall in
sales, what possible reasons could I find? I gave him 8 reasons within 2/3 mins. He was impressed…
After 1st round out of 31 only 13 were selected and I was there in d list.
Second round-
As soon as I entered the room, mam told me “Ooo tum aao aao ”. I smiled because I was the 1st guy
during presentation who asked the first question (she made every1 clap for me there) and she
remembered my face. And eventually she did study from IIT Kanpur so yes she was able to speak
fluent Hindi (plus point for guys like me :p). with her there was a guy he asked me to write code for
taking a no and converting it into binary and 1 question from array- very simple later she gave me a
table with employee id, order date and order amount. A customer can place max 1 order in 1 day. I
had to find the latest transaction of every customer with amount as well. i did it using max function
over date and group by with sub query, she asked me about my resume at the end she gave me
7,9,21,63,100 and told me to find the no of numbers between 1 to 50000 which are exactly divisible
by all, i did it in 1 min.
but she was smiling, I thought I made some mistake in hurry, then I asked mam m I doing right or
wrong (in curiosity as I find very comfortable there) she smiled and said “Chalo bhago ynha se ye
interview h ”.I said sorry but yeah she was impressed with my interview so told ki “you will learn all
these things very quickly”.
Third round-
After 2nd round 9 were selected and I was one of them. It was basically a Managerial round and it
scheduled over Skype. I had to introduce myself as well as my family background. Here comes the
harder part when he asked me why you have such a poor academic back ground? I was speechless for
a moment but I started telling the truth.
I told despite getting 68% marks in my 10th I was the third topper of my class. I got 60.66 % in 12th
but yeah there also out of 700 students only 14 got first division. So basically I concluded that in my
state board marking is not that much good. He said ok but what happened in graduation(64%) when
you studied in Delhi?(what to say now :p) I said sir I did it from IGNOU and you can Google the fact
that even less than 5% of student are able to clear the degree in 3 years. Later I explicitly mentioned
that I m not blaming my boards but this is the fact which can’t be change.
Now He asked what happened in PG here also you scored only 7.50 CGPA which is less than even
standard score of 8(Meri to jaan hi nikal gayi :p). Then I told him that sir u can see my pointer in first
semester is very less close to 6.5 but after that I constantly improved myself. He was smiling …..
He asked me about my family background and then I told him how I struggled, I was giving tuition in
my grads to continue my education and after grads took a gap of 1 year and cleared all MCA entrance
examination and now sitting in front of him.
Later asked about my best qualities….i told him that I can lead group of people very well. I gave
example of me being captain of my department cricket team and I was class monitor through 3rd to
12th std and also some stuff regarding my college events. He noted down something .I don’t know
what.
I was not sure that I could clear that interview. When the result came they called all 9 students and
said that they find is difficult to eliminate 4 names .i was sure that I m out of picture now but
fortunately my name was at 2nd position. Wowwwww
Key to success: If you wanna come in Citicorp make Dbms and sql strong .you should be good in
analytical thinking as well as reasoning capability should be good ..Be yourself and Be Confident
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/citicorp-campus-interview-experince/
Google Interview Experience
Though I didn’t clear google but I want to share my Google interview experience , so it can help
other’s . Please find my interview experience below:
My Google Interview Experience for Software Developer Position [Android Core Team], London,
United Kingdom
Like many other enthusiastic engineers, I too applied for a job at Google. I know that its very difficult
that a resume gets noticed by google.
Suddenly, one fine day I received a Mail( “Hello from Google !”) from Google’s HR saying that they
are interested in my profile and asked me if I was ready to go ahead with the interview process[Come
on! you cant say no to Google].
Round1(Phone interview) :
* Why should one use merge sort over quick sort and vice-versa.
* You have a very large array of ‘Person’ objects .Sort the people in increasing order of age .
General :
Then came the exciting part when he asked me to choose location b/w Google Paris(Text-Speech
Team) or Google London(Android Core Team).
About Google interview process ( 2-3 phone interview + 4-5 onsite interview in London ).
* Given a number , check if it can be represented in 5^n form , where n is positive integer .
* Given a string of words with lots of spaces between the words , remove all the unnecessary spaces
like
* Optimize a^b
* You need to develop the game Snake. What data structures will you use? Code your solution.
Come up with solutions quickly: even if its a brute force solution. Always iterate away from the
original solution.
Before you start coding explain why you’re approaching it that way ,its ok to start off with a naive
solution and try to make it more efficient.
Think out loud, keep things technical. The engineers will give you hints: take a hint! They are there to
help you!
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/google-interview-experience/
Amazon Interview Experience | Set 145
(Off-Campus)
I have been working with Amazon for last 2 years and 4 months. Here, is my interview experience
when I was the interviewee:
Written test:
1-> WAP to merge two linked lists like:
list1: 1->2->3->4
list2: 5->6->7
o/p list: 1->5->2->6->3->7->4
2-> Given two trees T1 and T2. WAP to check whether T1 is a subtree of T2 or T2 is a subtree of T1
Round 1:
3->He asked me a design problem “you have to design a class “DeckofCards”…with 2 operations:
1:Shuffle 2:Pick”
Pick would pick a random card from the deck and Shuffle will shuffle the cards and give you back the
deck of cards.
I answered with 2 options 1.LinkedList 2:Array…then there was a discussion around 15 mins over
both the solutions…
2-> How to compute all possible solution of A^3+B^3=C^3, where A,B,C belongs to (0 to N)?
Write code…
3-> How to compute A^n where n A tough “matrix with a mask” problem…I took around 20 mins to
solve it.
5-> Why Amazon, what is scalability and questions from my answers…like how would you manage
millions of requests…
Round 3:
1-> You r given a matrix of 0s and 1s. WAP that check if an element is 0 or not and places zeros to all
the col and row of that element.
2-> How to find a largest palindrome from a given string? Write code….
4-> Given some words(written in lexical order) of some unknown language…You have to find lexical
ordering of all the alphabets…
Like in english lexical ordering is A B C…Z
Round 4
Forth round was just related to my projects and subjects…(Paging, Deadlock, Trashing, JAVA and C,
Synchronization, etc) + 1 final algo question “How to find all anagrams in a dictionary” Solution was
in O(1)..
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-145-campus/
Zoho Interview | Set 3 (Off-Campus)
Hi!! I recently attended ZOHO off-campus drive.
ROUND 1: WRITTEN
APTITUDE(1 hr and 20 minutes-20 questions): Problems on average, probability, time & distance,
alligation&mixture,ratio, HCF & LCM and few a puzzles.
Nearly 60 students were selected out of 600 candidates. They didn’t select the top 60. They had a
cutoff and those who cleared the cutoff were called for the next round
1. Write a program to give the following output for the given input
Eg 1: Input: a1b10
Output: abbbbbbbbbb
Eg: 2: Input: b3c6d15
Output: bbbccccccddddddddddddddd
The number varies from 1 to 99.
2. Write a program to sort the elements in odd positions in descending order and elements in
ascending order
3. Write a program to print the following output for the given input. You can assume the string is of
odd length
Eg 1: Input: 12345
Output:
1 5
2 4
3
2 4
1 5
Eg 2: Input: geeksforgeeks
Output:
g s
e k
e e
k e
s g
f r
o
f r
s g
k e
e e
e k
g s
4. Find if a String2 is substring of String1. If it is, return the index of the first occurrence. else return
-1.
Eg 1:Input:
String 1: test123string
String 2: 123
Output: 4
Eg 2: Input:
String 1: testing12
String 2: 1234
Output: -1
5. Given two sorted arrays, merge them such that the elements are not repeated
Eg 1: Input:
Array 1: 2,4,5,6,7,9,10,13
Array 2: 2,3,4,5,6,7,8,9,11,15
Output:
Merged array: 2,3,4,5,6,7,8,9,10,11,13,15
19 cleared this round and they were called for the next round. The next round took place on the next
day
Output 1:
Taxi can be allotted.
Taxi-1 is allotted
Input 2:
Customer ID: 2
Pickup Point: B
Drop Point: D
Pickup Time: 9
Output 1:
Taxi can be allotted.
Taxi-2 is allotted
(Note: Since Taxi-1 would have completed its journey when second booking is done, so Taxi-2 from
nearest point A which is free is allocated)
Input 3:
Customer ID: 3
Pickup Point: B
Drop Point: C
Pickup Time: 12
Output 1:
Taxi can be allotted.
Taxi-1 is allotted
Output:
Taxi-1 Total Earnings: Rs. 400
1 1 A B 9 10 200
3 3 B C 12 13 200
These were just sample inputs. It should work for any input that they give.
Those who finished both the modules within 3 hours and if it worked for all the inputs they give, those
candidates were given extra modules to work with.
I didn’t get direct placement in ZOHO but I got an internship offer. If I perform well in my internship,
I will get an offer. Round 3 was the toughest and if you perform exceptionally well and as they expect
in that round, you will definitely make it through. Many thanks to geeksforgeeks.org for helping me out
in my preparation.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/zoho-interview-set-3-campus/
Adobe Interview | Set 17 (For MTS-1)
Written Round
There were two round technical and aptitude
1. Aptitude round consisted 45 questions (50 minutes) except two passage based on logical reasoning
rest were easy, time management was important in this round.
2. 20 Technical question 13 multiple choice from OS and C++ , 7 questions were coding related
running code were required.
After almost 15 days I got call that I have been shortlisted for the next round.
F-2-F Round 1:
1. Write a program to search an element in a row-wise and column-wise sorted 2-dimesional array .
2. Write a program to convert a binary tree to binary search tree.
3. Two string are given check whether second string are substring of 1st string or not second string
may contain wild card character like ‘*’ and ‘?’.
4. Many C/C++ related question, concept like virtual function , static variable are discussed.
5. Suggest method to multiply two object(operator overloading , proper code for overloading was
required).
F-2-F Round 2:
1. Write a Recursive function to reverse a link list.
2. You are given a string in which every character is followed by space u have to return n/2 string that
is each character as a separate string ..extra space were not allowed.
3. Many OS related questions Deadlock,Mutex, Semaphore, IPC etc.
4. Many typical C/C++ declaration, memory allocation difference between new/malloc, free/delete
and details about how memory allocation takes place.
F-2-F Round 3:
HR round
1. Your strength
2. Weakness
3. Why adobe
many more HR questions.
F-2-F Round 4:
1. Implement a stack using two queue and queue push, pop operation proper working code were
required.
2. Write a function to find 2nd largest element in an array.
3. Reverse a string efficiently.
4. Design a chess game.
3-4 puzzle were discussed one related to time glass, one related to watch , and one related to number
this one was really interesting, Puzzle was write an eight digit number in which 0th position
represents number of zero in that number, 1st position represents number of 1’s in the number , 2nd
number represents number of 2’s in the number …so on.
Many C/C++ concept were discussed this interview went on for olmost 1 hour and 20 minutes ..this
was director round and fortunately went well ?
F-2-F round 5:
1. U have n vending machine out of which 1 is defected find the defected machine in O(1) on solving
this he modified it give general solution for the case in which 2 machine are defected O(1) solution
were required.
2. U have given a link list make a new link list which is reverse of original link list.
3. Again many C/C++ and OS related conceptual questions and some general discussion on few data
structure .
F-2-F round 6:
1. Write a recursive function to print directory structure. Two function were given isfolder() and
openfolder().
2. Write proper running code for heapsort and some discussion related to that.
3. Asked 3-4 puzzle.
4. Again some C/C++ related question.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-set-17-mts-1/
MakeMyTrip Interview Experience | Set 2
(On-Campus)
MakeMyTrip recently visited our campus.Below is my interview experience:
Section B- Basic C , C++ and Java questions. Moreover there were four coding questions for which
you have to write the pseudo code or algorithm. Questions were like finding loop in linked list ,
finding first non repeating character or remove duplicates etc.
3. Based on hashing or you can use map in C++. You have given two sentence A and B. Find the
length of smallest substring in A that contains all characters of B.
Round 3: (Interview-1)
It consists of general discussion on the programs given in coding round. Then they asked some set of
questions based on Database,Projects,Algorithms. Questions were like
1. Merging two linked list . They asked me to write code on paper for merging both sorted and
unsorted linked list.
2.Add two numbers recursively. I was asked to write the whole code.
3.Factorial of large number only concept. Then asked one puzzle and one or two questions from my
project.
Round 4: (Interview-2)
Basically in this round interviewer was checking more of your approach and out of box thinking.
1. Which data structures will you prefer to make a new language. After that a long discussion took
place.
2. Find the frequency of each word for a given set of huge data.
Final was to explain Segment tree and its complexity which was asked from my project. Then general
discussion on BST and he asked complexity of AVL and RB tree.
HR Round:
It was a simple HR round. Just be yourself. Moreover he asked about my Research work and my
interests.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/makemytrip-interview-experience-set-2-campus/
One97 Interview Experience | Set 2
My Interview Experience with One97
My Experience: 1.5+ year . I am from premium engineering college of India. Apart from my regular
job I do freelancing and (sometimes) write articles for CodeProject, if I happen to find something
really out of the box
How I Applied?
I saw on Linkedin profile that One97 is hiring people, so I applied for the job and got the call just
next day.
Expected number of rounds : 3, (The third interview is taken only if a candidate clears the first two
interviews)
Round 1:
Began with the introduction. Why are you looking for another job blah blah.
Then he gave me a puzzle that there are two robots in the air and they have a parachute each with
them. On each there is a big infinite assembly of cells units. The robots land on the assembly of chain.
Now that cell remembers whether a robot landed and placed parachute on it or not. Now you have to
program the robots in such a way that they meet after some time. There should be only one function
which does that (for both the robots). A robot has option to either move left or right or stand still.
Then he asked me a question that there is large array. With 0’s initially and 1’s at the end. You need to
find out the position of first one.
NOTE(Just in the interviewer is reading this): I read somewhere recently that person should always
ask questions to the interviewer before start coding. So, I never did that when I was in my college,
actually never had tobecause 99% of the questions are either from geeksforgeeks or careercup or the
pdf – How to crack coding interview. Well, I had a genuine question that by large you mean infinite or
finite array. The interviewer suddenly looked blanked when he heard infinite and binary search
together. I am pretty sure he must be thinking what will the last index and how will I calculate mid in
that case. But, binary search can be modified to look for an element even if you don’t know ‘n’.
Then some questions related to the freelancing work I do. Then another “coding” question to
segregate even and odd numbers – again form geeksforgeeks.
One question on ArrayList and LinkList.And few small questions related to Java(like difference
between xyz and abc) – which I have no clue, how does that helps the interviewers to judge a
candidate’s java knowledge. But the interviewer was happy and I was happy.
Round 2:
The weirdest interview I have ever had. First question – What is coupling and cohesion. I told him
what I remembered from Sangeeta Sabharwal book I read back in college.
Then he asked me about my resume – that how can I work in two companies (one of which was
freelancing) and being a girl how can I be into technology. The idea altogether seemed very confusing
to him, plus I was appearing for Dev profile. Well, he asked me to name a few data structures from
Java. I answered quite a few like “ArrayList”, “Set”, “Stacks”, “Queues”. Then he asked me to name
a data structure in Java which is actual implementation of Queues – this was the only sane question
till this point. Then he all of a sudden started shouting – that I don’t know Java blah blah. If he ever
gives me assignment to get data from database, populate POJOs with it and then convert it into JSON,
then I won’t be able to do that- because I don’t know the difference between ArrayList and List
(which he definitely assumed in his head).
Then he asked me to name the library which converts POJO to JSON object. I said there is some third
party API, whose name I don’t remember. He asked question on database queries and indices-which
made sense. Then he asked me any questions- I felt like asking are you the only one insane and dumb
here or everybody here is the same, but then I said no and he rushed to HR. The HR came with the
feedback but before she could give me the feedback, I told her about the interviewer and asked her to
keep the feedback with herself.
The point I want to make is that first of all, a programmer’s work can never get limited by a language.
Plus Java, C#, Python are something which just translate your thoughts/algorithm into something
runnable. Secondly, in my 1.5 year of experience I have never crammed the API documentation of
either Java or C# or Python. My idea is to just start writing “Hello World”, the associated
modules,data structures will automatically come to your head . Even then, I have never fared less than
any other computer programmer because ultimately what makes a difference is whether you have the
brains to visualize how will data move in the memory, which operation will you mostly use-deletion,
insertion, updation, sorting etc , the knowledge of ArrayList, List, LinkList will follow. All you need
is to be clear about in your head how threads will access the static variables, how will they work
simultaneously keep their own copy of variables, which variable I want to protect and which variable
do I need to be updated by all threads. To understand the API and more important to tweak the API is
not more than an hour’s work.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/one97-interview-experience-set-2/
KLA Tencor Interview Experience
Before my interview scheduled i tried but could not find any recent interview of KLA Tencor, so i am
sharing my own to help you guys. For FRESHERS (MTech(CSE)…software engineer).
25 objective + 2 programs…..Level of objective test was good. C/C++/ 5 Aptitude/one ques on self
join. I followed geeksQuiz site and manag to do 20 question out of 25. Concentrate more on C++.
A function is given with array of string as input through ” **str1 ” and return output as ” ***str1 “.
Solution: traverse array of strings and for each string elements convert either to lower or smaller
alphabet. And then EXOR the elements. If left character after Exoring is ” ” (space) then result is
PASS.
Program 2: Matrix input and a program like K -Map but also consider diagonal elements. count
number of groups and output count.
Guys team of KLA Tencor is like a friend. They will take you very seriously and will help you
alot..so please ignore tension of facing interviewer all you have to do is “C++”. Make your self
expert in C++ concepts.
ques 3: How default ” = ” operator and copy constructor is used and why we need to use them
explicitly
ques 7: How to compare two objects. Equal method belong to which class.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/kla-tencor-interview-experience/
Wizecommerce On-Campus Interview
Experience
Round 1 : Written (Aptitude and Logics)
There were around 30 mcq questions. The questions were based on aptitude and logics.
There were puzzles also, for example given a 8×8 chessboard find the probablity that 2 queens are
together.
Questions based on time and distance, pipes and cisterns etc. Given a paragraph you have to answer
the questions.
This paper was quite difficult.
Then last question was what is the probability of choosing correct answer from the options given
below:
1) 1/4
2) 1/2
3) 1
4) 1/4
I cleared both the technical interviews and then they called me to their office for other rounds.
Round 5: HR Round
The HR was good. She first asked me to introduce myself. What projects I have worked upon. Why I
want to join them?
Do I have any offers? What do you do in your spare time? Your interests? Do you take tuitions? How
you enjoyed your life in your college?
What will you do if given a very very large amount of money? What is your family background? Who
all are in your family? Where do you
see yourself in 5 years and what do you expect from life?
There were two questions to be done in 45 minutes. Given two arrays arr1[] and arr2[], you have to
find the largest common subset among the two.
I done it with two approaches. Another question was that given two strings containing characters of
the same superset. You are allowed to perform
two operations swap adjacent characters and swap first and last characters and operations can be
performed on either of the strings. Find the minimum
number of swaps to make two strings equal. This question was quite difficult.
I had a meeting with GM. I was the first one called for it. When I went in no one was there and HR
asked me to wait there. Then after that he came.
Earlier he was busy in setting up his laptop and putting his things out of the bag. Then he asked me for
my resume which was on his table.
He then asked me all the questions that HR discussed with me but he was busy texting someone. Then
he was busy on his laptop. He then discussed the
two questions I did in last round. I told him what I did and what all approaches that I managed to think
off post exam. He then asked me to tell differences
between linked list and arraylist, then he asked me to tell difference between hash table and hashmap.
That was the whole process. But the GM didn’t selected me, I don’t know the reason for not being
selected. What I can think off is that he was too busy texting and calling others which might be more
important for him than taking interviews.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/wizecommerce-campus-interview-experience/
[TopTalent.in] Interview With Divanshu
Who Got Into Google, Mountain View
Even if we were to search around the world, it would be a truly difficult job to find someone like
successfully bagged job offers from an astounding three companies – all being some of the best and
most admired companies – Google, DE Shaw and CodeNation. We at TopTalent.in spoke to Divanshu
from IIIT Allahabad about the Google Interview Process, how he managed to crack it and what are
his suggestions for aspirants looking to achieve something similar.
I feel elated and happy on cracking the Google, Mountain View offer. It is a dream come true to work
for one of the most prestigious IT organization. I am really looking forward to be a part of the
organization next year. It was possible only due to constant support of my parents and my elder
brother who were more than happy to know that I have achieved this wonderful feat.
TopTalent: What other offers did you get apart from Google?
I had interned at D. E. Shaw during the summer of 2014 and got a PPO afterwards. I also got an offer
from CodeNation which is a startup under the Trilogy group.
I participated in the Google APAC Code Jam. I stood first in India and seventh globally by solving
three out of four problems. All the problems in this round required good knowledge of Algorithms.
Based on the performance, Google called me for onsite interviews at their Bangalore office. There
were a total of four interviews and involved questions from Programming, Algorithms, Data
Structures and Operating System.
TopTalent: Can you give us a brief account of what you felt was the toughest interview?
According to me, all the four interviews had a similar difficulty level. During all the interviews, the
difficulty bar was raised slowly as we approached the end of the interview. The interviewers
presented a tougher question than what you have already answered.
I was preparing for the ACM ICPC contest which played a very big role in improving my knowledge
of algorithms, data structures and mathematical reasoning. It helped me to code my logic faster and
accurately. Apart from that, I revised my Operating System and Database Management System
courses. I also went through my past projects to gain an insight into each one of them.
TopTalent: What kind of skills do you think helped you getting this job?
My major skill is Programming and Algorithms. I have a good rank on Topcoder and other websites
which was an advantage. Along with that, I have explored many different fields which helped me a
lot. I have good knowledge of web development and mobile application development. I have also
worked on projects involving Machine Learning, Information Retrieval and Image Processing.
TopTalent: What resources did you consult? Where did you practice problems from?
For algorithms, I practiced on Topcoder, Codeforces and Codechef participating actively in their
regular contests. Introduction to Algorithms by CLRSis a nice book on algorithms. You can also learn
from Topcoder Tutorials and various online blogs written by active programmers. For Operating
System and DBMS, the course books are enough if you read them thoroughly.
I was required to send all my grade cards after one week of the interview process. Then they
reviewed everything and the offer was given. So, I believe that grades were also a factor involved in
the selection process.
TopTalent: What’s your advice to students who are aiming for similar placement offers as yours?
Everyone has interests in different domains. One must ensure that they learn more and more about
their area of interests. One should be very comfortable in expressing a thought process in any
programming language of their choice since most of the companies look for your accurate
implementation of the given problem. Also, Codeforces and Topcoder are nice websites to regularly
practice your algorithmic skills and improve your problem solving as well. Students should also keep
a focus on developing good projects to explore a variety of technologies.
In case you missed, you can also download his resume by logging in to your account on TopTalent.in
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/toptalent-interview-divanshu-got-google-mountain-view/
I am happy to contribute to a community that helped me learn so much This mail contains
Problem statement: Given an Amazon reviews paragraph containing several words, find the
minimum distance between two given words.
“Amazon is the best company to work for. The amazon is a beautiful forest.”
Given: You are given the position of each word in the paragraph. Meaning, you know that word
‘Amazon’ occurs at positions 1 and 10, and ‘The’ occurs at 3 and 9. You do not have to parse the
paragraph to gather this info.
Sub questions :
*Which data structure will you use to store the given info?
*Compute the minimum distance in the most efficient way.
*Give a working code for the same.
Question 2
Problem statement: In a binary tree, a chain can be defined as sum of length of the left node series,
right node series, and 1. Find the length of longest chain in the tree.
Sub questions:
* Provide a solution, optimize it, give a working code or pseudo code or an algorithm for the same.
Second round
Question 1: Given two valid dictionary words, find the minimum number of steps required to
transform first word to second word. Following are the transformation rules –
Example: Transform CAT to TOY. One of the several possible transformations is CAT -> CAR ->
TAR -> TOR -> TOY
Question 2 : Assume you have been given a binary tree such that the angle between horizontal and the
line joining node to it’s left child (or right child) is 45 degree. This essentially means node 5 and 6 in
the tree figure above collapse into a single node. A vertical for a tree is defined as shown in the
figure below. Given a binary tree of the kind defined above, find the number of verticals that can be
drawn.
?
Sub questions:
* Provide a solution and also provide a working code for the same.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-questions-set-146/
SapientNitro Interview Experience | Set 2
(On-Campus)
Mode:- skype and telephonic interview
written test by:- amcat
1. Recruitment process
There was a written test which had four sections. Technical, Logical Reasoning, Quantitative
Aptitude, Verbal Ability.
Shortlisted candidate went for technical interview round.
Then further shortlisted candidate went for hr interview round
Those who got shortlisted after the hr round got the full time offer.
Technical Interview
To many of my friends, it was a puzzle round and they faced only puzzles(8-9). But i got lucky, I
was asked 4-5 puzzles and jumped into technical questions
puzzles:-
1. I was to imagine a situation where there’s is an empty wet, water spilled room(ceiling to floor
height- 12 ft), a dead man(7 ft height) hung by a 3 ft rope. I’m asked how could the man hung himself
there?
reply:- I said there had been a 2ft ice cube on which he might have stood and tied himself and hung,
(ice cube melting away killing him)
2. I’m given 8 sticks to use to make two squares and four right angled triangles
reply:- a rhombus inside a square
3. I was given two non-uniform sticks which burn one hour each. I had to measure 15 minutes using
them.
reply:- I set one stick to fire on both ends and the other stick on only end. I let the first stick burn
completely which measures me 30 minutes. Then I put the other end of the burning second stick on fire
and let it burn completely. Now, the second stick takes 15 minutes to burn completely
4. I was given 9 balls which all are identical except one which is hollow! How many trials would
you take to figure out the hollow one!
reply:- logarithmic answer. log 9 base 3 . i Said its two trials, I don’t know if its a right answer
5. There are three ants on three corners of an equilateral triangle. they can move in any direction but
only along the triangle edges. probability that any two ants collide each other.
reply:- i gave up. couldn’t find out the answer
tech ques:-
1. Difference between C and C++
2. Can one edit standard libraries of C?
3. what is function overloading and overriding (difference between them)
He asked me to explain about my project which was on Service Oriented architecture for building a
middleware in JADE. I explained it all to him. I wonder how much he might have understood.
HR Interview
It started with him telling about himself. He told his position and his work role. I couldn’t get a single
thing of what he was talking about. :p Flew over my head
Then i started to tell about myself, strengths weakness, hobbies.
He asked why i like listening music a lot. I was like- I love it without any reason.
He asked me if i like maths. I said no! He gave me a small problem
How many squares are there on a chess board.
without further thinking, i spit out 64. He asked for my surity. Then i thought and said no(there are
plenty of them inside, bigger and nested squares)
so, i gave up, he finally told me the answer. (sum of squares of numbers from 1 to 8)
He asked about software development life cycle. I gave an honest reply i forgot. Then he started
scolding me saying that my pointer is 8.30 and i forgot this! He started saying to go prepared for the
next interview.
Then he asked me what if i don’t perform well if they hired me.
i said- kick my ass.
He started giving me life lessons in hindi.
Then he asked me what would i want first in process of making tea. (related to software development
life cycle)
i said- gas(fire). but he says the first step would be knowing the no. of people who will drink that and
what are their requirements(same as a software needs)
That’s it. It ended. and after news came over. I got selected :p
Tips:-
In tech interview, be confident about your answers, and don’t ever guess any answer. Be honest
and say you don’t know if you don’t and yes if you know.
In HR interview, be what you are. Reflect entirely yourself there. Don’t be moody and shy. Try to
converse with him as a friend. He’s there to select you rather than to reject you.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/sapientnitro-interview-experience-set-2-campus/
InfoEdge Interview Experience
Recently I got interviewed by InfoEdge. It was off-Campus drive at Noida.
1 Aptitude (Quants+Technical)
3 Technical rounds
1 HR round
There were 30 question to solve in 30 minutes. Questions were from work and time, profit loss, time
and distance, pipes and cisterns, probability, Permutation and combbination, c,c++,DBMS etc.
3.Make a Queue using Stack.He asked to optimize number of push and pop operations.
1. Introduce yourself.
3.Write a program which takes decimal number as input and gives Roman number as output.
i/p: 43 o/p:XLIII
4. Design problem: Design database for facebook page subscribers. Write classes and functions
involved to implement this. Further he added to implement facebook notification system.
1.Write a program which takes a String and an Integer as input and gives output as follows:
2.Given an array of size n. It contains numbers in the range 1 to n+2.Each number in the range is
present in array except 2 numbers. Find the missing numbers.
4. Difference between compiler and interpreter. Advantage and disadvantage of each. Complete
working of compiler and interpreter.
7.What is fork system call. What will happen to the child process if parent process get terminated.
10.What is copy constructor? Why const keyword is used in copy constructor. Why reference is used
as parameter in copy constructor.Some more questions on operator overloading, type conversion etc.
Round 5: HR round
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/infoedge-interview-experience/
MakeMyTrip Interview Experience | Set 3
I recently got selected in Make my trip . Here is my interview experience.
Section A- Not very difficult to clear this round although less time was a problem.
Section B- It contains 15 multiple choice question on c/c++,java and 4 simple coding questions like
Sorting words in a large file , pseudo code for detect a loop in linked list and remove it.
1. Find out the subset of an array of continuous positive numbers from a larger array whose sum of of
the elements is larger in comparision to other subset. eg: {1,2 5 -7, 2 5} .The two subarrays are
{1,2,5} {2,5} and the ans is {1,2, 5} as its sum is larger than{2,5}
2. You have a 8*8 chess board and given a starting and final location of a knight.Find the shortest
possible path for the knight.
3. You are given two strings s1 and s2.Now, find the smallest substring in s1 containing all characters
of s2.
Round 3-(Interview-1)
It started with a discussion on the programs given in coding round.They asked me about my interest
field after that they directly jumped into Networking,Linux and Ethical Hacking part looking my
interest domain.
They asked me various question on networking and linux.Question were simple like Explain the OSI
model with examples,Port numbers of protocols like FTP,SMTP etc,How to send data of file into
another file in linux etc.
Then they asked me to code simple c program to reverse a linked list.
Round 4-(Interview-2)
This round was started with two puzzles.I got stuck in the first puzzle itself but in this round the
interviewer was checking our approcah,our logical thinking.
Then I was given one program and was asked to optimize it.Question was simple based on hashmap.
Next question was based on ethical hacking.I was asked to explain SQL attack.
The interview ended with some discussions over my project.
Round 5-(HR Round)
It was a simple HR round.Started with the discussion why do you want to join make my trip and then
some general HR questions.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/makemytrip-interview-experience-set-3/
Jabong Interview Experience for Software
Development Engineer
Jabong recently visited our campus. About 70 students gave the written test.
Round 1: (Written)
Part 1(MCQ) – 30 minutes, 25 questions. Questions were from DS,OOPS, DBMS, Quantitative.
Part 2 (coding test on paper) – 30 minutes, 5 questions. Standard gfg questions. 3 questions were
easy, rest 2 were of medium difficulty. I was able to do all of them.
Interview 1 – Since I had mentioned ‘design patterns’in my resume, I was asked about observer,
singleton and factory method pattern. I was asked to code them. Questions about my coding approach
in written round, discussed about optimizing my approach. I mentioned KMP algorithm during
discussion, was asked to explain it.
Interview 2 – Discussion about the projects I had worked on. I had to explain MVC architecture,
frameworks that I had used. Explained detail design of my work.
Interview 3 –He was some very senior person from organization. I was again asked about my
projects, challenges I faced and how I handled them. How I see Jabong growing in coming years. Any
expectations I had in technical field.
Interview 4:
HR round. We had casual discussion about everything other than work.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/jabong-interview-experience-software-development-engineer/
Amazon Interview Questions | Set 147
Written round:
1- Given a sorted array.Make a balanced binary tree from this array.
2- A row and column wise 2d sorted array is given which only contains 0s and 1s in each row. Find
the row which is having maximum number of ones.
3- Find the next greater elements in array.
Face to Face 1
1- Given a row and column wise 2d sorted array. FInd an elements in it.
2- Given a row and column wise 2d sorted array.Find the kth element in this array.
3. Given a tree T1 and T2.Find whether T2 is subtree of T1 or not.If not return -1.
Face to Face 2
1. Given a 2D rectangle.In this rectangle there is some blocked areas which are shown in shaded
part.Find the area which is left.Ex-like in this image one unbounded area is T1 and second is T2.You
have to find both areas differently and print it. Hint-Take each block as 1*1 and apply dfs for all
blocks.
2. A big unsorted array of numbers are given.Each number is big of almost 10bits.How to sort these
numbers?
Ans-Counting sort
3- An Adjacency matrix is given which is represented by 2d array.and each field is having cost
associated.You are also given source and destination points.Find the maximum cost to reach from
source to destination.
Face to Face 3
1. Discussion on work in my current company.
2. What is memory corruption,stack overflow,memory not available.
3. what is difference between multiprocessing and multithreading? Do all threads of one process is
having there own code,bss,stack and heap or it is common for all.
4. what is Tail recursion.How tail recursion works.
5. Can we overload a function by only changing its return type?
6. How virtual table works and lots of c++ concepts.
Given a set of words like Modi,MJ,Obama,Hillary Clinton.We need to create a intelligent computer
game so that it will popup minimum questions to find out the answer the player thought. For ex- If
give user choices to chose any word from Modi,MJ,Obama,Hillary Clinton.Now computer will show
popup from any of the tags.Like if user chose Modi then in this case computer should ask minimum
questions to find out what will be the guess.so in this case computer only askd “PM” tag and
computer will show the popup “Modi”.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-questions-set-147/
Amazon Interview Experience | Set 148
Round 1:
1. Incoming stream of characters () defines an onion of depth 1, (()) of 2. Find all onions with their in
an incoming stream of characters. Discuss complexity.
Stream can be (()) () )) ((( (
Resume Project:
i. Demonstrate High Level Design
3. Parking Lot Problem A, B , C lots with different car sizes. Efficient way of allocating available
slot.
A: Maintain linked list of available slots. Complexity discussion.
Round 2:
e.g.
1 1 1 0 0 0
1 1 0 0 0 0
1 1 1 1 1 1
1 1 1 0 0 0
1 1 1 1 0 0
2. How to find two sets(of size m,n) are dis-joint(have no elements common) efficiently
A: Use hash map. Complexity is O(n) in worst case.
Follow up Q: How are hash maps stored in memory?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-148/
Category: Interview Experiences Tags: Amazon
Amazon Interview Experience | Set 149
(On-Campus for Internship)
Round 1 (Online):
It had 20 MCQs and 2 coding questions for 90 minutes. Questions were from Operating Systems, Data
structures, Aptitude etc. Most of them were exactly same as on www.geeksquiz.com.
In MCQs there was – 0.25 marking for every wrong answer and +1 for right answer. Coding
questions were of 10 marks each.
Coding Questions:
Q2. You are given a phone keypad like following diagram, where each character corresponds to a
digit mentioned in the same box.
You are given n strings and you have to find their decimal representation. You have to print the string
and corresponding decimal representation in descending order. For example, if you are given
“amazon” then its corresponding decimal notation will be 262966. If more than one strings have same
decimal notation then you have to print them in the order in which input is given. The given string
consists of lower case alphabets only.
Test Case 1:
5
Amazon
Microsoft
Facebook
Aa
Bb
Output:
642767638 microsoft
32232665 facebook
262966 amazon
22 aa
22 bb
Example:
Inputs: 1->2->3->4->5->6->7->8 and k = 3
Output: 3->2->1->6->5->4->8->7
Q2. Given an array arr[] of integers, find out the maximum difference between any two elements such
that larger element appears after the smaller number in arr[]. Print the indices of the two elements
also.
Example: If array is [2, 3, 10, 6, 4, 8, 1] then returned value should be 8 (difference between 10 and
2). If array is [ 7, 9, 5, 6, 3, 2 ] then returned value should be 2 (difference between 7 and 9).
There was brief introduction. Then he asked some questions from my resume. He asked me to tell
about a project which I loved the most and felt proud after doing it successfully. He was interested in
knowing the details of the implementation in that project.
Q1. Given a string, find the longest substring without repeating characters. For example, the longest
substrings without repeating characters for “ABDEFGABEF” are “BDEFGA” and “DEFGAB”.
Q2. Given a log file of page visits of a website by different users for a day.
Design an efficient data structure which supports queries like the following:
Which page was visited by exactly 2 users in day?
Which page was visited by only one user exactly 2 times in a day?
Which page was visited by ‘User 3? more than 5 times in a day?
The overall interview experience was quite good. They wanted the most optimal solutions and gave
hints to think in that direction.
Tips:
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-149-campus-internship/
Amazon Interview Experience | Set 150
(SDE1 for 1 Year Experienced)
Telephonic:
Round 1
Round 2
2. Dont remember
Round 3
1.word frequency of a stream of words (no code required, explain trie method)
Round 4
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-150-sde1-1-year-experienced/
Telephonic Interview
Overview of my resume, current role responsibilities and asked to explain internship project in brief.
1. What is the definition of tree ?
2. What are the differences between graph and tree?
3. When can you say a graph to be a tree?
4. Write a program to show whether a graph is a tree or not using adjacency matrix.
Its always good to ask questions at the end. It shows our interest towards the company.
F2F 1
Overview of current job responsibilities and internship project.
1. Convert a tree to a sum tree.
Example :
1 27
/ \ / \
2 3 -------> 9 13
/ \ / \ / \ / \
4 5 6 7 0 0 0 0
F2F 2
Many questions regarding my current project, tools and technology I am working on.
1. Convert a binary tree to a sum tree . Here he had a new meaning of sum tree.
Example :
Example :
1 1
/ \ / \
2 3 -------> 2 5
/ \ / \ / \ / \
4 5 6 7 4 9 15 22
(I did it with Level Order Traversal) (Complete working code was required)
2. Given an array of integers. Find the largest 3 element. (Can be done using Max Heap in less time
complexity)
F2F 3
Lots of questions on my current work and tools which I was using.
Why do I want to leave my current company on such a short interval of 5 months.
Why Amazon ?
What inspires you to join Amazon? Why dream company ?
1. Connect Sibling pointers. I gave a Level Order Traversal solution. He asked to do it in O(1) space
complexity. I explained the approach but messed up In writing the working code for that.
2. Explain the approach of LRU cache and implement using object oriented language.
F2F 4
Why Amazon?
Why do you want to leave your current company in such a short interval?
Did u ask your current company to provide that type of work as u r looking in Amazon?
1. Design a system for finding the costliest element always whenever we pick up an element from a
box.(concept of Max Heap)
2. A stream of data is coming. Maintain records in a page and mechanism to see previous and next
page. (Concept of Doubly Linked List)
(It is always advisable to ask questions in design questions. The interviewers expect that we will be
asking questions for clarification)
What is thread?
What is the meaning of memory leakage?
Followed by many OS questions but I forgot.
In every round , after each question , complexity of the algorithm was asked. Its good to ask questions
to get more clarification about the question.
I want to thank the entire team of geeksforgeeks. It is a great portal and it helped me a lot in preparing
for Amazon interview.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-151-sde/
Amazon Interview Experience | Set 152
Amazon written round – Time 1 hour.
1. Given an array of 0s and 1s, find the position of 0 to be replaced with 1 to get longest continuous
sequence of 1s.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-152/
Q1. Given a stream of around billion numbers in an array, which has approximately only 1000 unique
numbers. Print the unique numbers. Complexity should be less than O(n).
Eg:
Input: 1,1,1,1,….2,2,2,…3,4,4,4,4……1111,1111,………..
Output : 1,2,3,4,1111
Q2: Write a program to print the frequency of all words in a given paragraph.
Q5: (Only theory) What data structures will you use to design a garbage collector.
Round 2: F2F
Q1: Given an array in which all numbers except two are repeated once. (i.e. we have 2n+2 numbers
and n numbers are occurring twice and remaining two have occurred once). Find those two numbers
in the most efficient way
Q 2 : Given a linked list with next and arbitrary pointers, clone it.
Q 3 : A lot of questions around Spring, Hibernate, REST, Dependency Injection, AOP etc.
Round 3: F2F
Thanks to geeksforgeeks for the awesome database of questions, that helped me clear the interview.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/makemytrip-interview-experience-set-4/
Goldman Sachs Interview Experience | Set
5
Goldman Sachs Interview Experience
Round1:
1. Introduce yourself and what are the projects you have worked on and detail discussion about the
most recent project.
2. Implement queue without using any data structure
3. Producer consumer problem
4. In one of the process you are making calls to three APIs. You don’t know how much time it will
take to return the results from those APIs. Design the system efficiently.
5. Design a parking lot system
6. What is lazy loading? Advantages and disadvantages of the same
Round2:
1. Detail discussion about the most recent project
2. Asked me about the favourite topic in C++. I told polymorphism and memory management. He
asked me about when a process start execution what are the different memory segments allocated to it
and how they are managed.
3. Implement smart pointer of your own.
4. Questions regarding virtual functions and its implementation and how its solves different design
problems.
Round3:
1. Introduce yourself and detail discussion about the current project
2. How will you implement your own garbage collector in C++?. Detail discussion regarding
approaches and their trade offs.
3. Puzzle: there are two candles and each candle take 30 minutes to burn. How will you measure 45
minutes? You dont have any instruments with you.
4. Design an olympic game
Round4:
1. Design a traffic light system
2. Discussion about the projects done
Round5:
1. What are the different libraries you have used in c++
2. Longest increasing subsequence and its implementation with dynamic programming
3. Quicksort and heapsort and which one of them you will choose
4. Difference between c++ and C#.
5. Why do you want to join Goldman Sachs and what will you bring to Goldman Sachs?
Round6:
1. Tell me about the work which you have done and about which you are most proud of
2. Detail discussion about the current project
3. Different types of collection in C# and difference between hashmap and hashtable and their internal
implementation
4. Difference between buffered IO and unbuffered IO. Advantages and disadvantages
5. How ajax works? Difference between angular js and jquery
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/goldman-sachs-interview-experience-set-5/
Kurukshetra about the MobiKwik Interview Process, how he managed to crack it and what are his
suggestions for aspirants looking to achieve something similar.
I was elated on achieving what I was actually waiting for , although I have been very choosy during
the placement session lately. Right after we got a positive reply from mobikwik my only dream was to
make to make it through. Mobikwik is the only Indian company of its type and it would be wonderful
to work along its growth.
TopTalent: What other offers did you get apart from Mobikwik?
Our college policy is such that once you have landed up a job in a dream company ,then you are not
allowed to sit for any other company. so , MobiKwik is the only dream job offer that I have got on-
campus.
The process of MobiKwik started with the online aptitude(quant ,aptitude and logical reasoning ) test
of duration 1 hour following the pre placement talks.This test was an elimination round.More than
half of the candidates were rejected after this. Second round was coding round with main focus on
output of the code (it was primarily focussed around Java) with few questions from basic data
structures.This was also an elimination round with around 10-12 students called for the technical
interview.
The coding round was followed by a technical interview round where the interviewer asked me a lot
of questions from the projects in my resume. Some easy questions on core java. Questions around
algorithm development and Puzzle solving. The interviewer gave me three questions to code.
He was happy to see Database ,SQL and Unix in my resume and asked me some command from Unix
system like nice,touch etc. He asked me to make a normalised database of Student Database in
college (main focus on library and Exam section) right from ER to normalized relational database.He
kept me asking questions regarding foreign key,primary key and the entity types and the reason for my
choice. Then he asked me to write many sql queries , he looked quite impressed. This database
normalisation and sql was followed by a lot of question from DBMS like Indexing,clustering,joins
and he kept moving into the details of Indexing and Clustering with other questions poping up in
between(cross questions on whatever I was explaining). This interview lasted for around 2 hours and
also this was the single longest interview I have seen on campus.
TopTalent: Can you give us a brief account of what you felt was the toughest interview?
I don’t think that any round was much difficult but if we compare all I think technical round was
difficult as compared to other rounds.
I have read
TopTalent: What kind of skills do you think helped you getting this Job?
Right from the school I have made it a point to focus on the basic concepts of the core subjects that
have helped me a lot in deciding what all I should put in my answers at the Interview. Besides this I
have done a lot of competitive programming at Codechef.com,Spoj.com and also I am the
representative of my college at Hackerearth.com. These two things have really helped me in clearing
this interview.
TopTalent: What resources did you consult? Where did you practice problems from?
Besides the one mentioned above , I have been doing competitive programming at
www.codechef.com
www.spoj.com
www.hackerearth.com
Yes , my grades were definitely a factor in getting me selected at the MobiKwik. I have a good
pointer record over 9.5 ,my interviewer appreciated my grades . But one should remember that at the
end your thought procedure is important for your selection at any good software development
company.
TopTalent: What’s your advice to students who are aiming for similar placement offers as yours?
Keep your basic concepts clear and don’t run after learning complex data structures. Feel what you
learn, and do what you enjoy.
In case you missed, you can also download his resume by logging in to your account.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/toptalent-interview-faraz-got-mobikwik/
Sapinet interview experience | Set 1(On-
campus)
1.Round Quant(30), Tech(30), vrbl(15), logical(15).2 hours
Tech.
Tell Me about yourself.
Explain your internship Project.(Related Question)
3.Write a function to find and eliminate circle from linked list.(I used brute-force method). Optimize
it
5.In stack push & pop opration take O(1) time. Write function FindMin() which finds minimum
element in stack with O(1) time complexity.
6. Then they asked me 2 puzzles from the puzzles that I have described below.
H.R
1. Tell me about Yourself.
2. where do you see yourself after 5 year?
3. Why do you want to join Sapient?
4. what projects did you do in clg?
5. Explain your Internship project(how you did it?,tools used? architecture etc.)
6. What are your hobbies?
These are the puzzles they were generally asking in the technical interview:
1. 3 men go into a hotel. The man behind the desk says a room is $30 so each man pays $10 and goes
to the room. A while later the man behind the desk realized the room was only $25 so he sent the
bellboy to the 3 guys’ room with $5. On the way the bellboy couldn’t figure out how to split $5 evenly
between 3 men, so he gave each man a $1 and kept the other $2 for himself. This meant that the 3 men
each paid $9 for the room, which is a total of $27 add the $2 that the bellboy kept = $29. Where is the
other dollar?
2. If I give you 4 tablets which contain 2 for fever and 2 for cold.All 4 have same size, shape and
color, No cover. You have to take 1 cold and 1 fever tablet right now. How will you choose
correctly?
3. How do you cut a circular cake into eight equal pieces in just 3 cuts?
5. You have three bags and three labels. One bag has only red balls, one has only blue balls and one
has both red and blue balls. Three labels are R, B and RB. R label was meant for the bag with only
red balls, B label was meant for the bag with only blue balls and RB for the bag with both red and
blue balls. Ram by mistake labelled the bags wrongly such that all the labels are wrong, how many
minimum number of balls he should pick and from what bags to correct the labels? It is given that
each bag has unlimited number of balls to be picked.
6. You are given 2 eggs.You have access to a 100-storey sapient building.Eggs can be very hard or
very fragile means it may break if dropped from the first floor or may not even break if dropped from
100 th floor.Both eggs are identical. You need to figure out the highest floor of a 100-storey Sapient
building an egg can be dropped without breaking. Now the question is how many drops you need to
make. You are allowed to break 2 eggs in the process
7. A frog is at the bottom of the well which is 60 meters deep. Everyday the frog jumps 3 meters
upwards and fall 2 meters down. How many days it will take for the frog to reach the top?
8. You have two ropes/candels. Each takes exactly 60 minutes to burn. They are made of different
material so even though they take the same amount of time to burn, they burn at separate rates. In
addition, each rope/candles burns inconsistently. How do you measure out exactly 45 minutes?
10. You have three bags and three labels. One bag has only apples, one has only oranges and one has
both apples and oranges. Three labels are Ap,Or and ApOr.Ap label was meant for the bag with only
Apples, Or label was meant for the bag with only blue Orange and ApOr for the bag with both Apples
and Oranges.By mistake labelled the bags wrongly such that all the labels are wrong, how many
minimum number of fruit he should pick and from what bags to correct the labels? It is given that each
bag has unlimited number of fruit to be picked.
11. You have 4 wine bottles, one of which is poisoned. You want to determine which bottle is
poisoned by feeding the wines to the rats. How many minimum rats are necessary to find the poisoned
bottle?
12. Rajeev is trapped at top a building 200m high. He has with him a rope 150m long. There is a hook
at the top where he stands. Looking down, he notices that midway between him and the ground, at a
height of 100m, there is a ledge with another hook. In his pocket lies a knife.how might he be able to
come down using the rope, the two hooks and the knife?
13. You are given a 100 integers and these integers are in the range of 1 to 100. There are no
duplicates in list. One of the integers is missing.Find the missing integer. What if 2 no is missing?
14. You are at an unmarked intersection… one way is the City of Lies and another way is the City of
Truth. Citizens of the City of Lies always lie. Citizens of the City of Truth always tell the truth. A
citizen of one of those cities (you don’t know which) is at the intersection. What question could you
ask to them to find the way to the City of Truth?
15. Three coworkers would like to know their average salary. How can they do it, without disclosing
their own salaries to other two?
16. How many runs a single player can score in One day match (50 overs/ 300 balls)… No ‘no
balls’, no wides, no extras, no over throws.So how much runs he can score max?
17. If all players of a cricket team were out first ball, which player would be the last person not out?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/sapinet-interview-experience-set-1on-campus/
Amazon Interview Experience | Set 152
(Kindle Team SDE-1 )
Recently I have participated in Amazon SDE interview for Chennai location Kindle team. Kindle
team has arrived Bangalore location to take drive.
3) Create Regular expression and String Matching program for ? and *, where. * means any null or
character may appear instead *. and ? means one or more previous character may appear in string.
example
input :
AM*AZO?N*, AMAZON
AM*AZO?N*, ABAZOO
Both are matching as per rules of ? and *.
After removing several candidates from process they conducted second round written.
1) Stoke prices are given in array. Find for which duration I can buy and sell Shares to get maximum
profit.
We need to first explain our method and then star writing code.
– After this round some 20 candidates left.
They discussed for all this 4 questions and why I choose to write this answer, some modification in
question to see whether u can think more in deep , or several conditions changed, and they asked to
redesign/rewrite answer.
Q2) Find Leader in Array ( Leader means an element which is higher than all number which are
indexed higher than element )
Solution Traverse array from behind to find such elements (simple method)
Q3) K sorted Linked Lists are given sort them in one ( write sudeo code )
Then he told me to give logic to solve question without using auxiliary array ( result array )
I did with in-place method, searching and storing nodes in one linkedlist only.
Different strategies discueed, He was impressed with my another method to find new array location
based upon array size N and D.
-OS fundamentals
like fork, child process creation and output if I use fork().
What is deadlock, write sample C code to create deadlock.
What is mutex, etc.
SQL Fundamentals.
Data Structure used in Query,
Sample Query like finding Manger’s name and Fundamentals of join
-Design GAME.
GAME is like two players are fighting and ( kind of street fighter ) and design class diagrams and
methods for this GAME, I can think any functionalists(like health, power, help from friend, etc ) any
extra thing apart from which he mentioned.
Last Question was, If I want to store student data such that some students took Physics, some took
Chemistry and some took both. I want to know all details of students, mark, name etc also. which way
I’ll implement this system, which Data Structure will be used, and which design pattern.
After All this round I was told to go home and Hiring Manager Round will be taken onsite at Chennai,
I was told.
One fine day I got change to give Project Manager round over phone ( they said Senior Manager will
take onsite round and then HR round will be there)
Again for 20 days I didnt got call from HR and when I used to mail him, He simply replied that my
candidature is on hold as Senior Manager is not free to take my next round.
And Today Again I got call that I am rejected. because Hiring Manager is not convinced from my
approach in round,
I still don’t know what went wrong as both code given to HM were working.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-152-kindle-team-sde-1/
Flipkart Interview | Set 16
1st round ( machine coding round)
Write down code in any language for a simple employee hierarchy which has 3 types of employees.
1. CEO
2. Manager
3. employee
where an employee can have only 1 mgr, and a mgr has 1+ employees.
We were asked to input employee details(name ,id, salary,rating etc) in any order (employees might
be input before his manager), create the hierarchy and implement these functionality:
1. Print hierarchy given any employee/mgr/ceo (used an n-ary tree + hash table)
2. Given a bonus and performance rating of each employee divide it to the lowest level employees(in
the hierarchy ) in the ratio of their rating. i.e 100 divided among 2:3 is 40 and 60. and print the bonus
of each ( simple recursive solution)
3. Top 10 employees with ratio of bonus:salary (used maxheap)
Write working code, modular, extensible, corner case handling etc. was arnd 1.5 – 2 hrs
2nd round
discussion on your solution of the 1st round, how can you optimize it, then review of the written code
3rd round
Ds and algo
1. snakes and ladders problem
2. median in a stream of integers
3. string searching (KMP / suffix tree was needed : not code just the logic)
4. Given any language , you use libraries , which might use more lib etc . Find the order of building
the libraries (Topological sort)
5. Given a server with a stack with some initial state say 1 Users can modify the stack using regular
ops eg push 2 , pop etc and each op causes a version change. i.e version 1 : 1 , version 2 : 2,1 ,
version 3 : 3,2,1 , version 4 : 2,
You have to design it s.t person can ask for any version of the stack (keep copies every k times and
keep the ops in an nonvolatile memory)
4th round
Design a new kind of an online poker game
give all entities and relationships in depth
further in depth discussion of how to make it more HA friendly, how to
handle players crashing etc
5th round
HM round
in depth discussion of projects and general questions eg when you disagreed with your mgr etc
Process was crisp and took place from 10am – 5 pm on a weekend in Bangalore
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-set-16/
Amazon Interview Experience | Set 153
(For SDE1)
Recently I had interview with amazon.com for SDE1 position for 1+ year experience. It was kindle
team.
Q2. Given a string, write a program to find longest length palindrome from that given string. You can
swap the characters of given string.
Q3. http://www.geeksforgeeks.org/count-possible-decodings-given-digit-sequence/
Q3. Given sorted array, write program to generate balanced binary search tree from given array.
Q2. In a party there are total n persons are there. every person is having one gift with him. Every
person will give his gift to another such that every person at the end has exactly one gift. Any one can
give his gift to anyone. say 5 people (A,B,C,D,E).
A–>D
D–>C
C–>E
B–>A
E–>B
write a program to generate a random sequence. for every run, code should generate different
sequence with equal probability. lots of discussion was there on various approaches. finally with the
help of interviewer i wrote O(n) time solution with O(1) space. Hint: selection sort
Q1. Given a file having many words. Given K, find the words appearing >=K times. Lots of
discussion was there, discussed many approaches.
Q2. Design data structure that supports insert(), remove(), find-max(), delete-max() operations. All
operations should run in O(1) time. Lots of discussion was there, discussed many approaches.
Q3. Given two link-list that represents polynomial. Write program to multiply both polynomial ,
return result as new link-list.
Q4. Write program to find max size BST from given binary tree. Algorithm and full working code
was required for all the problems. Discussed space and time complexity of every problem.
Still hiring manager round and senior manager rounds are there. Once completed i will post
Tips: Discuss various approaches with interviewer. Try to interact continuously with interviewer.
they were very friendly during interview.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-153-sde1/
Microsoft Interview Experience | Set 40
(Off-Campus)
I got mail one day that I have an Interview scheduled on next day in Bangalore.
Round 1 onsite:
I think this round was just to check whether I take care of all boundary cases for problems and also
my speed? Problems were quite easy then what I expected but they made it very lengthy to check my
speed
Q1: You have given an array of 0’s and 1’s. Write the code to swap only two elements in the array so
the number formed by this array keeping all the elements in same order should be largest one.
Now he modified the question: Let’s say instead of array, a number is given. Swap two bits of this
number find out the maximum number formed after swapping thse two bits
Again he modified that Lets the array elements are decimal numbers (Not 0s and 1s). Swap two
elements and find out maximum no formed. Write the code.
Again he modified the same questions that lets say a number is given, swap two digits of the number
and find the maximum number formed by it.
He was just checking my coding speed and making sure whether I check all boundary cases.
Q2: Pairwise swap elements of a given linked list (of course by changing links). After looking at my
code he said that I have made a segmentation fault but I try to convince him that I wrote the code
correctly and he was convinced.
After this round HR got a mixed feedback so he decided to go ahead with my next round.
Round 2:
This round was basically focusing on my problem solving abilities. Coding was not tough but thinking
and approach was critical.
Q1: A directed graph was given. I had to make a function which take a value of node as input and
print all the nodes which had incident edge on the input node and also print all nodes to which input
node has a direct edge. He kept ignoring the solutions I told because he wanted it to solve in a
particular way.
Q2 : Find the largest rectangular area in a Histogram. I read this question long before but couldn’t
remember it but fortunately I was able to solve it with few difficulties.
Round 3:
Q1: basics of computer science: Multithreading, long discussion on dynamic memory allocations,
memory leak, some OS fundamentals. Some compiler design questions where he helped me and
finally we reached to the solution.
Q2: You have a stream with millions of words in it. Find most frequent 10 words in that stream at
every instance
Q3: How will you store a very big number if it can’t be store in any data type?
Round 4:
This was a designed round and interviewer was principal development manager.
Again round started with ‘tell me about yourself and the work in the current Organization’.
Question 1: He opened the site msn.com and asked me to design a part of ‘stockscreener’ hierarchy
using my OOPs and MVC understanding. And asked me write a class which will show the user that if
stock market is open or closed. If it is closed then I have to print when the market is going to open in
future. To find the future date he gave me a list of Holidays, Half days and obviously market will be
closed on Weekends. So store this information in a proper Data structure and use it in finding future
date.
Q2: For a Sudoku game, I had to design a screen using OOPs and MVC understanding. Where a
column can be empty where you can put a editable number in future or an editable number which you
can change as per your requirement or a fixed number(inserted by system only and user can’t change
them). This question was an easy one so hardly took 15 minutes.
Q3: Simplest of all, for a given BST I had to print all the number in ascending order which lies in a
given range in best possible optimum way.
Round 5:
This was the last round and the interviewer was ‘Partner Development Manager’. I knew he has veto
power and today he is the one who will decide my fate, so I was more nervous and conscious but he
made me so comfortable and welcomed. For first 10 minutes or so we were just chatting about our
views on movies and asked me who do I think most underrated actor in Bollywood? I said Jimmy
Shergill and he said he also think the same.
Asked about my college life and achievements? What is the biggest achievement so far? Why do I
have less percentage in 10th class? Why are you changing the company?
Q1: There are N people in a room and one of them is a celebrity. In the room everyone knows the
celebrity and celebrity doesn’t know anyone in the room. You have 1 question ‘do you know him?’
and you can ask this question N times to anyone in the room. The person to whom you are asking
question will reply ‘Yes, I know this guy’ or ‘No, I don’t know this guy’. By asking the same question
N times to whoever you want to ask you have to figure out who is celebrity in the room. If A knows B
doesn’t mean B knows A.
After that He asked my 2-3 more puzzles which I knew already and I told him so he asked the solution
and moved on.
Q2: A Matrix of 1s and 0s is given, all zeros are water and 1s are land, first find out the number of
ponds in the array (Reverse of islands problem). If one change can convert 1s in to zero then find out
minimum number of changes that we need to make so that there will be only one pond in matrix.
In the end, he asked me whether I am preparing for other interviews or higher study so I knew all the
puzzles. I said No but I like puzzles and I am good in them.
This was all. A big thanks to GEEKSFORGEEKS, you guys made our life so easy. You are Google
for me as far as an interview preparation is concerned.?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-40-off-campus/
Hike Interview Experience | Set 4 (Off-
Campus for SDE1)
Written round :
We all were required to write a code for LRU implementation with proper Locks and synchronization
so as it is thread safe.
Round1:-
1. Interviewer had a look at my CV for about 10 minutes and asked lot of questions of my work in
current job.
2. Then a coding question that “Given a cartesian x-y plane and lot of points in that plane with x and y
coordinates and 1 more point(say x,y) is given, so we have to find all the points in that plane which
are lying in a radius of length r from point (x,y)”
3. Questions on Java :- Why synchronised block needed? and some more questions on Multithreading
in Java.
Round2:-
1. Some DB queries to write for the tables provided by interviewer
2. Implement Inorder Traversal with and without using recursion.
3. How does Stack work internally and what data it holds?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/hike-interview-experience-set-4-off-campus-sde1/
Round 2:-
1. Find missing element in an array of elements from 0 to n-1. Different approaches asked(about 3 to
4 approaches)?
2. What is connection pooling.
3. Asked some questions on multithreading in Java.
4. How to implement Critical section in Java and on which variable?
5. Some Questions on Java, Database, Hibernate in general
6. Stock Buy Sell to Maximize Profit
http://www.geeksforgeeks.org/stock-buy-sell/
problem was modification of above problem. I dont remember the actual problem exactly.
Round 3:-
1. Given a wood of some size. It burns from 1 end to another and takes 30 min. How to burn the same
wood in 15 min.? (Answer :- Burn the same wood from both end at same time.)
2. Asked many questions about work in current workplace.
Round 4:-
1. How my current job work can be used in Quickr?
2. Some more questions asked related to work done in current job and how can it be useful in Quikr?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/quikr-interview-experience-software-engineer-position-bangalore/
Round 2:
1. Check if tree T1 is a subset of tree T2.
2. find Kth minimum element in a row-wise and column-wise sorted 2-d array.
Round 3:
1. Project Role and related discussion
2. Find distance between two nodes in a binary tree.
Round 4:
1. Design an Email client. should be having all features of email-client.
2. Transfer one file data from one PC to another PC. To transfer data some network entity is being
used which cost some value. You need to reduce this cost of transferring the data. —> I used
compression technique to replace repetitive data with some key on first PC and put it back on another
PC.
3. How smart mobile/tv apps gets updated
4. Project role.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-154-sde2/
On 30th November. things were unexpectedly looking very rosy for me. I was shortlisted for
interviews with almost all the companies which I had applied for based on my performance in their
tests or my academic profile. I had got interviews with 8 companies in the whole day. It was
definitely more than what a sane guy could handle. While planning for the order in which I would
give the interviews, I decided to go based on my realistic chances of selection in them and not get
carried away by my fancies and their fanciness. GS had always been my dream company, not only
because it pays a hefty sum of money as salary, but because the best among the best had chosen it
during previous years. There is no better parameter to judge a company than its people, and GS was
definitely ahead of others according to my judgement.
During my school years, I had always known that I was the smartest kid in my classroom. But that was
definitely not the case in IIT where everybody comes after passing through a certain filtering process,
where CPIs can be deceptive and where the laziest student could be the dark horse in the race. Every
student of IIT is a combination of crass intelligence and “ability” to work hard. Since GS had
shortlisted 69 candidates other than me, the realistic chances of me making through GS were rather
less compared to other companies which had much shorter lists. I placed GS after 2 other companies
(which also extended me job offers later) in my preference for interview timings. After revising
basics of CS subjects and my projects, I was all set to face the battle with reasonable amount of
confidence.
*2*
On the fateful day, Goldman Sachs started its interview process quite early at 12 am. My name
appeared somewhere in the middle of the interview schedule list at 4.00 am which is the time when
my body is adapted to go to sleep. I had not slept in 2 days because of the way our placement office
had planned technical tests. All this meant that I would go to interview with tiredness from past 3
days. The test venue was highly charged with all sorts of energies. There were many people who had
already appeared for few rounds and, by then, had somehow figured out that they had been selected.
For many of them, this turned out to be a mere speculation later. I had heard that GS did not take other
candidates seriously if they had found suitable ones already(This turned out to be a wrong notion
later). I had a reason to worry. Going by their talks, there were many people in the corridor who had
landed the job already.
The interview process was running behind scheduled time. The panel took a break, which meant I
was not going to be interviewed up until 6 am. At 6:10am, my name was called. My interviewer
looked very weary after having participated in 6 hours long process already. A quick tricky question
was asked about the Fibonacci series. I understood the question differently and gave solution to a
more difficult problem. This got interviewer excited in interviewing me. I gained some confidence
and insisted that I be given chance to solve original problem which I solved in no time. General
resume discussion happened. I was asked how I thought GS made money. I realized that I had done a
blunder by not researching the company properly before coming for the interviews. Nonetheless,
reading pink newspapers helped. I answered the question. The interviewer was impressed, and so
was I, with myself.
Without a pause, I was called for second round of interview. Since the interviewer was interviewing
a filtered candidate, he looked more serious. General discussion on polity issues, macro economics
and my course projects followed. Being aware of and having strong views on many public issues
helped. The interviewer looked impressed with my answers. Then interviewer came to the actual
business. A puzzle question was asked. I knew that it was a fairly popular puzzle but had never
attempted it. This was my second big mistake that I had committed before coming for interviews.
Although I like solving puzzles and solve one or two here and there, I had not practiced and mugged
them up in a way that other serious candidates would have done. But it seemed that I was destiny’s
own child that day. The solution struck my mind. I later found out that that was indeed the standard
solution to the problem. Interviewer wrote something on my resume and asked me to wait to be called
for third round.
In third round, the interviewer laid resume on table without folding and I could see what other
interviewers had written about me. “Strong yes” it read on the top. I felt good about it. I told
interviewer that I had done a course in algorithmic game theory. He asked some game theory
questions which I answered. I knew I had nailed it. I was literally on high.
Between third and fourth(final) round, I gave interviews to some other companies. The difficulty
level of those interviews and my interest in them were nowhere close to the GS interviews. In fact, I
felt bored during some interviews. I realized how much I wanted to be a part of GS already. I got a
call for fourth and final round of GS interview. While chanting Hanuman Chalisa quietly in my heart, I
realized that I had forgotten it. I had not prayed in a long time and felt guilt for treating God so
selfishly, and took a mental note to make amends later. I needed divine intervention to help me to
recall anything that I might need during the interview and to think clearly.
The interview started without any needless talks. Once again, a puzzle was asked. I knew the solution
to it and thought that I could bluff my interviewer by pretending that I did not. He called my bluff by
asking a more difficult problem. It was loosely phrased. It was the first and only problem which I
could not solve. But interviewer did not show any signs of disappointment. A strategy question was
asked. I gave an algorithmic solution to it. He asked me to code it which I did. The interviewer
looked happy.
Without wasting a moment, I moved to give interviews to other companies leaving everything else in
the hands of GS people and God. At the end of first slot of interviews, I came to know that I had
multiple offers and more choices in hand than I had imagined. It did not take me even a minute to
choose Goldman Sachs. My life had taken a surprising turn which I had not thought about till that
moment. I had become a part of the rich legacy which Goldman and Sachs had founded in 1869.
Questions:
Round 1:
1. Given S(n) and F(n), two functions which compute sum of n Fibonacci numbers and nth Fibonacci
number respectively in constant time. Write a function which computes sum of odd Fibonacci numbers
in constant time.
2. Now write a function to compute sum of Fibonacci numbers at odd indices in constant time.
Round 2:
1. N door puzzle. ith user changes state of doors which are multiples of i. Calculate number of doors
opened in the end.
2. Some fairly simple DP coding problem(I don’t remember exact one).
Round 3:
Design a game (Automaton) for a betting scenario. Bet is either doubled or lost completely depending
on whether you win or lose. Suppose you bet on team A constantly in a 2 team game, how much
money you need initially so that you either win $100 or lose all at the end of game after 4 rounds.
Round 4:
1. randN function : which generates random number in [1,2,3..N] with equal probability. Given rand5,
write a code for rand7 using rand5.
3. A strategy question. It would be asked depending on which team you are being interviewed
for.Mine was some apple seller problem. Here knowledge of real world scenario helps. Advice is to
observe things around you rationally.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/goldman-sachs-interview-experience-set-5-campus/
Walmart Labs Interview Experience
There was 1 coding round and 4 F2F interviews. This was for Software Developer Position(Note:-It
was not for the research division in Walmart Labs)
Coding Round:-
There were 2 coding questions given in this round. The platform used is Hacker rank and we have to
complete both questions in their office only in 1 hour. Usage of internet is strictly prohibited.
1. Find Maximum sum in an array such that no 2 elements are adjacent. In this, 1 more condition was
also there that first and last elements should also not be taken together. This question was
modification of
http://www.geeksforgeeks.org/maximum-sum-such-that-no-two-elements-are-adjacent/
2. In a cartesian plane, there are N tanks and M objects placed. Tanks can fire in 4 directions (N, S,
E, W). Position of tanks and objects are given as input and are fixed. We have to find a way to give
directions to N tanks such that they will not hit any object and any other tanks. If a tank can fire in 2
directions, then a direction whose ASCII code is lesser will be given preference.Example:-
Input :-
N=2
M=3
Position of tanks
(0,0)
(1,1)
Position of Objects
(0,2)
(0,-2)
(-2,0)
Round 1:-
1. Intersection and Intersection Point in 2 Linked List.
2. Questions on Multithreading in Java. About synchronised block, etc.
3. Why JVM is platform independent.
4. Difference between Java and C++.
5. Write a code for building a heap and explain its time complexity
6. k largest elements in an array
7. Some Questions on String datatype in Java
Round 2:-
1. Design a complete Railway Reservation System. Following things are checked in code:-
a. Object Oriented Programming
b. Design Patterns used(if any)
c. Are use cases are optimised or not?
2. Question on LRU cache implementation
Round 3:-
1. Design a data structure which provides following APIs:-
a. insert element in O(1)
b. delete an element in O(1)
c. find a random element in O(1)
2. Some questions on Java basics.
3. Some discussion on projects done in current job.
4. Got 1 feedback that my knowledge of Java is not so good. So, if we hire you, then what will be
your strategy to improve on your Java skills.
Round 4:-
1. Why do you want to join Walmart Labs?
2. What are the biggest challenges faced by me in my current job.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/walmart-labs-interview-experience/
Goldman Sachs Interview Experience | Set
6
Hi, I recently interviewed with Goldman Sachs, and had 4 rounds of interview with them at their
campus in Bangalore.
Q1. Check if a linked list with 2n+1 elements is a palindrome without using any extra space.
Q2. Given an excel sheet with column names mapped to column numbers as follows :
Now write a function to return the column name for a given column number.
This round did not have any DS and algorithm questions. I was asked in detail about my project. Then
had a lot of questions around java script and java. About different design patterns and web services.
Q1: Given a stack of unsorted characters, and an empty stack, without using any extra space sort the
stack elements and place them into the empty stack.
Q2: Print all nodes at a distance k from a given node.
Q3: A lot of questions around java, collections frameworks, multi threading and so on. (This took a
good 25-30 minutes )
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/goldman-sachs-interview-experience-set-6/
Amazon Interview Experience | Set 155
(On-Campus)
Recently Amazon came to our campus as a part of our campus recruitment.
Online Round:
This was conducted on hacker rank. Test duration was 1.5 hrs
There were around 22 MCQs related to OS, OOPs C Input/Output questions. GeeksQuiz is sufficient
to answer these questions.
First Round:
Started off with a basic “Tell me about yourself” question. This round is just to check if you really are
capable. He asked me three questions and asked me to implement all of them on paper.
1) You are given an array and a number c. Ouput all pairs a, b whose sum is equal to c. O(n) is
expected.
2) You are given a number represented by a linked list add one to it.
I told him the obvious reversing the list and add one to it. But he wanted me to do it without reversing
and using recursion.
3) You are given a sorted array, find majority element in it. If there is no such element output -1. You
have to do it in single o(logn) operation.
Extension to the third question: What if the array is not sorted? Provide an o(n) solution.
Second round:
This was for about 2 hours. Although there were only two questions but the interviewer is checking if
we have enough knowledge on all the data structures.
1) You are given a long array and window size w. You can only view elements that are currently in
the window. Window starts at the extreme left and moves one position at a time to the right. You are
required to output minimum numbers in the current window.
All the possible approaches were discussed. Starting from brute force, o(nw) to o(nlogw) using
heaps, BSTs. He asked me to implement them. But he was not satisfied with o(nlogw) solution. He
wanted me to give a o(n) solution. Finally after few hints I’ve solved it using doubly linked lists.
2) You are given a binary tree. Print the vertical order traversal starting from the root element.
Third Round:
Started off with the question “Explain one project of yours”. Few technical questions were asked on
the project.
Few questions on OS, Multithreading vs Multiprocessing were asked. Also he asked me to tell if I
have implemented any program that used multi threading. Few questions on semaphores and mutexes
were asked.
Only one coding question in this round
1) You are given a very large binary tree, return the root node of the largest BST in the given tree.
Single traversal solution is expected. Implementing it on paper was little difficult than expected.
Fourth Round:
By this time, job offer was almost confirm.
He asked questions on my projects. He asked me to implement few algorithms from my project on a
paper.
1) Implement a graph and one graph traversal using oops.
2) Given an immutable(non editable) linked list and a number k, remove all occurrences of the
number in the list.
Few questions on OOPs were asked.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-155-campus/
Nvidia Interview | Set 3 (On Campus)
I had a campus interview of Nvidia Software profile for their infrastructure team at Bangalore and
here is my experience.
Written Test
15 questions on C/C++ that dealt with Bit manipulations, C++ concepts, Virtual functions, abstract
classes, output programs, extern variables, Compilation errors etc.
Around 10 questions on Data structures that had questions from sorting, heaps, and other concepts of
DS.
Around 8 questions on OS that included questions on semaphores, TLB, threads, process scheduling
etc.
8 questions on analytical ability that included a few quantitative puzzles and some logical reasoning.
Overall the level of questions were good as all of them made us think.
Interviews were conducted by 2 separate teams. Each team interviewed a candidate at most once.
Round 1:
Before entering the room they had analyzed my CV.
1) Why are your grades low in the first few sems? I explained that I did a few projects that diverted
my focus from academics.
2) They noticed that I had published a paper in electronics so they asked me to explain in depth the
work done for it.
3) Questions on a few more projects.
4) Find the 3/4th node in a linked list.
5) Which of the following sorting algorithms uses the least number of swap operations. a. Heapsort b.
Selection sort c. Quicksort d. Insertion sort
I had answered this question incorrectly in my written test so had to find the correct solution in front
of them.
6) Memory map of a C program.
7) Concepts of C++ like Virtual functions, Inheritance, Constructors, static variables etc.
8) How are virtual functions actually implemented. Ans- Virtual pointer table
9) Given two different processes wanting to read each others variables that were defined in their
source code. How can we implement that?
10) Do you want to go for higher education?
11) I was asked that even though I had a strong hardware profile why was I interested in NVIDIA
software. I replied that both of my skillsets were strong and would be put to good use at NVIDIA
which works on both of them.
11) A few more DS questions that I don’t remember.
Round 2:
This was taken by a senior engineer
1) Tell me about yourself. I tried to show them that I am passionate for NVIDIA.
2) What is NVIDIA CUDA? I was asked this as I had mentioned it in my resume.
3) Write a sample program in CUDA. I wrote a reduce function to sum an array.
4) How do we synchronize threads in CUDA?
5) Find output of a given program which had static variables in recursion.
6) I had mentioned that I simulated multi-planetary orbits in a project and interviewer looked
particularly interested in it so I was asked questions about ellipses, their foci. radius and eccentricity.
7) Explain how virtual functions works by writing a sample program.
8) What are virtual destructors? (I had no idea)
9) Give an example of runtime polymorphism in C++. I said we can achieve this using function
pointers. Not sure if correct.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/nvidia-interview-set-3-campus/
My Interview experience of Service Now
USA
Service Now visited our campus for both offers at Hyderabad and USA. I sat for the international
interview procedure on day 0 of our campus. Here is my interview experience.
MCQ questions were from all core subjects (30 questions : 45 Minute) The questions I remember I
updated here
https://docs.google.com/document/d/1L1IrxEp4ZS8F72t6QqeT8zEYVVe8c7M5ndQWi3J0K1Q/edit#
2nd round:
2. http://www.geeksforgeeks.org/dynamic-programming-set-11-egg-dropping-puzzle/
What is the solution to the problem with 100 storeys and 2 eggs?
3. How do we find count of numbers between (a,b) both inclusive with no consecutive ones in the
binary representation? They asked me 3 different approaches for this problem.
5. A question about builder pattern where I had to create a pizza having veg or non-veg crust ,
different sauce topping , different crust draw the class diagram and write a code calculating total
cost?
6. Difference between abstract class and interface what is the problem if I use abstract class when
there are no implemented methods?
7. If a variable is protected in parent class and another variable with same name with public is
declared in child class is this allowed is the reverse also allowed and how would you access parents
variable in child class?
8. Detecting a loop in a singly linked list what are the stopping condition if there is no loop?
9. In a circularly linked list how would you ensure at least one node is left always even if you
remove all the nodes ? Ans :insert a dummy node at the start.
2. How to reduce the time of booting of the processor where we have no control on hardware
devices but can only modify software (he was looking for more points here)?
3. There are 9 balls one ball is lighter out of them and we have a balance how would you find
lighter ball in 2 weightings? (I told i knew this question so he moved on)
4. As all of my internship projects are on the back end with no design projects he asked me if I
Had done any front end design projects? I said no.
5. General HR questions like Introduce yourself, Why would you want to join Service Now,
Where do you see yourself after 5 years?
I would like to thank Geeks for Geeks very much which helped me during the time of preparation for
placements.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/interview-experience-service-now-usa/
VISA Inc. Interview Experience (On-
Campus)
Visa Inc. came to our campus for placements. There was one written round (mettl.com) and 3 PI
rounds.
Written Round
The written tests covered almost every aspect of computer science – Programming, CO, OS, DBMS,
ML etc. In addition to just using it as a cutoff for interview shortlist, they had also done an extensive
analysis of each and every candidate (We could see pie charts for each section during our
interviews).
1. Given a plane and n lines, what are the maximum number of regions formed (Solution: Lazy
Caterer’s Sequence)
2. Given an array of numbers, find the largest subarray of numbers to be negated to obtain the
maximum sum.
for ex: -1 -2 7 -8 10 -3 -4 -5
PI Rounds:
Round 1
1) What do you think about Mobile Apps for Visa? (They had exactly one US position for this
domain)
2) What is your project? If you are going to deploy this for commercial use, what additional
aspects to be taken care of?
6) What kind of bugs were fixed in project? How were they fixed?
2) What kind of data mining can be done on VISA data? What are the uses?
3) What kind of position, are you interested in? ( Multiple profiles were available. It is important
to know atleast one or two of them)
Final Note: Resume is very important. I was questioned about each and every point, I had written in
my resume.
I would like to thank the GeeksForGeeks admins for maintaining such an awesome website.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/visa-inc-interview-experience-campus/
InMobi Interview Eexperience | Set 2 (On-
Campus)
InMobi visited our campus twice, once for the written round, then for the personal interviews of the
shortlisted candidates.
————————————————————-
Written Round :
http://programmers.stackexchange.com/questions/260972/kth-optimal-path-in-a-matrix
————————————————————–
Oncampus-
————————————————————–
—————————————————————
* Wildcard Matching
https://oj.leetcode.com/problems/wildcard-matching/
* Some bhaukaal question on graph.
* Discussion about Trie data structure, T9 dictionary.
—————————————————————
Finally HR Round
—————————————————————
I follow GeeksforGeeks religiously and it helped me a lot! Hope this experience helps you too
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/inmobi-interview-eexperience-set-2on-campus/
Interview Experience at Optimus
Information Inc.
The company conducted an off-campus drive.
Round 2 – HR interview.
It was just a lookup to see if the candidate isn’t dumb.
After this, candidates who cleared the two stages were called in the office.
Rounds at Optimus –
Round 1 – Surprisingly, another written test followed but the pattern was exactly the same. Difficulty
level was also similar.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/interview-experience-optimus-information-inc/
VISA Inc. Interview Experience | Set 2 (On-
Campus)
Visa Inc. (On – Campus, Day 1)
Preliminary Round :
75 minutes Test on Mettle.
Assessment Composition:
1. Coding Skills: 2 Questions
2. Programming: 10 Questions
3. Machine Learning Hadoop MCQ: 6 Questions
4. Networking MCQ: 6 Questions
5. Operating System: 6 Questions
6. Infrastructure: 6 Questions
7. Application Security: 6 Questions
On Campus procedure :
Round 1 :
– Projects, Internship
– Asymmetric and Symmetric encryption with some real world usage
– Concepts behind Digital Signature and Digital Certificates
– Detailed discussion on HTTPS
– Basic OS concepts : Threads, Mutex , Semaphores
– Basic OOPS concepts : Virtual functions , Function overloading and overriding , encapsulation.
Round 2:
– Projects , Internship
– Some discussion on Testing and how you would design a unit test case and a complete project test
case. Discussion on Automated Testing.
– How does a Web application work.
– Software Development Models
– Discussion on interpreted language and compiled language
– Some DBMS basics for efficiency :- Indexing viz. B+trees , Hashing.
– Some discussion on Apple Pay , VbV (Verified by Visa) (informal)
Round 3 :
– Typical HR questions.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/visa-inc-interview-experience-set-2-campus/
Online Round :
3 coding Questions in 1 hour :
1. We have to implement int getIntComplement(int N) function , that will give complement (bitwise
complement. ) of b a given integer . Start unsetting from the left most set bit of the number. 0 Interview
Rounds :
Round 1 : Completely Resume based and Design problems
1. Design a work flow model of the entire work done in your internship.
2. Design a workflow model of any one of the projects you did. Grilling session.
3. A design problem of the sorts : You need to present a ppt to say N users who are viewing it live in
their browsers. What you have is a web page where the ppt is opened and has say two buttons : next
and previous. You need to design basically what will happen / how will pressing of the buttons
reflect a change across all the users.( He wanted something as to how the DNS on processing the next
request would change the URL and convey it to all connected users)
4. A map based design for implementing a code to check for isomorphic words in a file. Efficient
approach.
5. http://www.geeksforgeeks.org/design-and-implement-special-stack-data-structure/
Round 3 : Coding
1. http://www.geeksforgeeks.org/serialize-deserialize-binary-tree/
2. http://spin.atomicobject.com/2014/08/11/fisher-yates-shuffle-randomization-algorithm/
(Algorithm + mathematical aspects related to eqqual probability )
3. http://www.wikiwand.com/en/Rolling_hash —> Had used this in my algorithm project and was
hence asked
Round 4 :
Don’t remember all the questions I was asked. Large set of questions pertaining to DBMS.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/linkedin-interview-experience-set-3-campus/
Linkedin Interview Experience | Set 4 (On-
Campus)
ONLINE ROUND:
3 coding Questions in 1 hour :
1) Given a binary search tree and a key, if found return 1 else -1.
2) Given a string find the number of distinct substrings (should optimise time and space complexity)
3) Given a string finf the number of distinct palindromic substrings(should optimise time complexity)
INTERVIEW ROUNDS:
Interview 1:
1) Given a boolean expression find the number of ways to paranthasise it so that it evaluates to true
2) http://www.geeksforgeeks.org/dynamic-programming-set-31-optimal-strategy-for-a-game/
3) Given n stairs , you climb 1 , 2 or 3 stairs at a time . Find the number of ways to reach the nth step
Interview 2:
1) Given the pointer to the root of the tree and two values val1 and val2 . Find the length of path
between the values val1 and val2 in the binary tree. { handle corner cases where both the values are
on the same path}
2) Given a mapping between numbers and alphabets . Find the number of ways to decode a sequence
of numbers
eg: a - 21 b - 2 c - 54 d - 5 e -4 f-1
2154
1) ac
2) ade
3) bfc
4) bfde
4 ways to decode
Interview 3:
1) Given a matrix of 0 s and 1 s Find the number of connected components having 1s
0 0 1 0 1
0 1 1 0 1
0 0 0 1 1
0 0 1 1 0
2) Given a tree check if it is a binary search tree or not constraints: space complexity O(1)
Interview 4: (HR+Technical)
Overall the experience was good and the interviewers were friendly. I would like to thank
geeksforgeeks.org which helped me throughout my preparation.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/linkedin-interview-experience-set-4-campus/
Microsoft Interview Experience | Set 41
(On-Campus)
MCQ Round:
15 MCQS were asked on c,c++, OS.
Coding Round:
1) Given a linked list of co-ordinates where adjacent points either form a vertical line or a horizontal
line. Delete points from the linked list which are in the middle of the line
Eg:
(0,10) -> (1,10)->(5,10) -> (10,10)
|
(10,5) -> (20,5) -> (40,5)
should be changed to
(0,10) -> (10,10)
|
(10,5) ->(40,5)
The code should be written on paper and should be error free. No extra space should be used.
Interview 1:
1) Given a linkedlist of moves of 2 players in tic-tac-toe game . Find who has won the game.
Interview 2:
1) Given a pile of 9 objects. 2 players take turns to pick 1 , 2 or 3 objects . The last one to pick is the
looser. What is the winning strategy? wining strategy for 9 coins
2) Asked to how to design a cache for dns records. I have told different approaches like First-in-
First-Out, less frequently used,least recently used… He asked me to tell the strategy and code it. I
told LRU and implemented this.
http://www.geeksforgeeks.org/implement-lru-cache/
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-41-campus/
Coding questions:
1) Given a graph. Find if a cycle exists and print the nodes in the cycle. If multiple cycles exists print
the cycle starting from the lowest index
Interview 1:
1) Find the diameter in given tree which can start at any node and can end
at any node and should have only single turn.
10
/ \
5 8
5-10-8 has two turns
10
/ \
45 56
/ \ \
10 20 45
2) http://www.geeksforgeeks.org/find-number-of-islands/
Interview 2:
1) http://www.geeksforgeeks.org/dynamic-programming-set-32-word-break-problem/
2) http://www.geeksforgeeks.org/given-array-strings-find-strings-can-chained-form-circle/
3) What datastructure will you use for designing lift
4) Efficient data structure for minimsing the following operations if we have an array arr[0 . . . n-1].
a) Add a value x to array from index l to r where 0
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-156-campus/
Accolite Interview | Set 2 (On-Campus)
Accolite came to our campus for recruitment.
Tech Round 1: First of all interviewer see my resume then asked about the projects that I have done.
1. He asked to write a program to print right view of binary tree. First he asked me approach. I told
him two approach one iterative and other recursive .Then he asked to write code for iterative version
considering all corner cases.
2. He write an array A[n][2],where n is no row , Ist column contains child node and 2nd column
contain parent node. A node can have any no of child. You have to find no of distinct groups.e.g.
A1 A
A2 A
A3 A
A21 A2
A31 A3
A22 A3
A33 A3
B1 B
C2 C
O/P is 3 because when we create graph between parent and child then no of disconnect graph will be
3.I
told him to create a graph then find no of disconnect components using DFS but he asked to solve
without creating graph i.e. only using the given matrix. Then I told him an approach he was satisfied
with that.
Tech Round 2: In this round interviewer was a very cool and friendly person. When I entered into the
room he was doing something with his laptop and then he asked about me after that he he draw a
picture and asked my opinion on that.
1. Row and column wise sorted matrix was given you have to find kth smallest element. I know the
solution but I said him push all elements to min heap and then pop min from heap k times then he
asked me to optimize it .Then I told him using min heap of size k then asked me write the code I
couldn’t write complete code he said ok u.
2. 3 balance are given and weight on each balance and weight of each balance is given .then 3rd
balance is kept on right side of 2nd balance and 2nd balance is kept of right side of 1st balance .I
have to find how weight I need to balance all the 3 balances.
I told him approach then he said write the code as quick as possible. I completed the code and then go
through my code and said go for next round.
Tech Round 3: In this round interviewer was very serious. 1st he go through my resume and then
asked about myself. Then he asked do u know java I said NO .then asked about my projects that I’ve
done.
1. He asked to find root to leaf path having path sum equal to K.
2. Merge two sorted linked list.
HR ROUND: This round was just for formality. She(HR) asked me that what do u know about
ACCOLITE,
I told him something about the company and asked why ACCOLITE ,my strength weakness
etc……….
After this round only I was left and waiting for results
Finally she called me, all the interviewer were present in room and they said u have done well up to
this level but they some doubts choose a language JAVA C OR C++ I choose C.I was given a plane
paper asked me solve it.
THIS WAS JUST A PRANK AND THE EVERY LAUGH AND SAID U R SELECTED AND then
everyone congratulated me and gave me some goodies……………..
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/accolite-interview-set-2-campus/
Target Corporation Interview Experience |
Set 1 (On-Campus)
ONLINE ROUND
31 Questions in 60 minutes.
30 Quantitative and Computer Fundamentals Questions
1 Coding Question:
Obtain the number of Trailing zeroes in the factorial of a given number N.
Interview 1: (Technical)
1) Remove Duplicate from an array.
2) Explain Merge Sort and Quick Sort.
3) What Data Structure does Quick Sort remind you of?
4) Given a number N find the nearest perfect square.
eg:
i/p : 17
o/p : 16
5) Questions about my projects.
Overall Experience was Very Good and the Interviewers were the very friendly.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/target-corporation-interview-experience-set-1-campus/
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/servicenow-interview-experience-set-3-campus/
Category: Interview Experiences Tags: Service Now
Amazon Interview Experience | Set 157
(On-Campus)
Online Round
Initially a test was conducted on hackerrank on the basis of which students were shortlisted. The test
contained 22 questions, 20 Gate like MCQ’s and 2 Programming questions. The MCQ’s were on
OS(page replacement policies), output, trees etc.
2) Given 3 numbers in the form of linked list. Give the sum of the 3 numbers as another linked list.
Example: 1->2->3 + 2->1->3 + 3->2->1 = 6->5->7.
A slight variation to this question :
http://www.geeksforgeeks.org/sum-of-two-linked-lists/
They shortlisted around 30 people for the interviews. Since some of them got placed on day 1, they
were extending the shortlist on realtime also. There were 4 rounds in total. Every round was an
elimination round. In each round, I was asked to explain the algorithm as well as implement it on
the paper. Every interview started with the typical “tell me about yourself” ice-breaker.
Round 1 (Technical)
1) Finding LCA in BST.
http://www.geeksforgeeks.org/lowest-common-ancestor-in-a-binary-search-tree/
3) http://www.geeksforgeeks.org/a-product-array-puzzle/
Round 2 (Technical)
1) http://www.geeksforgeeks.org/print-a-given-matrix-in-spiral-form/
2) You are given ‘n’ appointments. Each appointment contains startime and endtime. You have to
return all conflicting appointments.
3) Some basic discussion on memoization and dynamic programming.
Round 4 (Technical)
1) Rotating an array. (All approaches)
http://www.geeksforgeeks.org/program-for-array-rotation-continued-reversal-algorithm/
http://www.geeksforgeeks.org/array-rotation/
2) http://www.geeksforgeeks.org/search-an-element-i n-a-sorted-and-pivoted-array/
In all the interviews, the approach is seen, so taking out loud what you are thinking is must. Its good to
point out the problem(s) that are the crux of the question and solving it would lead to the final
solution. The interviewers are always very helpful, they give hints whenever required. Just being
calm, composed and patient during & between interviews and studying geeksforgeeks will do the
work.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-157-campus/
Interview Experience with Synopsys - On
Campus
1st Round:
MCQ test consisting of 60 question from Quantitative Aptitude, Logical Ability, C, C++, Algorithm,
Data structures, Digital Design.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/interview-experience-synopsys-campus/
Interview :
It was a three rounds affair. Two technical followed by an HR (good thing is they let you know who
all are there for the next round, so that you don’t waste your time much around there).
Round 1: It’ll range from the very very basics of programming to the toughest of DPs. In between
questions were being popped up on your projects. If you’ve some worth-discussing developement
projects in your resume (like I’ve my BTP and an Android game), substantial amount of time goes in
discussing that. The questions I was asked were :
fibonacci series (both recursion and memoisation and why memoisation solution is better than
than recursion).
Tree traversals and write the codes for inorder and postorder WITHOUT RECURSION
(prepare very well for this without recursion solution as many companies ask).
simple 0,1 – knapsack DP
http://www.geeksforgeeks.org/largest-rectangle-under-histogram/(I managed a O(n2) solution
there)
Propose a datastructure which you’ll use to implement the swipe feature in today’s keyboards
(came with a decent enough solution though the complexity was bad)
The last two questions were almost unanswerable from my side, but the key thing is DON’T GIVE
UP. They’re looking for people who don’t give up a fight. And at the end, if interview went decent
enought, ASK for the solutions of the unsolved questions.
Round 2: Director (search) had come along with the recruitment team this time. So, he was only
taking the rounds for all the candidates in this round. Summary, two questions, one I managed
somehow other one way beyond my comprehension.
You’ve a universe of infinite pointsm seperated by finite measurable distances. Give me the most
efficient solution to find a pair of points that have the minimum distance in the entire universe. (I
proposed Flloyd Warshell, but these are inifinte points, not finite)
I’ve to find a point in a 2D matrix which is sorted row-wise left to right and column-wise top-
bottom. This has to be done in O(n + n) complexity. This is a standard question, but I just
couldn’t remember the procedure. And since he was sitting in front of me all the time,
pressurized, I came up with some solution using Binary search.
After these two, he asked me if I’d any questions for him. I asked about the work culture and what
kind of people he was looking for. It’ll give you an idea whether you’re selected or not. Be eager to
hear the answer he gives and feel attracted to the prospects he puts forward about the company!
AGAIN IMPORTANT, DON’T GIVE UP ANY QUESTION. UNTIL HE DECIDES TO MOVE
ON TO THE NEXT. If you’re not able to come up with a solution. Don’t panic. Show your fighting
spirit.
Round 3: HR. Be well prepared with your strengths and weaknesses. Be prepared with questions
like:
if your colleague is slow in catching up and deadline is fast approaching, what will you do?
your manager from the beginning has set high expectations on you and you’ve proved your worth
to him. But one time, he assigned you something which no matter how much you try you just can’t
understand and you’ve gone blank! What will you do in this case then?
MOST IMPORTANT here is DO NOT FAKE your personality here. They’re HR guys, they’re
trained to catch the FAKE ones. So, be genuine and APNI DIL KI BAAT BOLNA!
BEST OF LUCK!
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/snapdeal-software-interview-experience-set-1-campus/
Amazon Interview Experience | Set 158
(Off-Campus)
Recently I appeared in for off-campus Amazon Interviews for SDE position and here is my
experience.
Q1. Given a string you need to print all possible strings that can be made by placing spaces (zero or
one) in between them. For example : ABC -> A BC, AB C, ABC, A B C
Q2. Given a tree where there are three pointers (left_pointer, right_pointer and a next_right_pointer).
Left and right pointers are set like that of any general binary tree. We were asked to set the
next_right_pointer to the next node in the level order traversal for the same level. This implies means
for the last node in every level it will be null for rest it will be pointer to the next node in level order
traversal.
Q1. There is a 12 km road and a contractor who is in-charge of repairing it. Contractor updates you
about the work which is done in patches. Like “Road between 3.2 km to 7.9 km repaired ”, “Road
between 1.21 km to 3.2 km repaired”. You have a manager who enquires about the longest continuous
patch so far. It was a long discussion and I gave solution in O(nlogn) where n is the number of
updates by the contractor.
Q1. There are billions and billions of stars and at any point of time you need to tell the closest million
to earth. In what way I should take input for the stars and what all do I need to represent one. I used
heap of a million size. Then he also asked about the different approach when I can’t use so much of
physical memory for heap.
Q2. Implementation of Least Recently Used Cache. I started with O(n) solution using queue and ended
up with O(1) solution using heap and doubly linked list.
Q3. Basically it was from snakes and ladders game. There is n x n matrix and you are at starting
position. What is the no. of ways to reach n-square position if your next move will be dependent on
number on dice? You have been given information about ladders (there are no snakes J ). I used DP.
There were few others that we didn’t discuss as I told him that I know solution to them.
Round 4: 1 hour
Q1. Write an efficient program to count number tree structures that can be made using n number of
nodes.
Basically T(n)=summation (T(i) * T(n-i-1)). I used DP as there are a lot of sub-problems used again
and again. O(n2) .
Q2. There are n nuts and n bolts represented in two different arrays and a function is_fit(nut_i, bolt_j)
which returns 0 if its perfectly fit, 1 if it’s a tight fit and -1 if its loose fit. I was asked to arrange them
so that every nut fits perfectly with the bolt in the same position (there is one nut for every bolt that
fits perfectly). I suggested O(nlogn) solution.
Q3. Find the kth largest element in a BST. Well that was easy J
We discussed about projects and he asked reasons for leaving present company.
Most of the questions were behavioral questions like dealing with manager in case of conflicts,
reasons for leaving present company, why would you choose Amazon and not Flipkart if you have
offers from both, about my projects and contribution to present company.
Q1. How to know the time between someone writes Amazon.com and the page appears on his
browser for a particular user. I impressed him by suggesting to use dummy request packets after the
page is loaded completely sending the time J.
Q2. He showed me the Amazon page they were working at that time and I asked me to suggest 5
changes in 5 minutes.
Q3.http://www.geeksforgeeks.org/find-a-tour-that-visits-all-stations/
I messed up with the solution in the beginning but reached to solution eventually.
TIPS:
1. Don’t jump into solutions, ask about the type of input that is given and output that is expected.
2. The interviewer always tries to take you to the most optimal solution so listen to what all he says.
Many a times they are big hints !!!
3.Be honest.
4. Keep believing that you will get the job J.
I would like to thank geeksforgeeks team for such an amazing platform to learn and discuss with other
geeks.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-158-off-campus/
Bharti SoftBank (Portal Team) Interview
Experience (Off-Campus)
I was interviewed for Android Developer.
Round 1 :
Discussion about Android basics and Java.
Optimized technique to fetch ListViews from database v(assuming you have no temp buffer)
ListView Recycling
Image caching
Questions on cache in Android
They give you a problem to implement in 3 hours. We can use any language, any library or any
framework.
After the implementation, the interviewer saw the whole code, discussed the whole logic. Asked
about optimizations which can be added.
I was even asked to implement the optimization (adding Thread Workers and concurrency) after going
back and send him the code.
Round 3 : (with CTO)
Behavioral questions – Tell me about yourself, your projects, why do you join BSB, etc.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/bharti-softbank-portal-team-interview-experience-off-campus/
[TopTalent.in] Exclusive Rapid Fire
Interview with Deepali Who Got Into
Facebook
Even if we were to search around the world, it would be a truly difficult job to find someone like
Deepali. As a Computer Science Graduate of IIT Bombay, she successfully bagged a job offer from
an astounding company – Facebook. Even though it’s a rare feat, she doesn’t consider it a rare one.
We at TopTalent.in got a chance to interact with Deepali Adlakha from IIT Bombay about what made
this possible and what others can learn from this.
In case you are wondering how the resume of a Facebook recruit looks like, you can download the
resume by logging in.
I don’t consider it as a ‘rare’ feat, many people have got such good offers in both present and past.
TopTalent: What other offers did you get apart from Facebook?
Facebook was one among my top preferences, I got the offer from Facebook and hence I was out of
the placement process. So, one does not get more than one offer.
Facebook had one coding test, after which there were three rounds of interview. All the interviews
tested your technical knowledge.
TopTalent: Can you give us a brief account of what you felt was the toughest interview?
I gave interviews to Facebook, Google and Microsoft. In all interviews, the student is tested on
his/her thought process, how he/she arrives at the answer rather than just the answer.
I practised coding, answering algorithmic design questions. I had a rough overview of all my courses,
hence I didn’t spend much time revising them.
TopTalent: What kind of skills do you think helped you getting this job?
A student should know how to code, both on paper and on the system, that is it.
TopTalent: What resources did you consult? Where did you practice problems from?
Good grades is definitely a plus point, but it is neither necessary nor sufficient.
TopTalent: What’s your advice to students who are aiming for similar placement offers as yours?
Relax and prepare hard. You will get what you wish for.
Incase you forgot, you can download the resume by logging in.
This article is powered by TopTalent.in – A high end Job portal for students and alumni of Premier
Colleges in India. Sign up now for free exclusive access to top notch jobs in India and abroad. Get in
touch with them via facebook, twitter or linkedin. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/toptalent-exclusive-rapid-fire-interview-deepali-got-facebook/
Amazon Interview Experience | Set 159
(Off-Campus)
I recently got an offer from Amazon Delhi. Here goes my interview experience.
Telephonic Round
Q1. Find kth element from the end of a singly linked list.
Q2. Given an array (not sorted) of integers and a number S, find a pair in the array whose sum is
equal to S. I gave the sorting solution and was asked to write the code for the sorting algorithm I used.
I had used in-place merge sort.
F2F Delhi
1st round:
Q1. Detailed discussion on all possible data structures which can be used to implement a set with no
duplicates and which supports add, delete and find operations in minimum space & time complexity. I
suggested using hashing, BST or array. They asked me to give an example of a hash function which
supports uniform distribution but is not collision free. Was asked to write codes for add, delete and
find operations using BST.
2nd Round:
Q1. Rotate an image represented by a 2D matrix by 90 degree.
Q2. Given a singly linked list of 0s and 1s, sort it keeping the order intact. I gave O(N) time and O(1)
space complexity solution.
3rd Round:
Q1. Discussion on projects and previous work.
Q2. Given stock prices of several days, find the two days so that buying the stock on 1 and selling it
on another gives the maximum profit. O(N) time and O(1) space soln was expected.
Q3. Given a doubly linked list, reverse every 2 nodes. E.g. 1->2->3->4 will become 2->1->4->3
Q4. Several questions on OS, OOP, A few are what is segmentation fault, describe the design patterns
you know.
4th Round:
This round was Bar-raiser round. A bit tricky.
Q1. Detailed discussion on projects, best project you have got, the most challenging work, strengths,
weaknesses etc.
Q2. Given a dump of items sold in a file (not organized), give the top n items sold. Eg. the file looks
like:
< item1 sold >
< item2 sold >
< item1 sold >
< item9 sold >
Also, there might be same items sold but they might have different names because of different
vendors. So you also need to count them together (Hint: Use ids of the items).
Hint: Use grep command to get the counts.
Q3. Collect email-ids of all the persons above 18 yrs in a city. He wanted to see my way of thinking
and how do I use software approach towards daily life problems.
Q4. There is a signal and two way traffic. Cars are coming @rate 10 cars/sec. Signal remains
green/red for 10 secs and when the signal is green, 10 cars/min can cross the signal. You need to tell
how many cars are in the line waiting behind the signal on both sides during a particular time. Say
you run the simulator at time 0, now after 1 hour you need to tell the no. of cars waiting on both the
sides.
I didn’t get selected after this but got a call after 1 month as they wanted to reconsider my profile.
F2F Hyderabad
1st Round:
Q1. Some discussion on previous work.
Q2. Given a sorted array S of characters say S= {‘a’,’d’,’g’}, you need to find the insertion point of a
given character in it such that if it is less than ‘a’, insertion point is 0, if between ‘a’ and ‘d’, insertion
point is 1 and if greater than ‘g’, again the insertion point should be 0. O(log n) time soln was
expected.
Q3. Given a complete binary tree, connect nodes at the same level without using any extra space.
Q4. Given a dictionary of unknown language, you need to give the sorted sequence of characters in it.
E.g.
Dictionary looks like:
ABCDE
CF
DG
so the output may look like: ABCDEFG
Hint: Topological sort
2nd Round:
Q1. Given two arrays S1 and S2 of characters. You need to find the smallest length of substring in S1
which contains all the characters of S2. Characters need not be in the same order as in S2. Characters
might be repeating in S1.
Q2. Given a dictionary like text file, find n top occurring words in it i.e. n words whose count is the
maximum. Hint: Use Hashing and Min-Heap.
I would like to thank geeksforgeeks as it helped me a lot while preparing for the interviews.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-159-off-campus/
Prop Tiger Interview Experience
Written:
Question 1. Suppose u have given a string like 123456342184321 and second string like 1234. Find
all permutations of second string (1234) in first string. You have to give count of all the permutations.
So for above example, first is:1234 second is 3421 third is 4321, hence output shud be 3.
Qestion 2. MS Excel columns has a pattern like A, B, C, … ,Z, AA, AB, AC,…. ,AZ, BA, BB, … ZZ,
AAA, AAB ….. etc. In other words, column 1 is named as “A”, column 2 as “B”, column 27 as
“AA”. Find Excel column name from a given column number like 705 AAC.
Interview.
Questions on Redblack tree , binary search tree,maximum continuous subarray, maximum subarray
with alternative index, more questions on array.
You have given number of notes like 1,5,10,20..make some amount using minimum number of
notes(write code for it), questions on linked list, tree, mirror image of binary tree, Trie data structure,
ancestor of a given node in binary search tree,how tcp ip network works complete working
,comparison of tcp and udp where they can be used etc.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/prop-tiger-interview-experience/
Adobe Interview Experience | Set 18 (For
WBT Profile)
Following is my Interview experience in Adobe Bangalore for the profile of White Box Test
Engineer.
Written Round
There were two parts technical and aptitude
1. Aptitude questions(MCQ) were fairly easy,simple mathematical,geometrical problems,profit and
loss etc Also Logical questions with paragraph..(R.S. aggarwal is enough)
2. 30 Technical question(MCQ) related to C and C++ , 2 programming questions(String permutation
and Reversing linked list) , one question about two phase commit protocol and difference between
hub and switch
After 30 days of long wait, I got call that I have been shortlisted for the Further rounds.
F-2-F Round 1:
After this Next 2 rounds are video conferencing(V.C.) rounds as Hiring was for Noida campus.
After this he briefly explain the Job profile in which I have to work if I got selected. He also asked
about testing methodology that I have been doing in my current company.
F-2-F Round 3 H.R.:
After Hiring manager round, There was H.R. round. He was a really cool guy. He asked me about
previous interviews how it went. Then he asked me about my long term plans if i got selected, about
my family, My qualifications etc.
V.C. Round 4:
1. Write a C code for converting a string from a2b2c5 to aabbccccc. Then make it generalize. Various
Test cases of it
2. About testing tool that i used in my current company, Various functionality of It.
3. Puzzle : There is a pond in which there is x kg ice on 1st November, it becomes 2x on 2nd
November then 4x,8x,16x,32x and so on.Like this whole pond is filled with ice on last day i.e. 30th
November. On which day pond was filled with half the ice ?
4. Puzzle: you have 100 coins on table, 60 heads and 40 tails. With your eyes closed, how can you
separate the coins into 2 groups such that each group has same number of tails.
Many C/C++ concept were discussed on this round like friend function, Inheritance etc.
F-2-F round 5:
1. About some commands in UNIX , use of wild card character etc. Then he asked me how you open
notepad without using mouse.(simple),then he explain the internal logic behind this like what will
happen if you press ctrl+s,ctrl+o etc. After this He gave me array of strings such that each string must
have ‘$’ character, I have to write a C code to find whether there exist two strings having same
character just after $.(also simple).
2. Difference object oriented concept like function overloading. why C does not support function
overloading as there is a concept of variable number of arguments in C? , explain with example.
3. Different searching methods and its complexity, Hashing. How you search words in dictionary?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-experience-set-18-wbt-profile/
PayU Interview Experience | Set 4 (For
Fresher)
Here’s my interview experience at PayU india (fresher).
Round 1
Firstly, a discussion of projects in resume and a detailed chat on my internship
1. Search for an element in a pivoted array. (Only logic and pseudo code )
2. Find middle node of a linked list. (Tested a lot by asking questions)
5. Was asked to design corpus search engine. He told me the basics and I gave ideas based on what I
could think of . (Came close to a good design)
Round 2
Again, a detailed discussion on projects and internship. This round had very less DSA.
3. Asked about semaphores, race conditions, deadlock etc. Asked me to implement a situation.
4. Databases – Gave some data in the form of tables and asked questions on inner join, normalization
etc.
5. Again a very hard puzzle, can’t remember it. (Was not common )
This round didn’t go well as I was not good at OS and DBMS. So, prepare those sections as well
apart from DSA. I was rejected after this round.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/payu-interview-experience-set-4-fresher/
Qubole Interview Experience
Here’s my experience of Qubole interview.
Input:
Was csv files of fb users data.
OO code was required which had a good design and was well commented.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/qubole-interview-experience/
Round 1
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/housing-com-interview-experience/
Essay writing :
2 topics were there write any one of them (300 words).
Interview:
1 hrs discussion on the code given in written round, explain complete code ,find any mistake correct
it (i did one mistake so i corrected that ).
Puzzle :
1. A chess board is given (as we know that it is having black and white color ) . Now u are allowed
to choose any shape (like 2 by 2 or 4 by 6) ..if u choose any shape then black color become white and
white become black..so now at the end u need complete chess board black color ….how many
selections u will do (minimum).
2.You have 3 baskets, one with apples, one with oranges and one with both apples and oranges
mixed. Each basket is closed and is labeled with ‘Apples’, ‘Oranges’ and ‘Apples and Oranges’.
However, each of these labels is always placed incorrectly. How would you pick only one fruit from
a basket to place the labels correctly on all the baskets?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/global-analytics-interview-experience/
Citrix R&D Interview Experience | Set 3
(On-Campus)
Written Tests:-
There was a 1 hr aptitude test & 1 hour coding round. The aptitude test had simple questions on
c/cpp, Networking, OS etc. and some general quantitative aptitude questions.
The coding round had 2 questions to be done in an hour.
Q1: A matrix of 1s & 0s are given, you have to find no of groups of adjacent 1s. Adjacency was
based on 8-connectedness. (Finding no of components in an undirected graph) (Islanding problem :-
http://www.geeksforgeeks.org/find-number-of-islands/)
Q2: A number is given and you had to translate it to string form (Indian system – lakhs, crores etc. not
millions, billions etc .) The word “and” had to be added at the appropriate place (after 100s place if
there was a digit in 10s or 1s place)
101 => one hundred and one
2311 => two thousand three hundred and eleven
900020 => nine lakh and twenty
35 => thirty five
3 => three
1Round 1(Technical)(45 mins):-
How are you today?
(While scrutinizing my resume) Tell me about yourself?
Why Software, Why not Electrical?
Which language do you prefer.? C or java(As majority of my work was in Android development, I
told her java)
Which data structures do you like most? (I told her Linked Lists and trees)
Write any code of any data structure? (She wanted to check if I’m not bluffing them by writing data
structures as my area of interest). I wrote the code in C.
She started to pick some projects of mine and also asking me to explain them
What is a web server?
How do you connect your android app to a web server?
Full form of http? (I dodged that by saying I’m not into networking)
Any Questions for us.?
-> I asked them as the company’s name suggests what research work they do.?
-> How would I be contributing to research work, If I’m hired.?
-> Is there any chance of getting promoted to Citrix U.S ?
-> What kind of work environment is there in Citrix.?
She gave me a hint that she was impressed by my work and I’d be interviewed for the second round
Tips/Advices:-
They were mainly looking for guys who had done lots of projects in software. In the whole interview
process they only focused on my projects and fundamentals of java. They didn’t ask me anything that’s
not in my resume. So, Don’t write anything in your resume that you’re not confident about. They just
want you to have sound basic concepts.
Thanks GeeksforGeeks.!
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/citrix-rd-interview-experience-set-3-campus/
Housing.com Interview Experience | Set 2
I was recently interviewed by housing.com and received the offer. Following is my experience.
In each interview , a link was shared where a full running code was required.
A web crawler is crawling is wiki pages, how to store each page and apply phrase search in all the
pages. Lots of discussion on Database schema and search algorithms that can be applied
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/housing-com-interview-experience-set-2/
First Round: Written round 15 Aptitude + 25 Technical MCQs (c++ (mainly output qs), 2 questions
on socket, 1 on IPC, 1 on Database in 1 hour. The qs were little above average.
After 1 hour they announced results. They shortlisted half of the people.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/brocade-interview-experience/
Category: Interview Experiences Tags: Brocade
UHG(United Health Group) Interview
Experience
UHG (United Health Group) came to our campus for software developer profile.
Technical Interview 1:
Discussed in detail my projects. They thoroughly went through my resume and asked questions.
a) Whole database design of one of my project. Asked some SQL queries also.
b) You are given a triangle with height h and base length b and a square of side length a. How many
squares can you fit in triangle? Need to derive formula.
c) A pattern matching problem with special characters. He wanted the full working code. Similar
question: http://www.geeksforgeeks.org/wildcard-character-matching/
Technical Interview 2:
This interview was mostly based on my B.Tech Project on Artificial Intelligence. He also asked many
fundamental questions related to AI and Machine Learning. For e.g. what is SVM (Support Vector
Machines), ANN(Artificial Neural Networks), GP(Genetic Programming) and differences between
them and how it is better than linear regression? He also asked few java OOPS questions.
In all, my interview experience was quite nice. Both interviewers were very helpful and cooperative.
Practice writing code on piece of paper. That will help a lot.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/uhgunited-health-group-interview-experience/
2) Algorithm Test:
3) Technical Round 1:
2. A circle is inscribed in a square( coordinates top left corner (0,0) ). Coordinates of a point on the
circle is given . Calculate the area of circle
3. Write a code to reverse the sequence of words in a sentence . For eg: Input Array: I_AM_A_BOY
Output Array: BOY_A_AM_I , you can’t use extra array . Input array is the only array that can be
used.
4) Technical Round 2:
2. Write a code to find the given linked list is Circular or not ? Then find the node where it is getting
circular
Other random questions like on: new technologies like clouding , knowledge about different
languages , data structures and algorithms etc.
5) Communication Test
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/maq-software-interview-experience-set-3/
Amazon Interview Experience | Set 160
(For SDE 2)
Amazon sde2 experience:
Telephonic round :
Design a site similar to junglee.com. Assume you are given a crawler, design a distributed system ,
what ds will you use , some basic api’s etc.
Onsite:
coding round 1:
1. zig zag traversal of binary tree O(n) algo
2. matrix question:
given matrix like :
abed
bcfe
abdd
….
find the longest path of consecutive alphabets given a starting alphabet. You can move in all 8
directions. for eg. a->b(right)->c(down)->d(diagnal down)… len = 4 , find max such len
coding round 2:
1. is binary tree balanced : O(n) time algo
2. given a pre and post order kindof a traversal (2 arrays) create an n-ary treee out of it with struct of
the form :
struct node {
int data;
struct node *child[MAX];
int child_num;
}
did it using a hash table of linked lists and storing parents . Might be a btr way not sure.
design round 4:
1. Give Object oriented design for the snake game (that was in old nokia phones) . only class and obj
diag was needed, no code/implementation. it should have extensibility to accomodate different types
of fruits, (eg one gives + 5 len + 10 pts) it should be scalable to diff platforms
2. Give an architecture diagram with all entities and relationships of a multi user wysiwyg editor .
basically a web interface to multiple authors who can edit and store their docs . multiple ppl should
be able to save it at once . also ownership should be present for documents.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-160-sde-2/
Athena Health Interview Experience | Set 2
Round 1:
10 Aptitude questions with difficulty level hard.
Round 2:
3 programs given. 1st one mandatory.
1) Replace wild cards with all possible combinations of zeros and ones.
2) Triplet problem.
Array = {2,3,7,6,8,9} and k=6.
{2,3,6} (2×3 = 6)
{3,2,6} (3×2 = 6)
Round 3(F2F):
Questions about previous projects done and my roles on it and my leadership capabilities.
Discussed about triplet problem done in round 2 and how to tweak my algorithm to avoid getting
redundant entries.
Round 4(F2F):
Level order traversal of a tree and discussed about time and space complexity of both
techniques(Using Queue and recursive technique)
http://www.geeksforgeeks.org/level-order-tree-traversal/
Array of 0’s and 1’s. Move 0’s to left and 1’s to right side.
http://www.geeksforgeeks.org/segregate-0s-and-1s-in-an-array-by-traversing-array-once/
Given an array of integers, replace every element with the next greatest element (greatest element on
the right side) in the array. {16, 17, 4, 3, 5, 2} = {17, 5, 5, 5, 2, -1}
http://www.geeksforgeeks.org/replace-every-element-with-the-greatest-on-right-side/
Difference between Tree and Trie data structure along with implementation of Trie and real time
examples.
Questions on data structure for implementing dictionary and its pros and cons.
Discussed about logic I used in 2nd round for wild card permutation question and discussed time
complexity of it.
Round 5(F2F):
Given 3 points in below triangle, find wheather these 3 points are forming equalaterial triangle?
(5,12,14) = true
(6,18,22) = true
(2,11,15) = false
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
16 17 18 19 20 21
and so on..
Aptitude problems from first round and how i understood and approached towards solution
Deep discussion about 8 queens problem and its solution(I used backtracking approach)
Round 6(F2F):
1. There is a sequence of bytes coming. after every instance I need to check wheather that number can
be devisible by 3 or not. Need turing machine diagram and approach.
Tree level order and spiral order traversal and its complexity analysis.
Round 7(HR):
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/athena-health-interview-experience-set-2/
My Interview Experience at Polycom
About Polycom
Polycom is a multinational corporation that develops video, voice and content collaboration and
communication technology. Polycom employs approximately 3,800 employees and had annual
revenues of approximately $1.4 billion in 2013. It is the largest pure-play collaboration company in
its industry. The company also licenses: H.264 video codecs, Siren codecs, session initiation
protocol, Native 1080p high-definition cameras and displays, Native 720p and 1080p high-definition
encoding/decoding, low-latency architecture and low bandwidth utilization, wideband advanced
audio coding with low delay (AAC-LD), multichannel spatial audio with echo cancellation and
interference filters to eliminate feedback from mobile devices, Optimized environmental conditioning
to provide the audio and video experience; and inter-operation with legacy video conferencing
(Source: http://en.wikipedia.org/wiki/Polycom)
Round 1(Written)
So, the procedure started with the written round, it had 60 questions consisting of quantitative
aptitude, logical reasoning and technical(c/c++, operating systems, computer networks, data
structures and algorithms).
Around 120 sat for this round and they shortlisted 17.
The interviewer started from the basics, and then gradually elevated the difficulty level(overall it was
easy), the questions asked by him were-
Q1. You are given a 32 bit unsigned integer and you have to set the 7th bit in the number.
Q2. Create a structure for link list and insert two nodes in it(write the code). (Since i know STL as
well, first i coded it in C and then used STL as well)
Q3. You are given a pointer to a node in the link list(starting pointer is not given) and you have to
delete that node.
Q4. Clearly explain the TCP/IP protocol stack alongwith the functioning of each layer.
Q6. How does a router uses longest prefix matching to route a packet.
Q8. How does a page fault is serviced. (had to tell all about demand paging, modification/dirty bit of
a modified page to be replaced)
Then he asked me about any networking course i have taken in my Master’s coursework, i told him
that i didn’t.
The interviewer asked whether i am interested in networking or not, i told him yes i am, but i have
only theoretical knowledge about all the protocols and procedures and have very little practical
knowledge about it. He said it is enough to answer his questions.
Q2. How can you calculate the round trip time and bandwidth of the network using Ping.
Q3. Can you measure congestion in the system using Ping and how?
Q7. You are given an array of 0s, 1s and 2s, you have to sort it. (calculating the number of 0s,1s and
2s is not counted as the solution for this problem).
Round 4(HR)
They shortlisted 6 candidates and asked them to sit in a room and gave two sheets consisting of 50
statements each, the first sheet had 50 positive statements and the 2nd had 50 negative statements and
we had to decide whether they are most significant/significant/least significant to us. (we had to
answer any 15 of them).
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/interview-experience-polycom/
D E Shaw Interview | Set 7 (Off Campus)
I applied in D E Shaw through their online job portal. My profile got selected after 1-2 months. The
HR called me and told that they want to have a telephonic round which was scheduled after 4 days.
This round went quite well, I knew that they will call me for the In House Interviews. So I started
preparing for it. After few days I got a call for the interviews at Hyd.
D E Shaw has awesome office, we were waiting in the room where HR came and guided to the
Interview rooms. (All rounds were 2 Interviewers)
Some tips:
1. For D E Shaw you need to be good in all the subjects.
2. Be truthful in the interview if you know the answer tell them, they may like your honesty (Depends
on individuals).
3. Most of them lack in databases, so come prepared with it thoroughly.
4. Best of luck.
Geeks for Geeks helped me lot in my preparations. I followed GFG thoroughly during my
preparations, hope that my experience would help you in your interviews.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/d-e-shaw-interview-set-7-off-campus/
IIT Delhi MS(R) CS Interview
Indian Institute of Technology Delhi Master of Science(Research) Computer Science Interview
Questions.
There was one written Test involves 4 questions all were easy if you have prepared for GATE or
UGC NET.
1. The probability of getting a head in one toss of a coin is 1/3, if a coin is tossed six times what will
the probability of getting at least 2 heads.
2. Plot y = log2(x+8)
3. Given two inputs a real number x, and a positive number n calculate x^n.Your algorithm must run in
O(logn) time.
4. A complete tree is a tree in which every node has exactly two children. Prove that if a binary tree
is a complete binary tree number of children’s will be exactly one more than the no. of internal nodes.
Interview :
Q1: You are working in industry why do you want to come back to studies ?
Q2: Do you think that the graph which you have plotted is correct ?
I answered No. He asked me to correct it. Later on he asked me to find the value of y at x= -7.5,7.75
and plot the graph for the same.
Q4: If I divide array size by 3 what will the running time of Binary search.
Q5: How will you find if a graph is bipartite graph. I answered using BFT. He was not agreed. He
asked me to define bipartite graph.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/iit-delhi-msr-cs-interview/
Amazon Interview Experience | Set 161
(Off Campus for SDE-1, Banglore)
Off campus- Delhi drive (SDE-1 Bangalore)
http://www.geeksforgeeks.org/connect-leaves-doubly-linked-list/
http://www.geeksforgeeks.org/check-for-balanced-parentheses-in-an-expression/
Small modification in it. Parenthesis pairs are given in a separate list. You have to optimize the
problem by suggesting the method you will need to store the pairs.
So he told me the importance that for huge no of clients this small mistake can create a blunder.
He asked me a scenario where I faced this thing and thereby improved the time complexity.
Lot of behavioural questions like conflicts with manager, team collaboration etc.
http://stackoverflow.com/questions/20026243/find-2-missing-numbers-in-an-array-of-integers-with-
two-missing-values
He asked me if have heard of nut and bolt problem. I didn’t so he moved to next question.
Given an array. Find the maximum number of groups of size of 2 or 3 that can be formed such that sum
of the numbers in group is divisible by 3. No number can be reused.
He asked me if I I did anything extraordinary apart from my daily work in the office and what
challenges I faced.
http://www.geeksforgeeks.org/largest-subarray-with-equal-number-of-0s-and-1s/
He did not accept this solution and asked me to optimize. This round didn’t go well, so I was not
selected.
Tips: Solve all the data structures related problems from geeksforgeeks and start practicing to write
perfect code for any problem.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-161-off-campus-sde-1-banglore/
Adobe Interview Experience | Set 19 (For
MTS)
Written round:
Same test every-time.
1st round:
He asked me to write code for hello world in C. Then he asked where this printf is stored and how
compiler knows where to check that thing. If printf declaration is moved to the program will it get
executed. I told him that I am not aware of these things.
Design a transaction system for a bank with many atms across. He asked me if you want to deal with
the bank how will you explain them the model and all the software and hardware requirements. He
wanted a multithreaded client- server interaction model and the database requirements.
2nd round:
Reverse a string. Reverse a paragraph word-wise.
3rd round:
Implement a push pop operations in a stack. Implement a queue using stacks. Remember there is
further optimization, he asked me for that.
Explain multithreading and how global, static etc variables are stored and accessed by threads.
Write complete code for the number of ways a frog can reach nth step by jumping 1 or 2 steps.
4th round:
Replace a string with another string in a paragraph. Which data structure you will use. Complete
code.
There are balls of red, blue and green color. How will you sort them.
Implement a generic swap function. I wrote a function which swap the pointers but he wanted me to
swap the complete memory blocks not just the pointers.
Indirectly he was asking me to implement memcpy function.
5th round:
Implement a contiguous 2-d matrix dynamically in C.
Spiral order traversal of a matrix. Complete code and he ran it for a 4×4 matrix.
Calculate Fibonacci for nth term. He was asking to optimize the traditional solution.
7th round: HR
Tell me about yourself. Current CTC and notice period.
I would suggest to go through pointers and how the things actually work from scratch like they would
ask you to implement any generic library in-built function. Also read OS and oops concepts. If you
don’t know any topic simply tell them.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-experience-set-19-mts/
Amazon Interview Experience | Set 162
Round 1:
Q-1: http://www.geeksforgeeks.org/dynamic-programming-set-32-word-break-problem/
Round 2:
Q-1: http://www.geeksforgeeks.org/search-an-element-in-a-sorted-and-pivoted-array/
Q-2: Given a string of 0s and 1s, count the number of substring which start and end with 1.
I was rejected after round 2 because I did not do well in round 1, was put on hold.
Round 1:
Q-1: http://www.geeksforgeeks.org/write-c-code-to-determine-if-two-trees-are-identical/
Q-2: http://www.geeksforgeeks.org/convert-an-arbitrary-binary-tree-to-a-tree-that-holds-children-
sum-property/
Round 2:
Q-1: In a tennis tournament of N players every player plays with every other player.
The following condition always hold-
If player P1 has won the match with P2 and player P2 has won from P3, then Player P1 has also
defeated P3.
Find winner of tournament in O(N) time and O(1) space. Find rank of players in O(NlogN) time.
Q-2: Given N scientists and K black holes, each scientist can query on radius, size and temperature of
a black hole, what data structure would you use?
Following queries are important.
Which scientist had queried on which black hole.
What were the queries made by that scientist.
Round 3.
Q-1: http://www.geeksforgeeks.org/maximum-sum-path-across-two-arrays/
Q-2: http://www.geeksforgeeks.org/dice-throw-problem/
Round 4:
Discussion on current project in company and college problem.
Questions on OS.
Q-2: Point of inflexion in an infinite mathematical graph which is strictly increasing then strictly
decreasing. Simple binary search was not the solution.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-162/
Zoho Interview | Set 4
Round one:
Note: They have two patterns, for me they asked programming pattern, which is really tough.
Time: 2.15 hrs
40 Questions full of programming, first 10 questions have half mark, next 30 Questions have 1 mark,
no Compilation Errors.
1) First 10 questions is to find the output of program which contains full of loops, loops inside loops.
2) Next 30 Questions has five parts
….a) To find the input of the program, output will be given.
….b) To find the error in logic and correct it, to provide the expected output.
….c) To find which two program gives the same result among given four programs.
….d) To find the loop condition for the desired output.
….e) To find the order of function in execution..
Round two:
Level One:
1) To find the odd numbers in between the range.
Input:
2
15
Output:
3,5,7,9,11,13
2) To find the factors of the numbers given in an array and to sort the numbers in descending order
according to the factors present in it.
Input:
Given array : 8, 2, 3, 12, 16
Output:
12, 16, 8, 2, 3
Level two:
1) Print the given pattern:
Input:
N= 3, M=3
Output:
XXX
X0X
XXX
Input:
N=4 M=5
Output:
XXXX
X00X
X00X
X00X
XXXX
Input:
N=6 M=7
XXXXXX
X0000X
X0XX0X
X0XX0X
X0XX0X
X0000X
XXXXXX
Level three:
1) To output the given string for the given input which is an integer.
Input: 1
Output: A
Input: 26
Output: Z
Input : 27
Output: AA
Input: 28:
Output: AB
Input: 1000
Output: ALL
2) Input:
Number of elements in set1: 4
Elements are: 9, 9, 9, 9
Number of elements in set 2: 3
Elements are: 1,1,1
Output:
1, 0, 1, 1, 0
Input:
Number of elements in set1: 11
Elements are: 7,2,3,4,5,3,1,2,7,2,8
Number of elements in set 2: 3
Elements are: 1,2,3
Output: 7,2,3,4,5,3,1,2,8,5,1
Round three:
Real time programming and analysis:
Note: Showing output does matter need to show the output as soon as possible. And also need to
solve the constraints very fast, since you know what you have done in your program. After finishing
the program always explain the logic behind it and the constraints about the processing and how you
solved those constraints to the technical people.
1) To form a structure which has few elements:
struct product {
char productname[20];
int product_price;
int product_id;
}
Get the product name, price and id and display the product name and price in descending of the price.
2) For the same above structure, now add another structure which is the category. That category will
have products in it.
Struct category
{
char category_name[20];
int cat_id;
}
According the category get the product name, product price and id, then display all the products
category wise in descending order.
3) For the same structure which as category and product, get the category id from the user in the
product structure and save to the category list. Then display them all in category wise.
4) A sheet full of data will be given with inventory stock list, which as different categories and
different products as input with category capacity and product availability in the structure. Now we
need to add a new category or new product with capacity and availability. Need to check whether the
product availability is exceeding the category capacity, if yes the output rack is full or else tell how
much free space is available and add the product to list.
5) Constraints in the above in question will be given, need to solve all the constraints, so that the
Technical HR gets satisfied.
After these rounds, if they get satisfied, they will call you for Technical HR, followed by General HR.
If you solved every single question and you were really fast in problem solving, then HR interview
will be easy. Or else HR interview will be very tough especially the Technical HR (The Technical
HR round as lots of logical questions)
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/zoho-interview-set-4/
Amazon Interview Experience | Set 163
(For SDE II)
Recently I attended amazon bangalore interview for SDE 2 position. All f2f and no phone/written
screening as i had attended one before and cleared those. Total 5 rounds and below are the details.
1) Coding
Given 2 nodes in a binary tree, find the length of the path connecting them (standard)
2) Coding
Given an continuous input stream of characters, find a method to get the earliest/oldest non repeated
character at any time in O(1).(solved using a doubly linked list and array combo)
3) Hiring Manager
Questions regarding the past projects, challenges (Important! please search google for preparation
grid and fill it up, be honest, be consize, your interviewer has gone through hundreds of filmsy, shaky
and all kinds of project descriptions and don’t think you can fool him.)
4) Design round
Design a system where a buyer puts a notification to the social networking site about his transaction.
5) Bar raiser
Past project discussion, design a cab service system, how would you define the standerds to be ahead
of your customers, how to handle scalability issue.
Note:
Brush up coding style, you may know the logic, but don’t keep much hope if the code is messy, lengthy
and without boundary checks, practice writing code on paper which can run without any modification.
Think loud, the interviewer is ready to help you, even to the extent of going into your code and finding
bugs, and that does not make you look bad.
Think all possible angles when designing. if the line goes down, if there’s a meteor hitting the server,
someone is using the design after 20 years, so what might happen. scalability is important for amazon.
Prepare your project details and think of your real fault, real problems to tell the manager.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-163-sde-ii/
Oracle Interview | Set 10 (For Server
Technology)
Hi all. I would like to share my experience about my recruitment process with ORACLE. Oracle
procedure consists of.
My projects were his next cynosure. He asked every infinitesimal description of my projects as
possible. He asked the technologies that I used the shortcomings I faced and also asked me how I
swamped them. After about 2 hours I was called for the next round.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/oracle-interview-set-10-server-technology/
Red Hat Interview Experience | Set 1 (For
Internship)
I am doing my final year B.E CSE. I would like to thank geeksforgeeks. It helped a lot for cracking the
interview. I applied online for the post of a Associate software Engineer Intern at Red hat, Bangalore.
The first round was a written test round. We had nearly around 30 questions in aptitude as well as
coding and a C program to write.
Aptitude: The aptitude questions were moderate and it covered all most all of the topics. It is not
necessary for you to remember any formula.Most of the problem involved solving it logically. If you
know the concepts you can solve. Majority of the questions were on probability, permutation
combination, work and time,average, ratio, and few which combined the concepts. One could crack
easily if you brush up the Apti concepts.
Programs: You need to be strong to answer this programmatic questions. All the questions were either
from C or C++. some of the questions I remember was on
Macro functions With different signatures
Operators precedence checking snippet
Main within main function
Switch special cases
Loop exceptional cases
Storage classes and so on
Program: It was a file program read input from a file and say the occurrence of each string i.e output
the occurrence of each word along with the count to a different file.
I solved aptitude and programs. I am sure of getting 23+ in both. We were given only 1 hour and 15
mins. So I solved 23 each qns in Apti and pgms. Then I started writing code. To get additional points
I have written a C program as well as a Shell Script program for that. After writing the code they stil
gave us some time and I did few questions in Apti and code. Since there was no negative marks I just
marked some option for the remaining qns.
The results were announced and only 3 of them were selected for the next round. I was the one to
clear first with higher marks. So were asked to wait and after ten minutes they asked me to attend
Technical Hr 1
The HR was very friendly and cool. He asked me about the first round and there was an ice breaking
session.Then he started technical questions.He asked why pointers, usage, advantage, disadvantage,
discussed many cases, malloc, calloc, dangling pointer, null pointer, a code for implementation, be
strong in your project,asked to draw use case,he stated some flaws and asked how would I rectify it
in project, I had around 4 projects, which means I included 2 C programs that solved a real world
problem.So he went discussing all these.Asked about data structures,A linked list programs just to
find the middle node in single access, I just said use two pointers ,one move once and the other move
twice, approach ,which was so easy. He asked if I knew it earlier. I said yes.code was asked to write
for al pgms.
The next program was to find the intersection of linked lists. I know it already but just took little time
to solve.Even if you know the programs earlier take few time to answer. Then simple C programs
Sort an array with 0 and 1 in O(n) complexity. first i said merge sort then I said keep one pointer at
start and the other pointer at end.If you find any 1 from start, then start decrementing the end pointer til
you find a 0 and exchange those.If I and j points to adjacent positions then stop the program.
A matrix program to print for any n*n order.
1234
5678
9 10 11 12
13 14 15 16 and the output is
1 2 3 4 8 12 16 15 14 13 9 5 6 7 11 10.
I wrote the code and made lot of changes to make it efficient. Then he asked few questions from
OOPS and web technologies and questions from my Resume about paper presentations, memberships
clubs etc..
I was confident enough that I would clear this round.One of them was eliminated and two of us was
asked to attend the next round after having lunch in their office.
The second technical round was with a hiring manager. He asked about data structures.Given family
tree problem and asked how would I solve. I proposed graph and he was satisfied with the data
structure and told how would I have a structure for it and few exceptional cases how would I solve.
Questions were on projects. He asked many questions from each of the project.
About each ppt that I have done.He also asked C programs involving storage classes,pointers,Ascii
values.Asked commands and pgms in shell scripting,he asked in detail about testing and asked to say
test cases.I told all the functional and non functional test cases.He asked if I know to work with any
testing tool.I said no.He asked in Python.I could answer only one question,then I said I have just
started learning python and I am not familiar.i said I will learn well before I would join. Then he
asked few HR questions.
The tool that I am going to work.it would be mentioned in the job requirement post
About my family
And few more common questions and asked me if I have any questions
I asked a question about the tool I am going to work what kind of work will I be having,
Then I thanked him for having a nice session and for meeting him. We were asked to leave for the day
and said results would be announced later.
Tips:
Be confident ,express yourself,
Take your project reports to add up,
Express that you want the job.
Most of the programs were on geeksforgeeks.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/red-hat-interview-experience-set-1-campus-internship_/
Snapdeal Interview Experience | Set 2 (For
Software Engineer 2)
Round 1: About 1:30 min
1. Introduction.
2. How will you decide what data structure should use?
3. Circular linkList meeting point and proof.
4. Reverse link list of given chunk k.
5. Print Left view of tree.
6. Explanation of Opps Concepts.
Round 3 : About 30 min only – In this round he asked what I have written in Resume.
1. Introduction.
2. Coin change problem of DP.
3. Write query for second max salary, then asked to optimise it.
4. Concept of group by and having in sql.
5. Asked about Git, what? why? and some git commands.
6. About selenium.
7. about access specifiers.
8. About previous projects.
Source
http://www.geeksforgeeks.org/snapdeal-interview-experience-set-2-software-engineer-2/
There was one written and two technical interviews round. Second technical interview also included
HR interview. No separate HR round.
Written round-
There was only one written round after ppt presentation. It was pure technical based paper consisting
of c, java, datastucture, network and operating system.
There were around 60 questions to be done in one hour. All questions were easy but conceptual and
little bit tricky.
1. In C.
Most of the questions were based on bits manipulation and string and union.
2. In Data structure.
Questions on tree , heap, red black tree and balanced tree and complexity.
3. In Operating System
It was really conceptual. Most of the questions were on virtual memory concept and scheduling and
semaphore.
4. Network
Questions on layers and their protocols. Numerical that needed transmission ,propagation and
bandwidth formula. Some general conceptual question including switch, hub and gateway.
I attempted every section since sectional cutoff was there. I didn’t attempt any question that I was not
sure for, since there was negative marking. I also didn’t attempt any numerical.
So, attempt each section such that you can clear cut off. No need to attempt all questions of each
section.
First round-
After written test , only 4 from Mca and 4 from Mtech were selected for next round.
It was also pure technical round.
Interview started just after result was declared. Since there was only two panels, It was taking time.
Questions.
1. Tell me about yourself in brief.
2. Write program to reverse string.
3. Write program to reverse bits of number.
4. Write program to check common sequence in two string.
5. Write program to the bits which is set.
6. Describe switch in n/w and how will you implement its s/w.
7. What is NAT and its functions ?
8. What is VLAN ?
9. How client and server establish their communication. How to create socket , explain step by
step?
10. What is socket buffer?
11. What is function of bridge?
12. What is IPC(inter process communication) and ITC(inter thread communication) and how it
happens and how to implement it.
Second round-
1. Tell me about yourself and your achievement briefly and your family background.
2. What is linking? Explain in detail.
3. What is little endian ,big endian. How to implement it’s code?
4. What are different types of memory segment and tell about different parts of program and where
they are stored?
5. Explain zombie, daemon and orphan processes and how they are different?
6. How to create parent and child process and different threads?
7. What are common segment used by parent and child processes?
8. What are common segment used by threads?
9. What is symbol table and what is it used for?
10. How to use gcc to compile program and what are different options available?
Ex: -g etc..
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/one-convergence-device-interview-experience-set-1-campus/
Amazon Interview Experience | Set 164
(For SDE I)
Applied for Chennai Kindle team, cleared few rounds but not happy with the overall interview
process. Contacted again by Hyderabad office and scheduled an interview, asked me about my
previous experience with Amazon. No telephonic, all F2F as I have already cleared few rounds
earlier.
Round 1
1. Questions on my project with previous employer
2. http://www.geeksforgeeks.org/add-two-numbers-without-using-arithmetic-operators/
3. Given an unsorted array of integers, assume the elements are inserted into BST. Search for an
element and print the path if found. If the element is left of previous in BST then path variable is 1
else 0. Eg:
Round 2
1. Count the decoding for a given digit string. Let say ‘A’ -> 1, B -> 2 and so on
Eg :
2. There is a printer printing characters continuously on paper, you need to cut the required message
character by character from the printed paper efficiently
Round 3
1. http://www.geeksforgeeks.org/largest-sum-contiguous-subarray/
2. Given a 2D matrix consists of only 0’s and 1’s find the longest diagonal of all 1’s
3. Optimization on above question with slight variations.
Production level code on paper with all corner cases handled is expected in all rounds. The
interviewers especially Hyderabad team are very friendly and helpful, talk out loud, they are ready to
help and guide you to right direction.
Finally, I would like to thank GeeksforGeeks as it helped me a lot in cracking algorithm questions. It’s
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-164-sde/
Synopsys Interview Experience | Set 2
Reached out via referral in November, team I was interviewed for develops in house software. The
overall process took 2 weeks, 2 telephonic followed by F2F. In all the rounds minimum 3 puzzles
were asked, listed down only algorithm and programming questions.
Telephonic
Round 1
1. Fibonacci sequence expecting DP solution and corner cases like negative input, etc.
2. Implement strcpy library function from C. Priority is on heap allocation, checking null terminated
string, etc
3. Strcpy() vs Memcpy()
Round 2
1. Given a huge file of strings, print words from EOF to start
F2F
Round 3
1. Height and Balance factor for binary tree.
2. http://www.geeksforgeeks.org/a-program-to-check-if-a-binary-tree-is-bst-or-not/
Round 4
1. Size of a binary tree
2. #define Vs typedef
3. int main() Vs void main() Vs main(), why return statement is necessary in main()
4. Merge two sorted array, recursive approach for the same using LinkedList
(http://www.geeksforgeeks.org/merge-two-sorted-linked-lists/)
Round 5
1. How negative numbers are represented in memory
2. What is integer overflow, how to avoid it
3. http://www.geeksforgeeks.org/maximum-size-sub-matrix-with-all-1s-in-a-binary-matrix/
Round 6
1. Pascal triangle based question
2. http://www.geeksforgeeks.org/maximum-difference-between-two-elements/
Round 7
1. Given a student table with marks, find Nth rank student
2. What is the possible pattern for static variables
3. Initialized and uninitialized static variables, where are they stored in memory expecting
explanation with BSS and Data segment
4. http://www.geeksforgeeks.org/detect-and-remove-loop-in-a-linked-list/
5. String is represented in a linked list, how to effectively check whether the string is a palindrome
(http://www.geeksforgeeks.org/function-to-check-if-a-singly-linked-list-is-palindrome/)
Round 8 (HR)
1. Usual HR questions, Why Synopsys, What will you do if you get offer from Google/Facebook, etc
2. 2 more puzzles again
Pseudo code on paper with proper handling of corner cases is expected. All F2F happened in a day
each round typically lasted an hour. Puzzles are given equal importance as that of algorithm design.
Thanks GeeksforGeeks for providing a wonderful platform to share and learn, keep up the great work,
cheers
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/synopsys-interview-experience-set-2/
Amazon Interview Experience | Set 165
(For SDE I)
Each of the rounds were of more than 1 hour and they mainly focused on logical thinking and
approach. DS and algorithms were the topics asked.
First round –
At first round, there were two interviewers. First, they asked about me. Why do you want to leave
your present company and join Amazon?
There is a 2-d matrix with rows sorted. Convert it into 1-d sorted array. Also specify space and time
complexity.
Given two binary trees, check whether two trees are identical or not. Write working code for it.
Using the previous solution, check whether one tree is subtree of another or not. Also specify time
complexity (Average and worst case) with proper code.
Second round –
General discussion about present company’s work.
Given a number of friends who has to give or take some amount of money from one another. Design an
algorithm by which the total cash flow among all the friends is minimized. Specify the data structure
which you will use and write the code for it.
Given an array, find the index of first occurrence of a number ‘x’. First, I gave O(n) solution, after that
he asked to optimize it and find it in less than O(n). There was long discussion in this question.
Third Round –
General questions like – tell me about yourself.
What are your strengths?
Why Amazon?
Why do you want to leave your current company so soon?
Did you ever been in any kind of disagreement with your management?
Work in current company ?
Design snake and ladder game. What data structure would you use, with design was needed. He then
asked to optimize it further.
Given two linked list , find the sum of those linked list . With recursion and without recursion. Lists
may be same or different lengths. Complete code was needed with space and time complexity.
Fourth round –
General discussion and Introduction. Work about current company?
What is the major challenging task that you have faced till date? Then more discussions and questions
on the task.
Any disagreement with manager and any good or innovative idea that you have come up with and
worked on it?
One technical question – Given a word and the dictionary, find all the anagrams of the particular
word present in dictionary (That are valid words). Propose the data structure you have used and time
complexity of the solution.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-165-sde/
Huawei Interview Experience
OnSite Interview ( 5 years experienced)
Round 1 – ( 40 mins)
1. You are getting a running stream of integers. This running stream is a input to a multithreaded
environment and many thread are working parallely on this running stream of integers to print the
numbers but the number printed by one thread should not be printed by other threads.
3. Design problem: –
you have 3 files and you need to print the output of operations inside those files onto log files.
Like some other 4th files come , then your code should be able to print its operation output with
minimal change in code.
Round 2. ( 40 mins)
1. how you deploy web applications .
2. what tools you use to manage software product life cycle
3. How you optimize your code containing 1000s lines of codes
4. an observer desgn pattern problem
5. why do you want to change company?
6. Brief about yourself
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/huawei-interview-experience/
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/gramener-interview-experience-set-1-visualization-developer/
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/maq-software-interview-experience-set-5/
Q1. Given a set of strings, find the alphabets common to all strings.
<I used Hashmaps>
Given a huge file with large number of words, code a function that would take a word as input and
print all anagrams of that word present in the file as output. Function has to be really really fast alsmo
O(1) run time. You are allowed to take as much time and resources for pre processing the file once.
But after pre-processing function should perform in O(1) time.
<Use hashmap, and fact that all anagrams have similar alphabetical order of letters>
How to optimize searching among this linked list of heads of other linked lists.
Only one question – Print leftmost and rightmost node at every level of binary tree.
Given a string with some ‘?’ where ? can be 0 or 1. Print all possible strings by substituting ? with
0/1.
Write a code (online shared collab document) to check whether a tree satisfies children-sum property.
http://www.geeksforgeeks.org/check-for-children-sum-property-in-a-binary-tree/>
Write a code (online shared collab document) to convert a given tree to a tree that satisfies children-
sum property.
http://www.geeksforgeeks.org/convert-an-arbitrary-binary-tree-to-a-tree-that-holds-children-sum-
property/>
Suppose you have a list of 1 billion integers, find 1 million largest integers in this list.
List can have repeatative elements, max memory limit is 1 million numbers
Discussion on current work. You must know what you are working on in detail as you would be
grilled
Top 3 features I would put on a website portal if I’m launching a cab service. (Non-technical)
Write code for scheduling algorithms for such a cab services provided you have a list of future
bookings, and list of cabs in your fleet.
<I was asked to write OOP paradigm code>
Tips:
Try to interact continuously with interviewer. Keep thinking aloud and keep discussing with
interviewers your ideas and approaches
Prepare Data structures, in particular binary tree very thoroughly.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-165-sde-2/
Microsoft Interview Experience | Set 42
(For SDE1)
I received interview call from Microsoft (Bangalore) for CRM team, SDE1 position for 1.5 year
experience.
Round 1: 1 hour
It was a GD like interview, with multiple people in same room given same question and interviewer
was discussing individually with every person.
Given 2 arays if integers, sort the first array based on order of 2nd array.
http://www.geeksforgeeks.org/sort-array-according-order-defined-another-array/>
I started with brute force approach, then optimized to binary seacrh and then hashmap
Round 2: 1 hour
Same as previous round, one interviewer, multiple candidates same question individual discussion.
If you have a stream of incoming characters, reverse and print the string as soon as input is finished.
Write a code for same
One-on-one
A printed sheet of a c-program was given, had to find syntactical and logical error in program.
Tips:
Keep thinking loud and discussing your thought process with interviewer. They will keep giving hints
for you to reach solution.
Find a solution, any solution, and keep optimizing it.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-42-sde1/
Payu Interview Experience | Set 5 (On-
Campus)
Online Round
1 hour coding contest, different set of coding problems were given. They were manually evaluated. I
was able to score 2nd highest score in my batch. They were judging you on these factors proper
Algorithm, and clear code.
Round 1
http://www.geeksforgeeks.org/find-first-non-repeating-character-stream-characters/
Link list consist of 0 and 1 ,arrange it in such a way that all 0’s on the left and
all 1’s on right
Given an sorted array find a pair such that their sum is equla to key value.
My friend gave me the solution in order( n ), he told him tell the solution in O(logn) , just to test his
temperament.
Round 2
There was discussion on my project for about 15 mins . Since my project was based on web crawling
he asked me
Find top 10 urls used by clients and 10 clients accessing the urls for 1 day of data . I answered by
using heap ,he asked to me ,how insertion works in a heap .
Given a string without spaces and a dictionary return or print all possible ways that the string can be
broken so that only valid words are formed.
3 were shortlisted
Round 3
Position of knight and king in a Chess board, find the minimum no of moves knight can move to reach
king position.
HR round
Tell me about yourself.
3 Strengths,3 weaknesses, 3 things you like and hate about you college, why payu, why coding?,
motivation, challenging moment.
Things we were judged was effort and all codes were asked to code .
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/payu-interview-experience-set-5-campus/
Snapdeal interview experience | Set 3
Hello guys, I recently appeared in Snapdeal interview for Java profile in Bangalore office. Here is
my experience.
The interview had 5 rounds out of which 3 technical and one manager and one HR round. Last two
rounds are just for normal discussion.
3. You are given a Binary Tree and you are asked to convert Binary tree such that it reverse its
subtree. She meant to Mirror image of it.
4. She asked me now you have a linked list (singly) and you are asked to reverse every 3 node in
linked list. For example 1 2 3 4 5 6 7 8 9 => 3 2 1 6 5 4 9 8 7. She asked that code should be at
production level.
5. From now onward she asked me lots of java questions as follows (she also asked me follow up
question based on my answers)
1. What is thread and how you can create a new thread.
2. What are the different way to create a thread.
3. Hashcode and equals method. How it affect. How you manage this method.
4. Hashmap related question based on above question and new question.
Rest I forget.
1. About my project
2. Multithreading questions in very deep. (Every think in multithreading in java) How java handle
threads, when thread alive, when dies, how dies, what happen when dies, what happen when alive,
What JVM does etc.
3. Then he gave me different scenario to check my programming skills in Java in multithreading env.
4. How hashmap work and its implementation in java. How collision resolve by java in hashmap.
Followed by what happen when collision happens, how does get() and remove() methods behave.
What will be the complexity of Hashmap for get(), remove() and put() method etc .
Lots of question on JAVA
5. What is BST, what is binary tree, Node structure what else can be done in node structure to make it
more efficiently n all.
6. How will you check does a binary tree is BST or not. Write code for it.
-> I explain how one can think to check does a given Binary tree is BST or not. Then I gave him
simplest solution using inordertraversal. Then he asked me to code it.
I wrote code in Java using inorder traversal and waiting for him meanwhile I thought he would may
ask me to solve without inorder traversal justsimilar way how I explain the approach to check binary
tree is BST or not. So meanwhile I also wrote code for it too
I wrote code based on min/max value and check recursively.
7. Then he asked me Print matrix in Spiralform followed by code. Meanwhile he asked me what is2D
arrays and how they behave and how memory assigned to them.
3. You are given a two dimension array of character and a set of words (dictionary). Your task to
return all the words which are valid and available in given array.
-> I explain him different approaches start from backtracking to solve the above question. Then he
asked me about complexity which was exponential. Followed by asking to optimize it further level.
I optimize my algo in various way (with or without Dynamic programming) one by one and try to
combine my optimization to result better approach. I keep telling him that in this case this is the
complexity n all. He asked me to further optimize my algo and bravo I reach where he wants me to
reach. That is Prefix tree based solution. After giving this solution I further optimize it to discard so
many path that does not lead to the solution( that gave me a + point). Then he asked me code (I was
become little nervous because that algo now become complex, I said the implementation could be
little tricky, he told me to take your time). I told him that this is the way I approach for prefix tree
based solution implementation and then he told me that assume following helper method are available
in PrefixTrie implementation but he asked me that first explain him that how I can implement those
method efficiently and I answered).
Then It took 25 minutes to write that code. He was happy but he again asked me to more optimize a
particular section of code ( I was using visited Boolean array to trace my path). I again optimize that
portion with various ways from bad complexity to awesome complexity and he became very happy.
I would like to thank geeksforgeeks to provide such awesome platform to learn DS algo.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/snapdeal-interview-experience-set-3/
Amazon Interview Experience | Set 166
(For SDE I)
Telephonic 1:-
1. Light is falling on a tree from left side you have to find all the nodes on which this light will fall.
Telephonic 2:-
1. You have a list of program files, how will you decide which file to compile first and which later,
what data structure you will use for storing these dependencies.
2. Best Fit
3. You have been given time intervals of a you tube video watched mostly. You have to find out the
most watched time interval, so that you can put an ad in between that section.
1. A lot about my projects, what is the best thing you have done so far.
3. TCP/IP, http/https, how to establish a secure connection or send an encrypted data, PPP protocol.
4. Virtual memory.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-166-sde/
Knowlarity Interview Experience
Hi, Recently I attended Knowlarity Interview.
Round1:
1) swap the even bits and odd bits in the number.
I/P: 01010101 O/P:10101010
2) convert a binary tree in Double Linked list. He then asked, how will you handle the case when the
parent left and right pointers are changed, but children has not been processed yet
3) Find the min element in Stack in O(1) time, without affecting Push and Pop operation.
Round 2:
1) Left view of a Binary tree
4) There are two arrays.All the elements in the array are same, except one pair. Find that pair. I told
Hashing. He told to improve it. It can be done as an equation.
Sum of first array – Sum of second array = x-y
Sum of squares of first array – Sum of squares of second array = x^2- y^2
Round 3:
1) How do you implement LRU cache
3) I don’t remember
Round 4:
1) You have a stream of numbers. At any time , find the maximum and the unique number at any time.
I/P: 5 6 7 7 6
O/p:5 6 7 6 5
2) There is a Binary Tree. Find the min and max of the binary tree , without using Global variable
3) Check if a Binary tree is BST or not
2)
A1 =()
A2 =()
A3 = (A1 + A2) => (()())
A4 = (A3+A2) => ((()())())
A5 = (A4+A3)=> (((()())())(()()))
Similarly An= An-1 + An-2
2) Puzzle: You are given two eggs. There is a 100 floor building. Find the minimum floor from which
if the egg is thrown , breaks , in minimum number of throws. Answer=> 14
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/knowlarity-interview-experience/
Amazon Interview Experience | Set 167
(SDE I for 1 year 6 months experience)
Round1: Online Coding Round
There were 4 coding question. Was asked to answer 2 out of 4.
1) Given a list of N coins, their values (V1, V2, … , VN), and the total sum S. Find the minimum
number of coins the sum of which is S (we can use as many coins of one type as we want), or report
that it’s not possible to select coins in such a way that they sum up to S.
Example: Given coins with values 1, 3, and 5.
And the sum S is 11.
Output: 3, 2 coins of 3 and 1 coin of 5.
2) Given two rectangles, find if the given two rectangles overlap or not
3) Given two strings string1 and string2, find the smallest substring in string1 containing all
characters of string2 efficiently.
For Example:
Input string1: “this is a test string”
Input string2: “tist”
Output string: “t stri”
3) I was asked to write flawless code for inserting an element in sorted linked list which should
cover all corner cases.
2) You have an array which the ith value is the price of a given stock on day. You can buy only one
share of the stock and sell one. Design an algo to find the best times to buy and sell. Also he asked me
to give start date and end date.
3) Graph problem:
Critical node: If a node reaches another node only through one node.
Eg: A-C-B and A-E-B are critical nodes. (A reach B through one node which is C or E)
If A reaches B through more than one node, then they are not critical nodes.
1) A-C-B
A-D-E-B (A reach B thro c which might lead to critical node but A has another path to B thro D and
E, so they are not critical nodes).
2) X-Y-Z
X-A-Z (X and Z are critical nodes)
Now find all critical nodes.
2) Outlook:
A server receives meeting objects from multiple senders. Meeting object contains meeting time, sent
time, recipient(s), sender id,etc. When recipient comes and checks the server, he/she should get
requests based on meeting time and not based on sent time. Many discussions on space complexity
and time complexity.
Eg:
When C requests the server, C should get ID3 as 1st, ID2 as 2nd and ID1 as 3rd meeting.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-167-sde-1-year-6-months-
experience/
Microsoft Interview Experience | Set 43
For Microsoft Bangalore CRM team.
Experience: 1.8 years.
Round-2(Technical)
He asked me to Introduce myself and then started asking me what do I know about CRM.(Go through
the website before attending the interview)
1. Given a client and a server and each of them has a queue in it. Client has to copy the contents of the
queue to the server once the internet connection is up. The amount of data which it can copy at one go
is fixed(Say 5 units). Design an approach for this. Let’s say input queue is partitioned as
2MB,4MB,10MB,6MB and the fixed size of the window is 5MB. The output queue also has the same
partitions as the input queue. (He was basically testing how i can use operating systems concepts,
designing approach and data structures together).
Round-3(Technical)
He asked me to introduce myself.
1.He asked me about the current project which im working on.. and a few questions on the
technologies which were used in the project.
2. Given N prisoners who are standing in a line and M hatred relationships among them say,P1 hates
P2, P3 hates P1, P3 hates P5 etc.. If any of the hate relation contains invalid cases like P1 hates P3
and P3 hates P1 then return false. Output the final order in which the prisoner should stand in the line
so that they don’t hurt each other. say, if P1 hates P3, P3 should stand behind P1 so that P1 cannot hurt
him. He asked me to code for the same.
3.Given a root, particular node and distance in a binary tree,.. say (struct node *root, struct node
*n,int k) print all nodes which are at a distance of ‘k’ from node ‘n’. He asked me to write the code.
Round-4:(Technical)
He asked me to walk him through my resume.
1. Why Microsoft?
2. Why do u want to leave your current company?
3. Deep discussion on the current project which I’m working on.
4. Given a binary tree how to construct the mirror tree out of it. I gave a recursive solution. He asked
me to write the code for it. He asked me to write the same without using recursion and test cases for
the program.
Round-5 (HR)
1.Discussion on current compensation etc.
Overall, it was really a good experience. GeeksForGeeks, you guys have made our lives so easy!
Thanks a lot.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-43/
Amazon Interview Experience | Set 168
Interview 1:
The interviewer asked me about my resume which was followed by the following question.Given a
function mapped from integers to real numbers, which strictly increases upto a certain point say A and
strictly decreases after it, write a function to find this point.The solution was a simple binary search,
the trick being to reach the other side of the peak. This can be achieved iteratively increasing ‘x’ and
checking for a downward slope condition. The step could be constant, but an exponential increase
would let to the point faster. I was asked to prove this by giving the recurrence relation and hence
showing the complexity. I was further asked to code the entire algorithm using any language of my
choice where I used c.
Interview 2
The interviewer asked me about networks in relation to sockets and ports when he saw an academic
project that was mentioned in my resume.
The interview questions were as follows:
1) Given a binary tree where value at each node is a single digit, find the sum of numbers generated
by each root to leaf path. He also asked to code the primary function for the same. I couldn’t find the
exact question on geeksforgeeks, but this one is close enough http://www.geeksforgeeks.org/find-the-
maximum-sum-path-in-a-binary-tree/
2) Given a numpad such that every number is associated with a set of letters, give all combinations of
strings that could be formed given a string of numbers. He also asked to code the primary function for
the same.
Solution: http://www.geeksforgeeks.org/find-possible-words-phone-digits/
Interview 3
1) Given an array of integers, find a subset of numbers from this array such that, after negating the
elements of this set, the total sum of all elements would be equal to zero.
I could not solve the problem and he moved on to the next one after giving me a hint to use Dynamic
Programming
2) Given two sorted arrays find the median of the merged array without using extra space. I gave an
O(N) Solution and he asked me to give an O(log(N)) solution,which I gave after I put in some thought
3) Print a binary tree in a zigzag order level wise. I gave an implementation using a doubly ended
queue, he wasn’t satisfied as this would lead to extra space complexity for storing the levels in the d-
queue. He was pleased when I decided to use 2 queues for the same. He further asked me to code it
up
Interview 4
1) The interviewer asked me about the types of database I knew and elaborated a bit on non-
relational databases like mongodb and JSON.
2) Next, he asked me the need for indexing in databases and it’s implementation.
3) In an auctioning system, the bidder with the highest bid wins but charged at kth highest price.
Develop a system for it. Solved it using a hashmap. Was asked to write a code for the same.
4) Given an array such that all elements except one are duplicate, find this element. Solution:
http://www.geeksforgeeks.org/forums/topic/finding-non-duplicate-element-from-array/ He tweeked
the problem to add the condition that in stead of one there are 2 such elements. I couldn’t arrive to a
solution even after he gave me some hints. In the end he gave me the answer but immediately said that
it may not work. I realized why it did work and explained the reason for the same.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-168/
Amazon Interview Experience | Set 169
(For SDE 2)
Recently I was interviewed for the position of SDE 2 I have 4 years of work experience .Following
were the asked.
Note: For all of the question production level code was required.
Round 1:
1.Write a program to convert a integer to its form in a given language .
For example 112345 Could be one hundred twelve thousand three hundred forty five or One lac
twelve thousand three hundred forty five.
Round 2:
It was basically a design round .
1.Design a Chess board so that two players can play.Each of the play can make any warrior
move.Class Diagram and basic functions were asked to be written.
Round 3:
Given a 2 D array with m Entry points (which are on the edges) and n exit points which are on the
edges give the total number of paths that are possible .Complete production level code was to be
written
2. Given inorder and postorder traversal of a tree give the preorder traversal without creating the
tree.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-169-sde-2/
Subex Interview Experience
Recently i was interviewed for the position of Software Engineer(Fresher) in Bangalore.
Round 1:
In the first round there was some aptitude questions and one coding paper in which we have to write
2 Programs.
The Coding part was as follows:
a) Write a program to reverse a linked list and make another list when node value is less than or
equal to 2.
i/p: 6->5->4->3->2->1
o/p: 3->4->5->6
1->2
b) Write All the operations of Doubly Linked List Using only Single Pointer.
c) I don’t remember but it was from Matrix.
After the first round very few have been called to get a face to face interview and i was one from
them.
Round 2:
a) Introduce yourself.
b) Explain Object Oriented Concepts in detail.
c) What is the difference b/w Pass by Value and Pass by Reference.
d) What is Inline Function why we use it.
e) Explain Normalization.
f) What is Friend Class.
g) Some questions from Unix(which i don’t know).
h) Write a program to reverse a Linked List in size of 3.
After that interviewer asked me again about Unix which i don’t know very well. And told me that
we’re hiring for Unix profile.then he asked me some more questions and asked me to wait for the
result, unfortunately i didn’t clear the round.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/subex-interview-experience/
First Round: It was online coding round, conducted through hackerrank. There were total 6
questions, in which every type of question was there(easy, medium,hard), no need to attend all
question I did 2 submission successfully and got selected for next round.
Note: for clear first round practice program from hacker rank website.
1. Frog Racing
5. given a number A find the smallest number B . such that AXB in contain 4 and 0 only, zero must not
appear before any 4. for ex:- 4440000 is valid but 404004 is not valid.
Third Round:
It was technical round, question were asked from coding, sql,os,ds, some puzzles, project.
3. By tossing a coin we can get either head or tail, i have a function toss() which return head or tail
with equal probability.
You have to write a function for dice which will return number from 1-6 with equal probability.
constraints : you can not use random function, you can use only toss function.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/practo-placement-experience/
Visa Interview Experience | Set 3 (On-
Campus)
I had three rounds of interviews for Visa on campus (all technical).
First round majorly focused on the projects I had done as part of my curriculum. Then some basic
coding stuff where the interviewer was mainly trying to see the approach. Some questions related to
sorting techniques.
He was also interested in the real time projects that I worked on during my interns at Amazon. So I
was asked about all that I did there and then some questions on spring framework and dependency
injection (amazon intern project related stuff).
Second Round:
Here the discussion started with OS and networking. General questions on race condition,
semaphores, raid structure, deadlocks as well as network layer, data-link layer and transport layer
(One who is well acquainted with all the basics of subject can easily answer them all). Some
machine learning discussion on classifiers, Artificial Neural Networks, and genetic algorithms as
well as assembly language programming. A code for a problem which could be solved using BST and
then optimizing it.
Third Round:
First the interviewer started with explaining kind of work Visa does and their plans for the technology
hub they are opening up in Bangalore and my interests and all. Then some questions related to writing
POJO(Plain Old Java Objects) classes and tests for the code (unit tests, integration tests) based on
what I mentioned in my resume as part of my intern project. Some aptitude questions and
programming stuff again and then about Object Oriented Programming (OOPs) concepts.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/visa-interview-experience-set-3-campus/
First round (Online): This was common for both Microsoft IT and IDC. There were 2 coding
questions (1 hour) and 20 MCQs (30 minutes). MCQs were mostly based on data structures, C/C++
and a few on OS. In the coding questions we were given the main function, we just had to fill in the
code for the functions.
Coding Question 1: Find the point of intersection of two linked lists. (Bonus points for checking if the
given linked lists are circular)
Coding Question 2: Given a matrix which consists of 1’s and 0’s, a pool is defined as a collection of
0’s completely surrounded by 1’s. Example,
1111110000111
1110011001111
1100011111111
1111111110000
This matrix contains only one pool since only one group of 0’s is completely surrounded with 1’s
I solved both the questions but could not pass all the test cases for the second question. But I solved
the bonus problem in the first question and my overall score became high. So if you get any bonus
questions, do not ignore them. They may help you score really well.
Second Round (Telephonic): The interviewer started with talking about Indore (my hometown), my
weaknesses, my hobbies etc. So basically he was trying to calm me down (Tough I wasn’t panicking.
I’ve no idea why he thought I was :-P). Then he began with the questions.
Question 1: Suppose you are the in-charge of a project in which you need to develop an online
railway ticket reservation system. What are the things that you would consider while planning out the
project and why?
I was excited since I had prepared this answer already. Basically it’s the kind of question where they
wish to check the scale at which you think and how much you keep yourself updated with the latest
technology. Firstly I talked about how our requirements would help in determining which technology
to use. I told him about my projects in php & ASP.NET and then compared the two in terms of cost,
scalability, support, ease of use etc. Then I told him a little bit about UI/UX and then finally about the
factors that could cause our website to crash. We talked about database backup, restore etc. in short.
There is no perfect answer to this question, you just need to show them that you think about the “Big
Picture” while designing the system. When he was fully convinced, we moved on to the next problem
Question 2: You are given a pointer to a node in a linked list (Not the pointer to the Linked List!).
How will you delete this node?
Frankly, I never heard this question before. It came to me as a big surprise that this question was quiet
common but I missed it during my preparation! I got nervous at this point. But I remembered that I
should let the interviewer know what’s going on in my mind, so I kept talking. But after 5 minutes he
moved on to the next question and told that we would come back to this question again.
Question 3: You are a project manager & you have 100 hours to complete a project. How much time
will you give to planning, coding and testing?
At this point I regretted sleeping during the Software Engineering Lectures. I thought making wild
guesses would give a very bad impression. So instead of giving him numbers I told him that according
to my experience coding would take maximum time, followed by planning and then testing. He
laughed at my answer (Ohh yeah… they do that -_-). But maybe he thought of me as a kid who hardly
has any experience and was kind enough to tell me that it’s not how projects in industry work. They
give maximum time to planning because if the planning is done properly then coding hardly takes any
time! (I know most of you are with me on this :-P)
But while he was telling me all this, I got the time to think about the second question. But the problem
was that my answer wouldn’t work when the node was the last node in the list. And this is exactly
what I told him before answering the question. Surprisingly my answer was correct. He asked me
what I will do in case the node was at the end? I said I had no idea. Then he told me about “dummy
node” but he told me that he was satisfied with my answer.
So my interview took more than 45 minutes (unlike my friends’ which went for 20-30 minutes! :-O). I
thought I messed up a lot & won’t be selected for the next round. But I was (I guess others messed up
more than I did ;-))
Round 3 (Face-to-face in Microsoft IDC, Hyderabad Campus): So the campus is huge, great
interior, facilities etc. Within half an hour, I was called for my first round.
F2F 1: The interviewer himself came in the waiting area and took me to the interview room. Well it
was a big hall with 8 interviewers sitting far away from each other. They all had their laptops, pens
and few blank sheets with them.
I gave him a breif introduction about myself (laid special emphasis on the fact that I am a Microsoft
Student Associate ;-))
Interviewer: Okay so let’s jump on to the questions… You are given a string that consists of Rs, Gs
and Bs. You need to sort the string so that all the Rs come towards the front, Gs in the middle and Bs
towards the end.
Approach 2: Use 3 counters r, g, b and count the number of Rs, Gs and Bs in the first parse and put
those many Rs, Gs and Bs in the second parse. (he smiled and said it’s a good solution but he wants a
different answer)
Approach 3: In the first parse, bring all the Rs towards the front. The remaining string would have
only Gs and Bs. Similarly, in the second parse, collect all the Bs at the end (he said I can do better)
Approach 4: It took me a little time to think about this but he gave me hints and I finally came up with
an algorithm. He asked me to code it and started doing his own work. I walked him through the code
(and tried highlighting how I took care of the invalid inputs, corner cases etc. :-P)
Interviewer: Well… that’s all from my side. Do you want to ask me any questions?
Well I didn’t mind a bit of chit chat So I started asking him about the most challenging project he
did in MS and about the development strategy that they follow for development of cross platform
apps. He was nice and told me everything with a lot of interest.
F2F 2: 2 of my friends were rejected in the first round itself, while the rest 3 of us went to the next
round. This interviewer looked very serious.
With his expressions he didn’t seem to be interested in my answer at all and quickly gave me a
question.
Interviewer: Okay so you are given a string that consists of vowels, consonants and other chars. You
need to sort the string so that all the vowels come towards the front, consonants in the middle and
other chars towards the end.
I couldn’t be more happier at that moment I didn’t tell him that I had been asked this question in the
previous interview & told him my approach (Approach 4 from last interview). But he understood that
I knew the answer and so he changed the question
Interviewer: You are given a matrix that consist of chars and you need to search for a string in that
matrix. Now the string can be formed by going into any direction from a particular matrix position. So
the only constraint is that the cells’ corners must touch.
This was again easy. I just used a dummy character (*) in place of the chars that had already been
visited and restored the char back after the recursive step. He got a little confused by this dummy char
concept but then I explained him why it would work and he was satisfied with my answer. He asked
me to code it then. I made a few mistakes which I corrected later but overall this round was good
F2F 3: This was the final round & was supposed to be an HR round. But since they had to finish off
the interviews they sent me to a technical person! (I peeked into his laptop and saw that he had the
feedback of my previous rounds and also the questions which were asked to me!)
I again gave the same answer (ofcourse with emphasis on MSA thing :-P)
Interviewer: What could you have done better in any of your previous interviews?
I told him about a small bug in my code. I forgot to increment a variable and the interviewer ignored
it.
Interviewer: So I see you have worked on Hadoop. Can you tell me what you did in your project?
I was expecting this question and gave him a good explanation on this. My project was on network
intrusion detection systems using big data.
Interviewer: Since you’ve worked on IPs, let me give you a small problem. Convert the following
number into IPv4 format.
It was fairly easy and I wrote the code. I made a few mistakes in my code (I was really nervous this
time) but corrected them later
I told C++ (yes… that’s what you do when you are under so much of pressure -_-) He gave me a
strange look and then I realized what I told him! But I guess he understood that I was panicking
I never expected this question in an interview and I gave a very bad definition. He didn’t looked
impressed at all.
Interviewer: Umm… let me give you a coding problem. You are given a canvas and you have to draw
a line from point A to B. How would you go about doing this problem?
Phew… this question would save me (atleast that’s what I thought). But I didn’t consider the corner
cases. He gave me a hint and luckily I could solve the problem successfully.
Interviewer: That’s it from my side. Do you have any questions for me?
Yes ofcourse! I asked him about the most challenging project that he did but he seemed to be a bit
confused about what to answer. So I explained him my question again and gave him a few examples
of what other interviewers answered (It felt awesome at that moment because he was in the same
position as I was 10 minutes back then :-P)
The experience was good because they focused only on technical stuff & the questions were also
good. I really liked the helping attitude of people there.
I would like to thank geeksforgeeks for helping me out in the preparation for this interview. I think you
guys are doing a great job helping out students
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-idc-interview-experience-set-44/
Oracle Interview | Set 11 (For Server
Technology)
I was interviewed recently and got through Oracle ST. I can’t remember many questions but I will try
to tell as much as I can.
Online round
This was a 90 minutes test in 4 sections
1) Quantitative Aptitude
2) English & Vocabulary
3) Data Interpretation
4) Technical (C/C++, Java, DS, Algo, OS, DBMS, Networking)
The questions were really easy. You just need to have some basic knowledge for CS concepts to
attempt the 4th section
Written Round
Due to shortage of time on the day of interview, they asked one coding question to be written on a
paper in 30 minutes and that would was to be discussed in 1st round. They didn’t really care about
the working code but wanted to know how you approached the question.
The question was:
1st line of input had some N numbers and next line had one integer. Using basic mathematics
operations( +, -, *, / ), you had to determine if the number in next line could be formed or not. If yes,
print the combination. Else print not possible.
Case 1:
Input:
4,2,3
11
Output:
4*2+3
Input:
1,1,1
1
Output:
1*1*1
Input
1,2,3
124
Output:
Not possible
Input:
2,5,7,3
-7
Output:
2-5-7+3
Round 1
1) The 1st question was the usual ice breaker “Tell me something about yourself”.
2) Then he asked me to explain about the android app I had written in my resume. I explained him
each and every thing in detail, drawing the flow of the app on sheet, explaining how the app
connected to the server and triggered a php script. He was quite impressed with the app which I
could see on his face.
3) Then he asked me to write the conditions to be taken into consideration while deleting any node
from a tree on a sheet of paper.
4) He asked me if I had any questions for him. This is pretty important because it shows how much
you are interested in the job. Ask some sensible question here.
Round 2
He asked me how much I was comfortable in Networks and asked me many questions.
1) How is a file transferred via ftp and how exactly does FTP work? How many sockets would be
required for one file transfer? (I could not really get what he tried to ask)
2) What is the path followed if my system wants to connect to some given IP of another system?
Round 3
1) What is the difference between a graph and a tree?
2) Find a path between two given nodes in a binary tree. Write proper code for this. Also check if any
of the nodes is actually present in the tree. (wrote the code to find LCA(lowest common ancestor) and
print path from NODE1 – LCA – NODE2)
3)
main() {
printf("hello\n");
main();
}
4)
main() {
fork();
if (fork() || fork()){
printf("heyy\n");
fork();
}
}
This round went more into discussion than an interview. The team was really chill and made me feel
really relaxed during the round.
HR round
This was just a formality. It did not last even 5 minutes.
1) She asked me about my background.
2) Why should I choose you?
3) Why Oracle?
4) Any location preference between Hyderabad, Bangalore and Noida?
5) Any questions for the team? I asked if I could extend my joining date by 15-20 days
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/oracle-interview-set-11-server-technology/
Amazon Interview Experience | Set 170
Round 1 – Telephonic
1. Find element in an array which have elements in first increasing and then decreasing order. (code)
Round 2
1. Find sum of all numbers that are formed from root to leaf path (code) expected time complexity
O(n)
Round 3
3. Why amazon?
Round 4
3. A stream of characters is coming, at any moment you have to tell ‘k’ elements closest to a given
number (code)
1. Design a system which would make a schedule for a user to complete a book in given number of
days. A pre condition is that the schedule for every day should end at the end of some chapter.
Ex – 3 chapter with 10 pages each and user has to complete this book in 2 days, then the schedule
should be either be 2 chapters on first day and 1 chapter on second or 1 chapter on first day and 2
chapters on second. (code)
2. Tell me about a time when you couldn’t implement the best solution because of a close deadline.
4. General design pattern related questions like what if we use singleton design pattern for question 1
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-170/
Komli Media Interview Experience
I recently attended Komli media interview and wanted to share the experience.
First Round(Written)
1. Midas has boxes in three sizes: large, medium, and small. He puts 11 large boxes on a table. He
leaves some of these boxes empty, and in all the other boxes he puts 8 medium boxes. He leaves some
of these medium boxes empty, and in all the other medium boxes he puts 8 (empty) small boxes. Now,
102 of all the boxes on the table are empty. How many boxes has Midas used in total?
2. You are given a file which contains a very bit sequence of 0 and 1 and it is sorted. Hence all the
zeros are in front of the ones.One needs to find the first orrcurance of of 1 in the file(return the
position).
The only method to access the file is through a method whose signature is — int getBitAtPosition(int
position) — which returns the bit at the specified position in the file.
3. Given a string find the short version of the string depending on the given parameter.
method signature : shortenString(String s, int n)
ex:
s = aaabbbaa n=2 output = aabbaa
s= aaabbaacccc n=1 output = abac
5. Charles walks over a railway-bridge. At the moment that he is just ten meters away from the
middle of the bridge, he hears a train coming from behind. At that moment, the train, which travels at
a speed of 90 km/h, is exactly as far away from the bridge as the bridge measures in length. Without
hesitation, Charles rushes straight towards the train to get off the bridge. In this way, he misses the
train by just four meters! If Charles would, however, have rushed exactly as fast in the other direction,
the train would have hit him eight meters before the end of the bridge.
Answer : http://dailybrainteaser.blogspot.in/2011/08/train-puzzle.html
Second Round :
Discussion on the problems in the first round and optimization.
Lot of discussion on the projects mentioned in the CV.
Third round :
1. Given an array of integers, for each position find out the product of the remaining elements in the
array.
You are not allowed to use the division operator.
Calculate the same thing for all the positions and out in a different array.
2. Give a number n, find the all the possible sets of number whose sum will be n. A number can
repeated within a set.
ex : input n=4
output : {1,1,1,1},{1,1,2},{1,3},{2,2},{4}
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/komli-media-interview-experience/
Amazon Interview Experience | Set 171
Hi, I recently got an offer from Amazon, here is my interview experience:
Round-1: (Written)
Q-2: Fine LCA (lowest common ancestor) of given two nodes in Binary Tree. Handle all corner
cases like one element exists and other not. http://www.geeksforgeeks.org/lowest-common-ancestor-
binary-tree-set-1/
Q-3: Find next greater number with same digits. Handle corner cases.
http://www.geeksforgeeks.org/find-next-greater-number-set-digits/
Round-2: (F2F)
Q-1 : http://www.geeksforgeeks.org/median-of-stream-of-integers-running-integers/
Q-2 : http://www.geeksforgeeks.org/clone-binary-tree-random-pointers/
Round -3 (F2F)
Q-1: http://www.geeksforgeeks.org/dynamic-programming-set-32-word-break-problem/
I don’t have Idea about problem initially then he asked to make some test cases, some tricky one. I
gave recursive algorithm then, after this came on DP solution but time doesn’t permit so moved to
second question. Code was required.
Q-2: Given inference rules and some input tokens find all tokens which can be possible with given
rules. Example :
Rules :
AàB
BàD
CàE
DàF
Input Tokens :
1. A,C then all A,B,C,D,E,F are possible.
2. A then A,B,D,F are possible.
Ask me what data structure you will use, how processing will happen. Pseudo code was required.
Round -4 (F2F)
Long discussion on my current work. Biggest challenge and how you solve it. Technology challenge.
Q-1: Suppose you receive 10 million mails in 10 seconds. How will you process them and find
whatis problem to receive these many mails. Discussed different approaches.
Q-2: longest palindromic substring of given string. I gave DP solution, he ask me don’t use DP.
Proper code was required.
http://www.geeksforgeeks.org/longest-palindrome-substring-set-1/
Round-5 ( Telephonic)
Long discussion on my current work again, Challenges faced. What you did when some mess-up
happens and deadline is very strict. Conflict with manager.
Q-1 : Outlook:
A server receives meeting objects from multiple senders. Meeting object contains meeting time, sent
time, recipient(s), sender id,etc. When recipient comes and checks the server, he/she should get
requests based on meeting time and not based on sent time. Many discussions on space complexity
and time complexity.
Eg:
When C requests the server, C should get ID3 as 1st, ID2 as 2nd and ID1 as 3rd meeting.
Q-2 : http://www.geeksforgeeks.org/add-greater-values-every-node-given-bst/
I gave solution using temp array, then he ask me to do in constant space in single traversal. Condition
don’t use pointer for sum or call me reference. Proper code was required.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Thanks Geeksforgeeks for providing very good platform to well prepare. A knowledge repository J
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-171/
BrowserStack Interview Experience | Set 5
(Fresher)
First Round(Telephonic)
Two questions of coding. They were easy to program. A link was shared on my email of google docs.
Questions were :-
1. Return an array of fibonacci sequence
Third round
Three questions were asked which were tough to handle
1. HTML parser
2. SQL parser
3. forgot but something on parser
HTML parser
A long file was given and we have to find the given html response code and the count of the code in
the file
SQL parser
A long file with data about the table formats and the entry in the tables with sql queries to extract the
rows count from them that satisfy the criterion
Python language will help you to implement the questions easily. (A suggestion)
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/browserstack-interview-experience-set-5-fresher/
Round 2:
F2F 1:
With senior developer:
1. given an array. write a function to find if the array satisfies the condition min^2
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-45/
Round-1:(Technical-1:10 min)
1. Introduce yourself.
2. Deep discussion on the current project which I’m working on.(project high level architecture,
questions on design, frameworks used etc.,)
3. Write a clean code to find the median of incoming stream of integers(I started with brute force
approach and with a little help from the interviewer I could come up with the optimized
solution,discussion on complexities)
4. Find the top ‘k’ repeating elements in a given file.
5. Basic questions on java.
6. What do you know about spring frame work?
7. Questions on Hadoop,hive,sqoop etc.,
Round-2(Technical-2hrs)
1. Introduce yourself.
2. Deep discussion on the projects that I have worked on.(High level design, Technologies used etc.,)
3. What are the object oriented features present in java?
4. What is polymorphism?
5. Difference between run time and compile time polymorphism with example.
6. What are the different types of exceptions that you have faced till now?
7. Difference between array out of bounds and array out of index exception?
8. Exceptions hierarchy.
9. Difference between checked and unchecked exceptions with example?
10. What are the different collection which you have used till date?
11. Collection hierarchy.
12. Difference between arraylist and list?
13. Difference between set and map?
Which of them can contain null values?
14. Equals and hashcode with example?
15. Write a clean program which takes input as “entuet” and converts it to “Intuit”. She was basically
checking if I know how to code in java.
16. Write a program which takes input as a file containing few sentences and outputs in descending
manner the list of repeated keywords.
17. Questions on map-red in Hadoop with an example
18. few SQL queries.
19. MVC design Patten with example.
20. How to send the username and password of a database securely when you use sqoop?
21. Difference between equals and hash code? When to override etc?
22. What is single ton design pattern?
23. Give me a real life example of where we use Singleton pattern?
24. How hash table works internally?
25. Why do u want to leave your current company?
26. Why do you want to join Intuit?
27. Do you have any questions for me?
Though I couldn’t make it after this round ..it was super duper exhausting interview experience. It was
a back to back interview and I was scribbling on the board these 3hrs. Thank you geeksforgeeks.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/intuit-interview-experience-set-6/
Question 1)
Brand, Coop and Murph are scientists and are conducting n distinct experiments of various
difficulties. All three want to do the experiments in the order of the difficulty of the experiment but
there’s a catch. They are currently in different time dimensions but are connected by one thing –
gravity! If at least two of them end up doing the experiment in the same order then due to gravitational
anomaly all the experiment will fail.
Now given the number n and a list of difficulties di for each experiment, is there a way to order the
experiments such that:
All 3 do the experiments in the order of difficulty from least difficult (denote by a lesser difficulty
value) to most difficult.
The order of these experiments should be unique i.e no two scientists can do the experiments in the
same order.
Input
1 Question 2)
Skynet has grown to become the dominant force on earth and has almost completely wiped out the
human race. Skynet has been building robots ever since it’s inception and has been updating it’s
models every year while making them better. Skynet wants to annihilate humanity completely. It plans
to remove one last band of humans lead by John Connor. Skynet thinks it can destroy these humans
using only two of it’s robots. But Skynet doesn’t want to send two robots with the same model number
lest John Connor finds out a weakness in that model and easily destroy both of them.
Skynet has at its disposal N robots and to save space Skynet has stored information about pairs of
robots belonging to the same model. If it doesn’t have any info stored for a particular robot then it is
implied that the robot is the only one in that model.
Given these constraints, in how many ways can Skynet pick two robots to destroy John Connor and
his rag tag group of humans.
Inputs
N – Total number of robots. Each robot is assigned a number from 0 to N-1
P – Number of pairs for which Skynet has information
This is followed by P pairs. Each pair has two numbers P1 and P2 each where 0
Source
http://www.geeksforgeeks.org/written-test-national-instruments/
Category: Interview Experiences Tags: National Instruments
Magic Bricks Interview Experience
First Round:
Ten MCQ and 1 coding question.
Technical Round:
1) Array based questions.
2) How to find total number of tables in ur data base.
3) About projects.
4) find duplicate in an array
5) what is diffrence between multiprocessor and multi cpu system.
6) what is ip address.
7) Reverse a given array.
Technical HR Round
1) print pattern.
2) fibonnaci numbers code
3) find substring in a given string
4) count duplicates
5) strength and weekness
6) projects
7) Qualities u want in ur boss
8) why should we hire u
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/magic-bricks-interview-experience/
I dont remember other questions, but the interviewer grilled me completely in Java.
Later i was informed that i was not selected, but i was really impressed with the nature of the
interviewers, they were very friendly and cooperative, I was happy that i realised how hard i need to
work. Thanks GeeksforGeeks because of which i could solve few of them.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/intuit-interview-experience-set-7-3-5-years-experienced/
Adobe Interview Experience for MTS-1 (1.5
Years Experience)
2 Rounds of online test, one related to aptitude and other is related to c++. Aptitude one had around
39 questions and 2hours was given. C++ one had 19 questions and 2 hours was given. 7 coding
questions and others basic c++ questions.
Round 1(Technical):-
1) There are N nuts and N bolts, u have to find all the pairs of nuts and bolts in minimum no. of
iteration (comparision). All the nuts/bolts might have different diameter.
2) There is a paragraph having million characters. You have to find out the first non –repeating
character in the complete paragraph. For example:- aab cld jb then answer should be :- c
Round 2(Technical):-
1) Questions related to Multi-Threading i.e synchronization or usage of Volatile (Basic questions)
5) There are chocolates each worth x. You have total amount y with you. And you can exchange z
wrappers for 1 chocolate. So in this way how many chocolates he can eat.
Round 3(Technical):-
1) Declare a 2D array using pointer notation.
3) Suppose there are packages having volume m and there are n packets having volume a,b,c…. each
having volume less than m. So you need to find out the minimum no. of packets required to wrap up
the products.
4) There are N cities spread in the form of circle. There is road connectivity b/w city 1 and 2, then
city 2 and 3 and so on till city n and 1. Each ith city has a petrol pump where you can pick pith petrol
and distance between ith and i+1 th city is di . Assume you car has a mileage of 1km/litre. You have
to find out if there exist any city, if you start from that city then you can visit all the cities either in the
clockwise or anticlockwise fashion.
3) Things that every software programmer should know and he asked me to convince him.
5) Asked me about any open source projects which I had and put in GIT…… told him about all of my
projects.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-experience-mts-1-1-5-years-experience/
Rockstand.in interview experience
Recently i applied online at rockstand the process took three days to complete.
1st round– shortlisting from resumes. They shortlisted who have good hand in each technology
(c/c++ java asp php mysql html css)
2nd round – it was technical MCQ round. There were 7 sets of paper each containing 15 question
(level – difficult)
those sets were c,c++,java,php,asp,mysql,python.
cut off was moderate.
1. http://www.geeksforgeeks.org/a-program-to-check-if-strings-are-rotations-of-each-other-or-not
2. find intersect of two sets containing digits
3. swap kth node from beginning of the linked list to the kth node from the end.
4. return second largest element from an array.
5. implement linked list addnode() at last deletenode() count() middle element()
6. create GUI and data base connectivity in mysql and show it on page( i did on php)
7. implement BST.
8. Merge sort and find median of sorted array
9. implement Cache
tip– learn the things don’t cram them because interviewer is smart enough to catch you out tho.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/rockstand-interview-experience/
MAQ Software Interview Experience | Set 6
(On-Campus)
I recently sat in on-campus interview for MAQ Software. The whole interview process comprised of
the following rounds.
Round 1:
It comprised of general aptitude questions and two coding questions. It was an offline test. The coding
questions were:
1. Given an array A[] consisting of 0’s, 1’s and 2’s, give an algorithm for sorting A.
2. N-Queen Problem.
After this round around 40 students were shortlisted from around 150 students.
After this there were three more rounds and each round was an elimination one.
Round 2:
1. The interviewer started by having a look at my CV. He asked for a firm technical introduction.
2. He asked question about my projects. As I have had my intern from a very good place, he appeared
impressed from the very start.
3. After having a technical discussion about my CV. He gave me two questions to code as following:
a.) Given a linked list find whether loop exists or not. Find the starting point of loop.
b.) Given a very big string, find whether the given substring exists or not in minimum time and
space complexity.
Round 3:
1. The interviewer was a young guy. He too had a look at my CV and appeared impressed.
2. He discussed in detail about the two major projects done during my internship.
3. He sat smiling at me with a friendly look and said that yes you have had actually done a lot of
work. In the end for formality sake he gave me one question to code. The question was to find the in-
order successor in a binary tree. He later told me that the tree is BST.
After this round around 5 students were shortlisted.
Round 4:
This was supposed to be the HR round but out of surprise the interviewer started by giving me a
question to code. The question was to print all the combinations of balanced parenthesis for a given
value n. For example if n=2, we will have ()(), (()) as two balanced pairs possible.
After I approached this question with the right solution he just asked about my family. After that he
said to wait.
After half an hour the results were announced. A total of three students were hired and I was amongst
one of them.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/maq-software-interview-experience-set-6-campus/
SAP Labs Interview Experience | Set 3
(Campus-Pool)
Recently I sat in a campus pool for SAP. The whole interview process comprised of following
rounds.
Round 1:
It was an online round that took place on-campus. The round comprised of general aptitude, analytical
reasoning, verbal ability and computer science questions. There were two questions to code as well.
The round on a whole was good, seeing the time limit they had provided. The results were out in a
few days. Out of a total of around 100 students, 17 students from our college were shortlisted. 10 for
R&D profile and 7 for Technical or Developer consultant profile.
After this round we 17 students from our college were called at a college where the campus pool had
to take place. There were around 100 students from four different colleges there. We all were first
given a presentation about the company and then we all were divided into a group of two for R&D
and Consultancy profile respectively.
The R&D group as told, had to first undergo a first case-study round then two technical interviews
and last HR round. Each round was an elimination round. The consultancy group has to undergo one
technical, one managerial and one HR round.
I was in the consulting group.
Round 2:
This was a technical round. There was a panel of two interviewers. They looked through my CV and
started by asking an introduction. After introduction they asked me in detail about my projects. As I
have had a quite a lot of projects on my CV they seemed impressed. After discussion about the
projects they asked a probability question in due of the fact that I had won a gold medal in one of the
IMO. After that they asked general questions on DS, OS, DBMS and Java. At the end they gave me
one question to code. They asked for if I have any questions. I asked the difference between R&D and
consultant profile. They said R&D is a technical profile while consultant is a techno-managerial
profile.
I was the first amongst my group to be called for the next round.
Round 3:
Two senior interviewers took this interview. They started by letting me give an introduction. Again
that gold medal thing in IMO hit them and they gave me a question to first solve mathematically and
then approach it via programming. The question was to form all the weights from 1-40 kg by using
minimum number of base. I started from the very base and reached up to a satisfactory solution as I
had no clue about this question earlier. Then they asked me to design FlipKart with all functionalists.
After this question they asked me about how many offers I already had. I told them I have one. They
asked me about why SAP and why not which you already have. I gave them the answer which was
suitable according to me.
They asked me to wait. After sometime I was told that I was not shortlisted for HR round. May be my
reason for not joining the earlier company didn’t go down well with them.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/sap-labs-interview-experience-set-3-campus-pool/
Round 1:
Resume based and 1 coding question. Briefly discussed about projects in resume and questions were
completely related to projects mentioned.
Coding question: How will you determine the repetition element in the array? How can you do with
least space complexity?
Round 2:
This round was completely pen and paper coding round. 3 coding questions were asked.
Question 1: Root to a node path sum equals give number. With least space complexity. Problem
similar to this http://www.geeksforgeeks.org/root-to-leaf-path-sum-equal-to-a-given-number/
Question 2: There are buildings near a beach, which were of different height and placed one beyond
the other. How many buildings can see the beach.
Question 3: Given a stream of bits which are 1’s and 0’s . Find the contiguous subsequences where
number of 0’s equals the number of 1’s
Round 3:
Only one coding question was asked with time limit of 10 minutes.
There is a function getWord() which takes word as input and checks whether word is present in the
dictionary. Given a long word as input find all the meaning full ( i.e getWord() is true ) that can be
made from the given input .
Source
http://www.geeksforgeeks.org/housing-com-interview-experience-set-3-campus/
Snapdeal Interview Experience | Set 4 (On
Campus)
Hi, Recently Snapdeal visited my campus and I got an offer from Snapdeal,here is my interview
experience:
Round 1:
First round was online written round.It consists of 25 Questions.
22 MCQ’s and 3 Coding questions
1) Check for balanced parentheses in an expression.
2) Find next greater number with same set of digits.
3) Given an array where each element is the money a person have and there is only Rs. 3 note.
We need to check whether it is possible to divide the money equally among all the persons or not.
If it is possible then find Minimum number of transactions needed.
Round 2: (1 hr 45 min.)
F2F Technical Interview 2:
1) Tell me about yourself.
2) Difference between Process and Thread.
3) Find 3 elements in an array having sum K.(different approaches)
4) Implement stack using Queue. I gave him 2 queues solution.he said do it using 1 queue only.Lot of
discussion
on it ,Different approaches
5) Given an array having 0,1,2 only sort it.Different approaches.
6) What is cascading effect.
7) How many permutions are there for a string.
8) Mathematical proof for the above question.
9) Print all the permutations of string.Also dry run on given test case.
10) Binary tree to DLL.
Round 3: (20-25 min.)
F2F HR Interview:
Basic behavioral questions and Some situational questions.
I would like to thank GeeksForGeeks which helped me to improve my knowledge and understanding
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/snapdeal-interview-experience-set-4-campus/
Monotype Solutions Interview Experience
Hello friends, I am sharing my placement experience at Monotype Solutions India Pvt Ltd whose
recruitment process was conducted in my college. The process consisted of a written (online)test
followed by technical and HR interviews.
C++ questions were purely conceptual. Aptitude questions were of mixed difficulty level. 3
programming problems and we had to do 2 (randomly assigned to us).
a) Find and delete all occurrence of pattern ab ba (something like that) from a given string.
b) Given a linked list and two integers M and N. Traverse the linked list such that you retain M nodes
then delete next N nodes, continue the same till end of the linked list.
http://www.geeksforgeeks.org/delete-n-nodes-after-m-nodes-of-a-linked-list/
c) One problem based on concept of finding “Next greater element”. (given on geeksforgeeks). Out of
these, 1st and 3rd had to be run and compiled while 2nd to be submitted as plain text. They were
manually checking it.
Technical interview (1.5-2 hrs approx., mine was 2.5 hrs. Long)
1. Given a character string containing “How are you” and char*a =”Monotype”. Store “Monotype,
How are you” in single statement. I suggested doing it by for loop but he was not satisfied by this and
asked to do it using “sprintf” function.
2. What is the use of pointers? How are 2D arrays stored in memory? Simulate 2D array using double
pointers. I explained him *(*(a+2)+2) for a[2][2] but he was not satisfied with my answer. I finally
did it by allocating memory for each 1D array using malloc and then creating an array of pointers to
store the address of each such 1D array. This was correct.
3. Discussion about Big and Little Endian pcs, how to find which PC is which, interconversion using
bitwise operators.
4. Coding problem to find how many times a number continuously appears in an array. Eg:
123333345, 3 appears
five times in O(n).
8. Definition vs declaration. You have two .c files each containing a function having only one
statement of static variable declaration. Include those files in a new .c file and compile the project.
Now he asked various questions based on this that were based on storage classes’ concept. I don’t
remember the exact questions.
9. Rotation of bit pattern of a number. Edge cases were given like for a 32 bit number, if we have the
numbering of bits’ index from RHS (opposite to what we generally do in arrays, start index 0,1….n-1
starting from left) and concerned bits lie from B9 to B0 i.e. Left most 22 bits are random and not
required. Rotate so that B9->B8, B8->B7…B0->B9. Use bitwise operators.
10. 25 horses are running in a race. 5 can run at a time. Find min races to find top three.
Some more questions were there which I don’t remember. Questions like accessing array in spiral
manner was asked from other student too. Logic and not the exact code was his priority.
He asked me about my college, branch and subjects that I know being a non-IT student. He asked me
to explain what I know about Fluid mechanics, Heisenberg Principle, Atomic Models etc as I had
said that I like Science. He then asked simple puzzles like calculating 15, 30, 45, 60 minutes by
burning a rope. Correctly mark the labels on three fruit boxes having either orange, apple or a
combination of both. You can pick only one at a time. What do you know about fonts, web fonts. I told
him something about fonts family: Sans, Serif etc. (it was hinted in ppt that they will ask such things.)
some questions from resume.
HR interview(20-25 minutes)
Common HR questions from resume and as found on indiabix.com.
I would like to thanks geeksforgeeks for being such a good resource for placements preparation.
Thank You.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/monotype-solutions-interview-experience/
Snapdeal Interview Experience | Set 5 (On
Campus)
Hi, Recently Snapdeal visited my campus (Jamia Millia Islamia) and I got an offer from
Snapdeal,here is my interview experience:
Round 1:
2) Given an array where each element is the money a person have and there is only Rs. 3 note.We
need to check whether it is possible to divide the money equally among all the persons or not.If it is
possible then find Minimum number of transactions needed.
4. A sorted Array has been rotated r times to the left. find the minimum in least possible time(O(logn)
expected). http://www.geeksforgeeks.org/find-minimum-element-in-a-sorted-and-rotated-array/.
5. You have an sorted array,you have to make a balanced binary search tree from it (only approach)
and basic insertion and deletion in BST.
6. find the number occurring odd number of time (xor solution). http://www.geeksforgeeks.org/find-
the-number-occurring-odd-number-of-times/.
F2F HR Interview:
I liked the way interviewers were interacting, they were very supportive and friendly as well.
TIPS:
1. Don’t jump into solutions, ask about the type of input that is given and output that is expected.
2. The interviewer always tries to take you to the most optimal solution so listen to what all he says.
Many a times they are big hints !!!
3. Be honest.
I would like to thank GeeksForGeeks which helped me to improve my knowledge and understanding
of Data structures and Algorithms.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/snapdeal-interview-experience-set-5-campus/
Snapdeal Interview Experience | Set 6 (On
Campus)
Hi, Snapdeal visited our campus recently, and here’s my interview experience!
Written Round:
20 Aptitude Questions.
2 Coding Questions – 1. Given points of two lines A(x1,y1 x2,y2) & B(x3,y3 x4,y4) find whether the
points intersect or not!
2. Overlapping paintings, find no. of paintings that can be seen distinctly, extreme co-ordinates of
paintings are given!
1. Tell me the logic of the program written in the first round!Improve it, try for O(n) complexity!
Now make some changes in the same code in order to get O(1) complexity in most cases.(Use
Dynamic Programming!)
3. Given a 2-d array with sorted rows and columns, write efficient code for searching a number!
Puzzle : a glass, a tap given! fill the glass half without the use of any measuring instruments!
Write a program to print “Hello” and “World” infinitely using two threads, such that one thread prints
the String “Hello” and the other prints “World”!
– Why sleep() cannot be used?
– Why have you used synchronized keyword?
– How will a deadlock occur in this program?
– What will be the solution for breaking the deadlock?
Write a program in Java to find whether a given tree is a subtree of another one or not! both iterative
as well as recursive!
Suggestions?
Questions?
I would like to thank geeksforgeeks for a exhaustive set of interview questions and study material,
which indeed has helped me a lot!
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/snapdeal-interview-experience-set-6-campus/
Snapdeal Interview Experience | Set 7 (On
Campus)
Snapdeal visited our campus recently and here’s my interview experience.
Round 1 (Online):
Same questions were asked in every NIT and test was on hackerrank. We had to do 22 MCQs and 3
coding problems which are as follows:
1) Given a string of parenthesis only, check if it’s valid or not. http://www.geeksforgeeks.org/check-
for-balanced-parentheses-in-an-expression/
2) Find next greater number with same set of digits. http://www.geeksforgeeks.org/find-next-greater-
number-set-digits/
3) Given an array where each element is the money a person have and there is only Rs. 3 note. We
need to check whether it is possible to divide the money equally among all the persons or not. If it is
possible then find Minimum number of transactions needed.
Round 3(F2F) :
16 students were selected for PI.
This round was basically focused on the technical part.
1) Tell me about yourself.
2) Little discussion on the project.
3) Find the LCA of a binary tree in place.
4) About virtual constructors and destructors.
5) Design a recommendation system as you see on e-commerce sites recommending the items for you
to buy. You just have to tell the ideas and design the classes accordingly.
6) Design a product review system with posts being categorized as a review, question or an answer.
Also consider the case of upvotes, downvotes, like, share, comment.
He was done after this and then I asked some questions.
ASK QUESTIONS. It shows that you are really interested in the company.
Round 4:
I was called for 2nd PI within 5 minutes.
1) Which e-commerce site you normally purchase from and why?
2) If a shipment is changed in between i.e. product is replaced by say, a soap how will you tackle this
problem?
Nothing technical was asked to me although be prepared with concepts of Threading.
This was actually more of a conversation than an interview. The interviewer was very friendly. We
discussed the elements in and about Snapdeal.
Round 5(HR):
1) Tell me about yourself.
2) What is your real goal in life.
3) Your manager is being bossy. How will you tackle this situation.
4) Toughest challenge you faced in your college.
5) You are the favourite of your manager but others are being jealous. What will you do?
I would like to thank GeeksForGeeks which helped me to improve my knowledge and understanding
of Data structures and Algorithms.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/snapdeal-interview-experience-set-7-campus/
Cadence Interview Experience | Set 2
I applied through cadence home -> careers ->. I uploaded my linkedin link as resume. I got a call
within a week and was asked to give a telephonic round.
Round 1 – Telephonic
4. What is UNION in C?
I was then called for face to face interviews; I did not delay and fixed it the day after today.
Round 2 – F2F
1. What does your current company’s software do? About the current company?
2. Compilation of a C/C++ code. He gave me a dummy program. He then asked me to use #ifdef
#endif in the header files, then asked its uses.
4. There is a stack where push and pop operation are happening. At any point of time user will query
secondMin(). This API should return second minimum present in the stack.
5. Given a number, tell number of bits set in the number in its binary representation. Ex. N = 5, Ans –
2 (101 has 2 1’s in it)
6. Reversing a string recursively, iteratively. He then asked me to rewind the whole stack or trace the
recursive version for examples – “hello” and “ABCD”.
Round 3 – F2F
2. Concept of virtual function in C++. How is a vtable maintained? What are its enteries? Example
code where virtual function is used.
4. References in C++.
5. What is a static function in a C++ class? Why is it used? How to call a static function of class from
any part of the code.
6. Given an array of numbers (+ve and –ve), tell the subarray with the highest sum.
3. Puzzle: 100 floor building and 2 eggs given, find the minimum/maximum number of trys required to
find the floor where the egg will break. The answer I gave was 19. He asked me to normalize the
solution; we then came up with answer 13.
4. Puzzle: Jumbled N pens and N caps, all caps separated from their pens, all pens have some
thickness properties. How would you cap all the pens?
5. Given a dictionary, how can you represent it in memory? What will be the worst case complexity
of a search done on the DS designed?
Round 5 – HR
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/cadence-interview-experience-set-2/
Persistent Systems interview experience
(on campus)
Persistent system came to our campus for recruitment. I faced so many problems before the interview
because i searched a lot about the interview process and type of question asked in the written paper
as well as in the interviews in persistent sys but I didn’t find anything about it, meanwhile my seniors
helped me a lot. Hope that my experience would be definitely help u in all the selection process.
There was a written test having 50 question in 1 hour in which every topic had been covered.
5to8 questions were asked from the aptitude part those were avg level qus and rest of the
questions were asked from the software section.
There was no verbal reasoning question.
Most of the question asked from networking, Dbms, OS. also software testing qus are important.
Some of questions were from ds and algo, those were quite easy.
Keypoint :time management plays a vital role because question were not tough but provided time
was less.
Coding round
A simple data structure question was asked ,need to write full code for it.If u got selected in the
objective paper only then coding paper would be checked.
1. As i entered in the room, He said me to have a seat and then started to see my resume meanwhile
asked me “tell me about yourself”.
2. Deep disscussion on my projects those were mentioned in the resume.He was quite impressed to
my projects and the way of explaining it.
3. Basic oops concepts like what is polymorphism,abstraction, encapsulation and give the daily
life examples of it.
4. what is buffer overflow?
5. How to implement queues using stacks?
6. How to implement stack using queues. Only he wanted to know my approach.
7. Difference between c++ and java?
8. difference between tcp and udp?
9. some basic sql queries like join (inner ,outer ).
10. reverse a linked list with recursion full code was needed.
11. He asked 2 standerd puzzles, i knew both of the puzzles but i pretended like it was the first time i
m soving it . I took 10 mins in solving it. He was fully satisfied with my answers .
12. asked some basic qus of OS like difference between process and thread, what is paging ,page
fault, thrashing.
keypoint:-
Resume is very important. You should prepare each and every point that is written in the resume and
fell free there, dont be nervous. Show your confidence . Always remember “they r here for your
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/persistent-systems-interview-experience-campus/
Goldman Sachs Interview Experience | Set
7
Telephonic Round(1st Round) (Manager):
1) Swap two variables without using third variable.
2) There ‘s an array with every element repeated twice except one. Find that element.
3) Implement LRU cache
4) How will you implement State Machine
5) Design Problem: You have a database of million records, that needs to be acessed for each
operation. That database is updated very rarely. And there are multiple processes that queries the
database and operates on the values. How will you design this?
6)How do you write a callback function?
struct StudentRecord
{
int id;string name;
}
3rd Round(F2F):
1) You have the co-ordinates of two rectangles. Find in minimum number of comparisons, if they are
overlapping or not.
2) Write code for implementing Tower of Hanoi problem. What data structures you will use? How
will you implement the Move function(that moves the disc).
4th Round(F2F):
1)Discussion on Important c++ concepts: Virtual functions, Run time polymorphism, Static
polymorphism, Function overloading, Function overriding, Types of cast in C++, Static_cast,
Dynamic_cast, difference between new and malloc, Copy constructor, operator overloading,
Templates
2) Program for Anagrams. Different approcahes( hashing, sorting)
3) Code for first non-repeating character in the string
4) Least Common Ancestor for n-ary Tree.
2) virtual functions, auto_ptrs, ordered_map, Hashing, Chaining , Linked list vs array, Inheritance
Concepts, static functions, generic programming, Some advanced concepts: CRTP(Curiously
Recurring template problem), run time polymorphism
The Interviewers were very nice. If you would get stuck in any problem, they would drop hints. And
if you did any mistakes, they would prompt you and tell you to correct yourself.
Also only if all the interviewers involved will give positive feedback, then only they will move
ahead with the candidature. So they make it a point that all the team members meets the interviewee.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/goldman-sachs-interview-experience-set-7/
Works Applications Co., Ltd. Japan
Interview | Set 2
Here is the hiring process they followed (in my case):
########
#@....G#
##.##@##
#[email protected]#
#@.....#
########
Calculate the minimum distance from the start(S) to the goal(G) with passing all the checkpoints(@).
Specification
‘.’ means an opened-block that players can pass.
‘#’ means a closed-block that players cannot pass.
It is allowed to move only by one step vertically or horizontally.
1 <= width <= 100, 1 <= height <= 100
The maximum number of checkpoints is 18.
Return -1 if given arguments do not satisfy specifications, or players cannot arrive at the goal from the
start by passing all the checkpoints.
Input
The input is to be given in the following format, from the standard input.
W H
Row1
Row2
...
RowH
The first row is to describe the width and the height of the orienteering map, sectioned by a space.
Output
Output into the standard output, and put a return.
Question-2:
Implement a Immutable Queue in Java.
1. Live Coding – In this round the interviewer asked to optimize and code the first problem in the
given assignment and print the complete path from source to goal in 45-60 min.
2. Aptitude – 30 MCQs from P&C, Probability, Contribution, Profit – Loss, Time and Work etc. to be
done in 1 hour.
3. Live Coding & Technical Discussion – In this round an engineer discussed the technologies I have
worked on and then gave me another problem to code. It was to print all the permutations of a string
in sorted order. He gave me a software designing problem and asked me how will you proceed with
that and what ideas are you proposing for that kind of a design? And then he asked me about my
internship experience with Oracle and what work I was doing that time.
4. H.R. –
Not to mention but it was the best round among all. She asked me some usual questions like how their
interview process was, the differences I found in the process, why I want to work with them, how I fit
in their organization.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/works-applications-co-ltd-japan-interview-set-2/
Belzabar Software Interview Experience |
Set 4
I recently had interview at Belzabar.
First Round(F2F):
He started asking questions about data structure. Questions were easy.Graph and heap sort were
mainly focused topic.
Second Round(F2F):
In second round, he asked one puzzle(Haretown and Tortoiseville are 45 miles apart. A hare travels
at 7 miles per hour from Haretown to Tortoiseville, while a tortoise travels at 2 miles per hour from
Tortoiseville to Haretown.
If both set out at the same time, how many miles will the hare have to travel before meeting the
tortoise en route? ).
Third Round(F2F):
In this round he asked me 2 code reverse a string without using temp variable.
then asked one query( DBMS query to print the nth largest salary in baghel table ). Two 2 linked ques
and 3 tree questions he asked like(mirror of tree).
HR:
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/belzabar-software-interview-experience-set-4/
Category: Interview Experiences Tags: Belzabar
Microsoft Interview Experience | Set 46
(Onsite)
I had my onsite rounds with Microsoft.
Round 1. Given a circular buffer, write Get( ) and Post( ) methods . Get(n) should return the n
characters in the string, if ‘n’ elements are not present, it should throw an exception. Put( string s)
should put each of the characters of string s into the buffer without overwriting anything which hasn’t
been read by Get()
Round 2 Longest common substring from 2 given strings. As I couldn’t give optimal solutions, asked
me to write a strcmp(str1, str2) method
Round 3 Write a secure and safe strcpy( ) method . Asked me some theoretical questions about
indexing and triggers for sql
Round 4 Write a program which generates XLS column numbers given the column number in decimal.
e.g.
Input Output
1 A
2 B
26 Z
27 AA
52 AZ
53 BA
...
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-46-onsite/
It had 20 MCQ questions on C/C++ and 2 coding questions. The coding questions were:
Q1. You are given a string that represent an expression of digits and operands. Eg. 1+2*3 , 1-2+4.
You need to evaluate the string or the expression. NO BODMAS is followed. If the expression is of
incorrect syntax return -1.
Test cases :
a) 1+2*3 will be evaluated to 9.
b) 4-2+6*3 will be evaluated to 24.
c) 1++2 will be evaluated to -1(INVALID).
Also, in the string spaces can occur. For that case we need to ignore the spaces. Like :- 1*2 -1 is
equals to 1.
Q2. You are given an array of both negative and positive integers. You need to rearrange the array
such that positive and negative numbers alternate. Also, the order should be same as previous array
and only O(1) auxiliary space can be used and time complexity O(n).
eg. -2 3 4 5 -1 -6 7 9 1
result – 3 -2 4 -1 5 -6 7 9 1.
Round 2:
Q1. Given a Linked list , print yes if it is palindrome else print no.
Q2. Print the level order traversal of the binary tree in the spiral form.
Round 3(F2F):
Round 4(F2F)
Q1.website having several web-pages. And also there are lot many user who are accessing the web-
site.
say user 1 has access pattern : x->y->z->a->b->c->d->e->f
user 2 has access pattern : z->a->b->c->d
user 3 has access pattern : y->z->a->b->c->d
user 4 has access pattern : a->b->c->d
and list goes on for lot many users which are finite and numbered.
Now the question is we have to determine the top 3 most occurring k-Page-sequence.
for the above example result will be : (k=3) a->b->c , b->c->d , z->a->b.
Q2: Given two array , one of size m+n and contains m element and other position are empty , 2nd
array is of size n and contains n element.
both array are sorted , now merge the second array to first one such that the resultant array is sorted.
Expexte time complexity(m+n).
I would like to thanks geeksforgeeks for providing such a platform to learn algorithm and data
structures…
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-173-campus/
Amazon Interview Experience | Set 174
(For SDE)
Recently I went through Interviews for SDE position in Amazon Development Centre, Chennai. Here
is my Interview experience:
Telephonic round:
1) Given an array with lengths, you have to select 3 lengths (a, b and c) for a triangle such that it
satisfies condition a+b>c,b+c>a, a+c>b. Find the number of possible triangles can be created from
the given array.
ex: 3 5 6 9 10
(3,9,10), (3 5 6), (5 6 10), (5 9 10), (5 6 9), (6 9 10)
so number of possible triangles is 6
Element NGE
4 --> 5
5 --> 25
2 --> 25
25 --> -1
d) For the input array [13, 7, 6, 12}, the next greater elements for each element are as follows.
Element NGE
13 --> -1
7 --> 12
6 --> 12
12 --> -1
2 3 1
/ \ / \
1 3 1 3
\ /
2 2
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-174-sde/
OLA Cabs Interview Experience
(Bangalore)
I attended the interview for OLA Cabs in Bangalore for SDE position recently. Here is my interview
experience.
Round 1
Written Coding Test (1 hour)
We were asked to design a Bowling game and write code for it with proper OOPS concepts . The
problem statement was not difficult . Main focus was to check coding skills and writing good quality
code pertaining to OOPs concept .
Source
http://www.geeksforgeeks.org/ola-cabs-interview-experience-bangalore/
2. Design a data structure which would allow you to perform the following 2 operations supported in
O(1) complexity.
a. Insert an element.
b. Return a random number from the numbers inserted so far. A random function is given which
generates a random number.
c. Delete(int num) finds and delete a number from the ones inserted so far.
Full working code was required. They gave us more than 2 hours to complete.
2. You are given a string of 0’s and 1’s you have to find the number of substrings in the string which
starts and end with a 1.
eg : input : 0010110010
output : 6
General talk around what they do and what they expect from an engineer.
I would like to thank GeeksForGeeks for helping me in the preperation, i dont know the result so far
but am very content with my overall experience during the interview.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-experience-set-17-for-sde-ii/
Microsoft IDC interview Experience | Set
47 (For 1.7 Years Experienced)
For Microsoft Bangalore CRM team.
Experience: 1.7 years.
Question 2: Given a binary search tree , Print its zig zag traversal .
Complete syntactically correct code was required with all corner cases covered .
Round-2(Technical)
He asked me to Introduce myself and then started asking me about my project
http://www.geeksforgeeks.org/print-a-given-matrix-in-spiral-form/
Code should be syntactically correct with all corner cases handled in a single attempt.
http://www.geeksforgeeks.org/count-possible-decodings-given-digit-sequence/
Initially I started off with a recursive solution and came up with Dynamic programming solution
afterwards. Full working code was required without any corner case missing.
He asked to list down all the possible test cases for the given scenario . He was very particular about
the Test cases .
Round-3(Technical)
He asked me to introduce myself.
1.He asked me about the current project which i m working on.. and a few questions on the
technologies which were used in the project.He was very particular about my project discussion.
2. Given a linked list consisting of String in each Node . Given just a pointer to the head Node , I was
required to find whether the resultant String formed by combining all the Nodes of the linked list is a
palindrome or not .
eg – Consider this linked List structure
Hence this structure is palindrome . Was required to check for palindrome online as Linked List
length could be infinite at any point of time .
I was required to discuss and write full code on the whiteboard starting from Node structure to the
end logic .
After that i was required to list down Test Cases for the same .
Round-4:(Technical)
He asked me to walk him through my resume.
1. Why Microsoft?
2. Why do u want to leave your current company?
3. Deep discussion on the current project which I’m working on.
4. Write code for the crossword puzzle game .I said I have not played it earlier .
He then asked me to discuss and write code for Sudoku game in whiteboard. I wrote it using
Backtracking
http://www.geeksforgeeks.org/backtracking-set-7-suduku/
Round-5 (HR)
1.Discussion on current compensation etc.
A big Thanks to GeeksforGeeks for providing such a brilliant platform for interview preparation
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-idc-interview-experience-set-47-1-7-years-experienced/
Flipkart Interview Experience | Set 18 (For
SDE I)
I have recently attended Flipkart for SDE 1 @ Bangalore. Thanks to geeksforgeeks team which has
been the only single source of my preparation and helped me a lot. Below is my experience.
1) Design a book catalog search (api’s were given for the search,full needs to be implemented as
running application)
Second Round:
1)Problem Statement
Sid is obsessed about reading short stories. Being a CS student, he is doing some interesting
frequency analysis with the books. He chooses strings S1 and S2 in such a way |len(S1)?len(S2)|?1.
Your task is to help him find the minimum number of characters of the first string he needs to change
to enable him to make it an anagram of the second string.
Input Format
The first line will contain an integer T representing the number of test cases. Each test case will
contain a string having length |S1|+|S2| which will be concatenation of both the strings described
above in the problem.The given string will contain only characters from a to z.
Output Format
An integer corresponding to each test case is printed in a different line i.e., the number of changes
required for each test case. Print ?1 if it is not possible.
Constraints
1?T?100
1?|S1|+|S2|?104
Sample Input
5
aaabbb
ab
abc
mnop
xyyx
Sample Output
3
1
-1
2
0
Explanation
Test Case #00: We have to replace at least three characters from any of the string to make both of
strings anagram. Here, a = “aaa” and b = “bbb”. One possible solution is to replace all character ‘a’
in string a with character ‘b’.
Test Case #01: Either replace ‘a’ with ‘b’, which will generate “bb”. Or replace ‘b’ with ‘a’ to
generate “aa”. Both of the solution are valid.
Test Case #02: It is not possible for two strings of unequal length to be anagram for each other.
Test Case #03: We have to replace both the characters of any string to make it anagram of other one.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-experience-set-18-for-sde-i/
OLA Cabs Interview Experience | Set 2
(For Android - 1.5 Years)
First Round
Written Test
1) Implement Stack Operations. Also maintain count of Largest Integer present in Stack at any given
point of Time.
3) Design an Android application to emulate Countdown .. Take Input from the User and start counting
down from entered value till Zero with Updating App UI at every count..Show Countdown end
message when reached at Zero
1st Round.
Lots of Java basics
Android Activity lifecycles and detailed discussions about it
Services and Fragments Lifecycle .
Difference methods of Creating Threads
One fragment Related Coding problem where UI of Fragment B has to be update from fragment A.
How Garbage Collector Works in Android.
Questions on Dalvik Virtual Machine.
Different types of BroadCasts and Broadcast Receivers
2nd Round
DS Questions
Find Total number of leaf Nodes in B-tree
Clone Linklist with random pointers.
Find Missing number in AP.
Print Left View of B-Tree.
Some Java Questions based Exceptions
3rd Round
Current Project Discussion.
Few questions related to that.
Questions on Telephony Class and Geofencing.
Problem related to Reverse geocoding.
Persistent Storage types in Android.
Discussion on Content Providers and Shared Preferences.
Coding on Content providers
Given a rotated array ‘K’ times (K unknown), find a number in most efficient way.
Scheduling algorithms in OS. (Implement LRU using choice of your language)
BFS traversal of B Tree.
Key is to Stay ultra confident ,smile and try solving each problem with whatever way you know.
Good Luck.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/ola-cabs-interview-experience-set-2-android-1-5-years/
Online Test-
Questions-
1. Overlapping paintings, find no. of paintings that can be seen distinctly, extreme co-ordinates of
paintings are given. Ordering of paintings matter. ( Assume heights of all paintings are same, start and
end coordinates are given )
E.g.
5
1 4
2 6
3 4
8 10
7 10
XXXX
XXXXXX
XX
XXX
Simple O(N^2) solution. Starting from rightmost painting, check if it completely
2- Given points of two lines segments A(x1,y1 x2,y2) & B(x3,y3 x4,y4) find wheth
http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=geometry2#line_li
Length / complicated soln-
http://www.geeksforgeeks.org/check-if-two-given-line-segments-intersect/
Expected cut-off -
I solved 2nd question and passed 1 test case for first question ( misunderstood
So my advice, do solve both coding questions for sure and solve C o/p questions
Round 1 – F2F Technical
Avg 20-30 mins. 22 shortlisted
Q1- Given N, find LCM from of all numbers from 2 to N. Give the complexity expre
10 shortlisted
Q1- http://www.geeksforgeeks.org/turn-an-image-by-90-degree/
Q2- http://www.geeksforgeeks.org/given-a-sequence-of-words-print-all-anagrams-to
Q3- http://www.geeksforgeeks.org/find-a-triplet-that-sum-to-a-given-value/
I was the first one to solve all 3 in 45 mins roughly and went for next intervie
Round 3- F2F Technical
4 shortlisted. This round went for almost 1hr 45 min - 2 hrs for me since I solv
Q1- Variation of
http://www.geeksforgeeks.org/find-possible-words-phone-digits/
Given a dictionary of words and a number n. Find count of all words in dictionar
N=6, H=4
2 3 5 6 4 4
changes to -> 4 4 5 6 4 4
2 3 5 6 4 4
changes to -> 2 4 5 6 4 4
Cost is ( 4-3 = 1 )
3 shortlisted
Typical HR round.
I would like to thank geeksforgeeks for a exhaustive set of interview questions
If you like GeeksforGeeks and would like to contribute, you can also write an ar
Source
http://www.geeksforgeeks.org/snapdeal-interview-experience-set-8-on-campus/
Snapdeal Interview Experience | Set 9 (On
Campus)
Snapdeal visited our campus recently and here’s my interview experience.
Round 1 (Online) :
Test was on hackerrank. We had to do 22 MCQs and 3 coding problems which are as follows:
1) Given a string of parenthesis only, check if it’s valid or not. http://www.geeksforgeeks.org/check-
for-balanced-parentheses-in-an-expression/
2)Find next greater number with same set of digits.
http://www.geeksforgeeks.org/find-next-greater-number-set-digits/
3) Given an array where each element is the money a person have and there is only Rs. 3 note. We
need to check whether it is possible to divide the money equally among all the persons or not. If it is
possible then find Minimum number of transactions needed.
All students who got selected for Technical Round 2, were selected for HR Round.
This round was a really good one, because the HR interviewer asked different questions to different
people
A few puzzles like 25 horse puzzle were asked and a few maths problems like number of rectangles
in a chess board.
He asked me to tell something about myself, which isn’t there in the resume.
And mind well each and every word you speak, each and every conscious or sub-conscious gesture of
yours is taken into account. [The HR round was one of the bests I’ve ever had, gave some feeling of
the Roadies Interview XD]
The most important thing for SnapDeal is that, don’t give up on the questions at all, because even if
you don’t hit the solution, the interviewer provides lots of hints, and in the end, even though you give
him an inefficient solution, but provide the proper code, you will be through :).
I’d like to thank GeeksForGeeks community for sharing their knowledge which helped me secure this
interview.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/snapdeal-interview-experience-set-9-campus/
Snapdeal Interview Experience | Set 10
(On Campus)
Round 1 : Online Test
Duration : 1 hr
Content : 22 MCQs , 2 codes
Platform : HackerRank
Code Snippets :
Some very good questions which require an in depth understanding of pointer concepts, increment
decrement operators, printf function, union etc
Examples :
->for(printf(“1″ ; !printf(“0″);printf(“2″))
printf(“Snapdeal”);
->int a=-6
cout>2);
->printf(“%s”,”snap” “deal”);
->union u1{
int a:2;
int b:3;
int c:4;
}var;
int main() {
var.a=2;
var.b=-6;
var.c=4;
cout E.g. 5 1 4 2 6 3 4 8 10 7 10 XXXX XXXXXX XX XXX
2)Given points of two lines segments A(x1,y1 x2,y2) & B(x3,y3 x4,y4) find whether the 2 segments
intersect or not.
http://www.geeksforgeeks.org/check-if-two-given-line-segments-intersect/
I solved 2nd code ( all test cases ), all mcqs, 1st code ( 2/6 test cases) [ranked 3rd in online test]
Its very important to solve atleast one code.
My advice :
->Before the test : check geeksforgeeks snapdeal interview archives and solve all the online coding
questions ->During the test : (If you think you cannot do both the codes) Find the easier one and
‘complete’ it within 20 mins,solve as many mcqs in 30 mins , in last 5-10 mins try to pass the sample
test case of the 2nd code (something is better than nothing)
Day of interview:
2)Given an array of positive and negative numbers , find the maximum sum of any subsequence.
Return both the sum and the subsequence.
Ambiguous Question:
Maximum sum of any subsequence (note: it’s not increasing subsequence)will be sum of all the
positive numbers in the array [Trivial]
Therefore, I interpreted subsequence as subarray http://www.geeksforgeeks.org/largest-sum-
contiguous-subarray/
2) code : There are two sorted arrays. First one is of size m+n containing only ‘first’ m elements.
Another one is of size n and contains n elements. Merge these two arrays into the first array of size
m+n such that the output is sorted.
This question was a modified form of http://www.geeksforgeeks.org/merge-one-array-of-size-n-into-
another-one-of-size-mn/
But this solution is of O(m +n ) for merging + O(m) for shifting : he asked me to optimize without
shifting
Don’t give the optimized solution first : My plan of action : O(n2) , O(nlogn) , O(m) + O(m+n) ,
O(m+n)
He was very happy with the way i approached the problem.
3) DBMS concepts : Indexing : why is it required , how is it achieved , why B+ tree , difference
between B tree and B+ trees , types of indexing , difference between them , advantages and situations
where they can be used , can we make an index for a group of tuples (ans : yes ) , why do we need
such an index , multilevel indexing.
4)DNS – Domain name servers : what are they , how do they operate , what is iterative dns search ,
recursive dns search , TLD servers , Authoritative servers , why do we need them , how are they
maintained , what are proxy servers , why do we need them , what are mail servers , under which
server are they maintained (ans : under authoritative servers)
Advice for design question : Ask for requirements first and keep writing them on a paper , and keep
cross questioning on the available data.
Round 5 : HR round
If you have made till here that means you are selected.The HR guy in snapdeal is the coolest HR I
have met .He asked me name of the campanies that have hired me till now,i gave him both their names
and he was like ‘tab toh tum rejected ho bhai ‘.(non)Typical HR questions followed :D.
I would like to thank geeksforgeeks for its exhaustive set of questions with optimal solutions and
explanation, for the company archives, and the various interview experiences and success stories.
Keep updating.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/snapdeal-interview-experience-set-10-campus/
Snapdeal Interview Experience | Set 11 (On
Campus)
SnapDeal visited to my campus recently. Below is my interview experience.
Round 1(online)
20-23 MCQ Questions: Questions were mixture of Quantitative aptitude and Computer Science.
Three Coding Question.
1) Given a string of parenthesis only, check if it’s valid or not. http://www.geeksforgeeks.org/check-
for-balanced-parentheses-in-an-expression/
2) Find next greater number with same set of digits. http://www.geeksforgeeks.org/find-next-greater-
number-set-digits/
3) Given an array where each element is the money a person have and there is only Rs. 3 note. We
need to check whether it is possible to divide the money equally among all the persons or not. If it is
possible then find Minimum number of transactions needed.
Selection for the next round was depends on the number of programing question you solved and
number of test cases passed.
Suggestions: Prepare Data Structure and Algorithm properly, they were looking for people having
good coding skill, so CODE each question while preparing.
Most of the questions were form Dynamic Programing, prepare DP. First tell them recursive solution
and then how you are going to solve the question using DP, after that start coding.
Don’t panic, if you are not getting optimal solution, try to optimize as much you can (DON’T GIVE
UP). Then try to code your solution (most important part).
Thanks to Geeksforgeeks for proving such awesome platform for preparation. This is the best site for
interview preparation for any company.Friends try to utilize this platform as much you can.
To Geeksforgeeks team please add puzzle problems. We need a section for puzzles.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/snapdeal-interview-experience-set-11-campus/
Myntra Interview Experience | Set 3 (On-
Campus)
Recently Myntra visited our campus for hiring full timers as well as interns . I would like to share my
experience as a full time applicant.
Online Round
This was a 2 hour round consisting of 5 mcqs and 2 codes
The mcqs were pretty much simple based on DS, DBMS, OS, OOP, C
1> Given N leaves numbered from 0 to N . A caterpillar at leaf 0, jumps from leaf to leaf in multiples
of j(j,2j,3j like this) ,j is specific to the caterpillar,until it reaches the end . On whichever leaf it
jumps it eats a little bit . You have to find out how many leaves ,from 1 to N, are left uneaten after k
caterpillars have reached the end,each with their own jump factor (j).All the caterpillars begin at leaf
0.
example :
N=10
k(number of caterpillars)=3
then all the leaves eaten by the first caterpillar are (2,4,6,8,10)
those eaten by the second one are (3,6,9)
those by the 3rd one (4,8)
output=3
2> Given a number n>0, you have to find the number formed by just inverting the bits of the number .
for example: binary of 5 is 101 ,inverting the bits we get 010 =2
so input=5 output=2
PS : merely ~n wouldn’t work
PI round 1
Code 1
Given a binary tree ,you have to invert the tree ,i.e. the parents would become children and the
children would become parents
for example
Given: 1
/ \
2 3
/
4
output: 4
\
2 3
\ /
1
Code 2
Given a set of numbers ,you have to find the max and the second max in minimum number of
comparisons.
Apart from the codes there were some questions on OS,process stack, heap memory in Java, Garbage
collection,OOP principles and comparison based sorting
PI round 2
Code 1
Given a set of integers ,you have to find the largest number possible by rearranging the contents in the
array
for example :
input: {,78,99,101}
the largest number possible by rearranging the contents of the array is 9978101 .
Discussion on DBMS , what is indexing? ,on which attribute should we have an index for efficient
retrieval… what data structures are used for indexing ..advantages of B+ tree
When should we not use indexing? some basic questions on SQL
PUZZLE
Two boys A and B enter a tunnel . At 2/3rd of the tunnel,they see a train coming towards the tunnel
,the train is still at a distance from the tunnel . A runs back to that end of the tunnel from which they
entered the tunnel,B runs towards the other end of the tunnel. Both of them just make it without being
run over by the train . The train is travelling at a speed of 60kmph.
Hint: We need one more variable to solve this question.But that wont be told at the beginning,. We
have to find out which variable that is.
PI round 3 (Managerial)
Puzzle 1
Given a biased coin,how would you take an unbiased decision .You don’t know whether it is biased
towards heads or tails.
Puzzle 2
Given a cylindrical glass of water,how would you conclude whether it is more than half filled ,or less
than half filled. The glass is not transparent and you do not have any measuring instrument. And you
cannot spill out or add anything.
Puzzle 3
A man lives on the 12 th floor . Everyday he uses the lift ,comes to the ground floor and goes to
office.On his return ,three cases are seen
1> whenever he is with someone in the elevator he takes the lift directly to the 12th floor
2>whenever its raining he takes the elevator to the 12th floor.
3> on any non-rainy day when he is alone ,he takes the elevator to the 10th floor and walks up the
stairs 2 floors.
Puzzle 4
A and B are twin brothers. A is older than B by 5 minutes . A celebrates his birthday each year on
16th march whereas B celebrates his birthday on 15th march . Explain the situation.
Apart from this ,he asked questions like ,what are my career goals,what do you look forward to in a
boss ,how do you see yourself in 5 years ,etc etc (you all know it :P)
HR Round
If you have made it this far,it means you are doing pretty great . The HR round was kind of a normal
chitchat session,..
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/myntra-interview-experience-set-3-campus/
Microsoft interview Experience | Set 48
(For 1.5 Years Experienced)
Here goes my experience.
Skype Round:
1) Level order traversal of a binary tree. Extend or modify the code to zig zag traversal.
http://www.geeksforgeeks.org/level-order-tree-traversal/
http://www.geeksforgeeks.org/level-order-traversal-in-spiral-form/
http://www.geeksforgeeks.org/sort-an-array-of-0s-1s-and-2s/
http://www.geeksforgeeks.org/print-last-10-lines-of-a-given-file/
http://www.geeksforgeeks.org/print-right-view-binary-tree-2/
http://www.geeksforgeeks.org/print-nodes-top-view-binary-tree/
1) Questions about my previous company work and why would I want to shift.
2) Given a matrix which is spirally sorted. Remove an element and insert another element without
messing up with the sorted order. More importance was given to coding
1) Given an array filled up with 1 to n^2 in randomized order. Fill it in a square matrix of size n.
2) Give test cases for atoi function.
A big Thanks to GeeksforGeeks for providing such a brilliant platform for interview preparation.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-48-for-1-5-years-experienced/
Flipkart Interview Experience | Set 19 (For
SDET)
Telephonic 1:-
1) Given string s and string t find whether all permutation of t is present as substring in s.
F2F 1:-
F2F 2:-
F2F 3:-
F2F 4:-
Given a login page come up with all possible test case from login API point of view and UI point of
view.
Given two string find whether two are anagram of each other or not. Write clean and runnable java
code with covering all possible test cases.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-experience-set-19-sdet/
3rd Interview :
It was entirely non technical for me but for others it was an HR+ Technical Round . The panel was not
an HR guy . He was technical head of a division in Visa San Francisco . So he talked about technical
stuff to other but for me nothing. We talked for a bit and that was the end of last round .
Hope this helps some Visa Inc aspirants . All the best .
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/visa-interview-experience-set-4-campus/
Amazon Interview Experience | Set 175
(For SDE)
Here’s my interview experience for Amazon, Bangalore for SDE
Round 1 (F2F)
Q1.) Given a function rev(int i) which reverses the segment of array ar[] from 0-i, Implement a
function sort() using rev().
Q2.) Given an array ar[] of length ‘n’ and an integer ‘k’ such that k Round 2 (F2F)
Q2.) There are millions of string in the database. How would you store them for efficient searching.
You also need to print all anagrams together many times, now how would you store them and insert if
a new string is added to database ?
* Behavioral questions.
Round 4 (Telephonic)
Q1.) Most challenging problem faced (obviously in projects), how you solved it.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-175-sde/
BrowserStack Interview Experience | Set 6
(On-Campus)
BrowserStack visited our campus during the placement season of IITs.
1. Write a program which takes JSON as input and gives prettified JSON
2. C Comment parser.
Problem 1:
Consider the following series:
A := 1
B := A*2 + 2
C := B*2 + 3 and so on…
Write a program that:
You may use a greedy approach for the last part. Compute the values of the numbers corresponding to
letters as and when required and DO NOT pre-compute beforehand and store them in a data structure
Problem 2:
The program will be given a folder named (optional, if not passed assume cwd). The program will
print something like this:
$ tree
.
|-- README.md
|-- closure
| |-- currencySymbols.js
| |-- datetimeSymbolsExt.js
| |-- datetimesymbols.js
| |-- numberSymbols.js
| `-- pluralRules.js
|-- e2e
| |-- i18n-e2e.js
| |-- localeTest_cs.html
| |-- localeTest_de.html
| |-- localeTest_en.html
| |-- localeTest_es.html
| |-- localeTest_sk.html
| |-- localeTest_zh.html
| `-- runner.html
|-- generate.sh
|-- run-tests.sh
|-- spec
| |-- closureI18nExtractorSpec.js
| |-- converterSpec.js
| |-- parserSpec.js
| `-- utilSpec.js
|-- src
| |-- closureI18nExtractor.js
| |-- closureSlurper.js
| |-- converter.js
| |-- parser.js
| `-- util.js
`-- update-closure.sh
4 directories, 26 files
An optional second parameter supports filtering the tree with grep like filter, only matching nodes.
Eg:
$ tree . src
.
`-- src
|-- closureI18nExtractor.js
|-- closureSlurper.js
|-- converter.js
|-- parser.js
`-- util.js
Problem 3:
In this program you have to consume Twitter.com’s REST API.
fetches the N most recent images (no duplicates) associated with that hashtag
and generates a web-page (an HTML file would do) which displays these images as a simple
slideshow
You may attempt this problem in any programming language but you may NOT use a third-party
library like twitter4j. You may have to create a new Twitter account if you don’t already have one.
Visit Twitter App Management to register a new app and obtain an API key. See Twitter REST API
docs for more details.
Problem 3(replacement)*:
Write a library in any programming language, that provides a systematic wrapper around the
BrowserStack REST API(something similar to twitter4j, which is a Java wrapper around Twitter’s
official REST API).
You will be judged on your choice data structures and methods for your library. You can create a test
account at https://www.browserstack.com/users/sign_in. If you then go to your account profile to find
your username and authentication key.
*Due to proxy servers in my college,it was not possible to submit a request to the twitter’s server(at
that time who would like to waste time configuring his local machine to handle the issue) so I asked
them to give another problem,They were nice and gave me a replacement problem.
Round 3: HR Interview.
Most of the questions were related to my projects and internship.He also asked me to rate the
knowledge of the programming language I’m most comfortable with and then he asked some very
basic but tricky questions from the language.
I’d say BrowserStack is one of the company where you don’t work rather you learn exponentially. I’m
glad that now I’m a part of it.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/browserstack-interview-experience-set-6-fresher/
AXIO-NET Recruitment Process
Experience
Hello guys, I am sharing the recruitment process experience of Axio-Net.
I got a call from Axio-Net by email. After that, I had appeared for their first round.
First round was a aptitude round. Their are bunch of simple basic numerical questions, 1 Sudoku
problem and few basic technical questions. I had selected in the first round and was waiting for the
second round.
After 7 days from the 1st round, they again called me for the 2nd round. In that 2nd round, the
interviewer was the director of axio-net, he is a nice guy. He asked me few basic numerical and few
basic programming questions. That’s it. They told me that if I’ll be selected by them, they’ll call me.
If any fresher will appear for axio-net recruitment process, then prepare well your aptitude skills and
basics of the technical. If possible try to solve the Sudoku problem.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/axio-net-recruitment-process-experience/
– My one project was basic UNIX shell,so he asked me to make one and try to illustrate(mainly focus
on FORK and EXEC).
– Tell me about yourself and then project..(try to elaborate project as much as u can).
– Digital Signature (Don’t start with its definition,always start with situation/example considering
there is no digital signature and then its use and importance ).
– D-dos attack and how to stop it.(i told it with help of IDS and IPS)
– Indexes in DBMS.
1-Mode switching
2-Single User system(i had no idea about this que,but i tried to explain it with pseudo terminal
and we restrict its value to 1).
4- cat command and how can we use it for input to a file (explain).
– Situation que – Client want his project in very small time span,then which SDLC model will u
prefer…(i answered him PROTOTYPE model but this was wrong ,correct is RAD model,but try to
explain any model u choose to develop project).
– Analytic que- Two trains start from equator and start running in different direction and they will
never collide…so which train will have more wear n tear first…9use concept of rotation,relative
motion and air resistant).
– Lateral thinking que- A man went to a bar and as he reached to bar-tender,bar-tender showed him a
gun and that man left that bar…explain scenario.
I had only two technical rounds but some of my frndz had three.Following ques r asked from my frnds
– XSS attack
– JSON.
– Digital Certificate.
– OOPs concept
HR Round:
Tell me about yourself. Tell something about school life (Prepare some fiction out of box story for this
que). Why should we hire you.Where do you see yourself in next 5 yr. Any plan for Post-
graduation(M.S)..(play diplomatically in this ans). One puzzle of 8 balls containing one defective ball
and then some condition like u don’t know whether defective ball is light or heavy than others.
TIP: Prepare CRYPTOGRAPHY and try to ans as much as u can and in details, even if u dont have
enough knowledge about that que…ALL THE BEST
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/visa-interview-experience-set-5/
Hike Interview Experience | Set 6
Hi, Recently I was interviewed by Hike. I have 4 years of experience.
Round 1
Machine Coding round to create an android application to take pictures from and upload to a server.
Designing , thread safety and performance was evaluated
Round 2
1.Given a sorted array of m size with m elements
and another sorted array of m+n size with n elements starting from the 0th index .
Merge these two arrays in linear time without using extra space
Round 3
questions on hashmap working ,concurrent hashmap and Collections.synchronize
Round 4
How to analyze usage history of a application
Reverse alternate levels of a binary tree
Round 5
Designing a LRU Cache which is thread safe and can be scaled
Designing a file sharing mechanism between two users .
Concepts of distributed systems were asked.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/hike-interview-experience-set-6/
Telephonic Round 2:
1) You are given an array as an input. The array is organized in such a way that its element are
arranged in increasing order up till a certain index and in decreasing order after that. Write an
algorithm to search an element in such a array.
http://www.geeksforgeeks.org/search-an-element-in-a-sorted-and-pivoted-array/
Face To Face 1:
1) You are given two array of “n” length. First array contains the arrival time of various trains on a
particular station. Second array contains the departure time of those trains. Write an algorithm to find
out the minimum number of platforms that will be required to accommodate all the trains.
http://www.geeksforgeeks.org/minimum-number-platforms-required-railwaybus-station/
2) You are given a binary tree. A light source is placed on the right of the tree. Print the list of all the
nodes over which the light is falling directly.
Face To Face 2:
1) A new feature is to be implemented in Kindle. FEATURE : The user inputs the no. of days in which
he would like to complete a particular book and the Kindle will create a reading plan for the user.
Write an algorithm which will output the reading plan to the user. The reading plan should be created
keeping in mind that the user would like to begin and end reading a particular “chapter” of the book
on the same day.
2) Some general questions:
a) Tell a project where you had faced tight deadlines and you had to skip a few things.
b) How did you decide, which things should be skipped?
c) If given a chance to implement the same project again, how will you implement it?
I gave all the answers with respect to a college project.
Face To Face 3:
1) A very brief discussion of what my current responsibilities are. It was a 5-10 minutes discussion
only. I feel that the discussion was brief as my experience was just a little over 1 year.
2) Given a binary tree write an algorithm for spiral traversal of the tree.
http://www.geeksforgeeks.org/level-order-traversal-in-spiral-form/
3) You have N documents, where N is very large. Each document has a set of words lets say
w1,w2..wm where m might differ for each document. Now you are given a list to K words lets say
q1,q2…qk.
Write an algorithm to print the list of document which have the K words in them.
This question required a number of hints. I finally came up with the solution of creating a combined
trie for all the documents. After listening to my solution he said that it was good but could have been
better with B-Tree. I told that as of now I am not able to memorize the concept of B-Tree and he said
he was satisfied with the trie solution that I had given.
Face To Face 4:
1)
a) What are various types of tree traversals and diff between them?
b) Which of the traversals would you require for creating the tree (unique) back?
2) You have a very large array, but the array can contain only three elements: 0,1& 2. Write an
algorithm to sort the array.
Count Sort was one option, but it didn’t strike to me at that point of time. So I came up with a trivial
algorithm which sorts by putting all the 2’s to the right and all the 0’s to the left, 1’s get sorted by
themselves.
For all the questions in all the interviews I was asked for the time complexity of the problems.
However they didn’t expected me to do some calculation and then come up with a very tight bound
solution. They just wanted a rough estimate of the time complexity of the solutions.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-176-sde-1/
Symantec Interview | Set 2
Hi, Recently I was interviewed by Symantec.
After this I got a mail from HR, that I was not selected.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/symantec-interview-set-2/
Computer Sciences Corporation (CSC)
Interview Experience (On-Campus)
Hello everyone! CSC came to our campus for full time hiring of final year students.
Here is my interview Experience. It consists of three rounds. Each round was an elimination one.
Suggestions:
Prepare “Tell me about yourself” in well format and don’t tell things which you already mentioned in
your resume. Present your projects in impressive way.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/computer-sciences-corporation-csc-interview-experience-campus/
First round had two sections technical (20 Minute) and aptitude (40 Minute) of one hour.
In Technical Section we have 20 single choice objective programming question from Basics of C
Programming Language. Questions are quite easy. Some of them needs to select correct output of
given program and some need to select correct program for given output in question.
In aptitude section we have 40 single choice questions. Questions are typical from Math and Logical
Reasoning.
Input Matrix: - 0 1 2 3 4
5 6 7 8 9
10 11 12 13 14
15 16 17 18 19
Output :-
0 5 10 15 16 11 6 1 2 7 12 17 18 13 8 3 4 9 14 19
Q2. Write a Function to check if the given string contains the given number of unique characters (You
should ignore case of character so ‘R’ & ‘r’ should be counted as same character.).
Q3. Write a Function to find the Increasing Subsequence whose sum is highest in which each number
is greater than previous by one in the given array. If the difference is less than or greater than one then
it is not considered as subsequence. Print the subsequence array and sum of the subsequence array.
Time complexity of program must be O(n).
Input array :- 1 , 2 , 3 , 4 , 5 , 3 , 4 , 5 , 6 , 7 , 9 , 10 , 11 , 12 , 8 , 9 , 10 , 21 , 35 , 36 , 37 , 22
Output :- Longest Subsequence : 35,36,37
Sum = 108
I think result is not declared yet or I didn’t clear because I didn’t get any mail from them till date.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/nagarro-interview-experience-set-5-pool-campus-drive/
Cisco Interview Experience | Set 9 (For
Experienced)
Written Test:
1) 15 Aptitude Questions
3) Coding Question: A thief trying to escape from a jail has to cross ‘N’ walls each with varying
heights. He climbs ‘X’ feet every time. But, due to the slippery nature of those walls, every times he
slips back by ‘Y’ feet. Now the input is given as (N, {H1, H2, H3,….Hn}, X, Y}. Calculate the total
number of jumps required to cross all walls and escape from the jail.
F2F 1
1) Calculate the number of bits set to 1 in a binary number.
2) Unsorted array and a position ‘P’. Return the element that is likely to come to the given location
upon sorting the array. Do it 0(n).
3) Many question regarding UNIX N/W programming. Doesn’t need to worry. If you know already is
advantageous.
4) Shared memory, OS concepts, IPC mechanisms. Which among is the fastest IPC
F2F 2
1) Questions related to projects.
3) Explain the DS which is well suited to implement UNIX commands like PWD, LS, MKDIR, CD in
an imaginary OS. No code required. Just the DS.
F2F 3
Entire round is dedicated to projects.
F2F 4:
With team manager: Why you want to switch. Explained the work. Which team you want to join.
This article is contributed by Bharat. If you like GeeksforGeeks and would like to contribute, you can
also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/cisco-interview-experience-set-9-experienced/
National Instruments Interview Experience
| Set 2
Interplanetary trade:
Hober Mallow wants to setup an inter-galactic trade which would allow trade between different
planets. Each planet has its own set of currencies in which they trade. As there are too many
currencies, Hober decided to declare a set of M currencies (numbered from 1 to M) as the official
currencies that can be used to trade between planets. Two planets can trade if and only if they have a
common official currency or if there is another planet with which each of these planets share a
common official currency. For example, let’s say planet A has currencies – 1, 3, 4, planet B has
currencies 5, 6 and planet C has 6, 4. It is still possible for planet A and B to trade via planet C
(planet A -> C via currency 4 and then planet C ->B via currency 6 and vice versa). This type of trade
can be done with more than one planets acting as intermediary as well (i.e. planet X and Y can trade
via A, B, C if XA share a common currency, AB share a common currency, BC share a common
currency and finally CY share some common currency). Hober observes that even with these rules
there are planets which have no official currencies or planet groups which do not share any currency
with other planet groups. To enable trade among all the planets he has to implement system of new
currency for each of such planets which have no official or common official currencies. Implementing
a new currency system costs him 1 platinum unit per planet. You have to help Hober minimize the cost
for enabling trade between all the planets.
Source
http://www.geeksforgeeks.org/national-instruments-interview-experience/
F2F 1:
F2F 2:
2) What is segmentation fault. What is core dump. How to debug from core dump files
F2F 3:
Completely on projects. Also explained the kind of work they are ding there.
F2F 5:
Repeat of 3rd round. I think he is a VP. More in depth discussion on projects and stuff.
Poor communication from company side. Very irresponsible. If you are appearing, check withe them
regularly regarding the status of you interview and candidature.
This article is contributed by Bharat. If you like GeeksforGeeks and would like to contribute, you can
also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/juniper-networks-interview-experience/
Category: Interview Experiences Tags: Juniper Networks
Vizury Interactive Solutions Interview
Experience
No written test for me.
F2F1:
F2F2:
1) Level order traversal code. Also solve this problem without using null pointer
2) Find the shortest path between two elements in a matrix with some Null elements. Means you
cannot choose XY path since some location are not traversable (Dijkstra’s Shortest Path algorithm)
Round 3:
2) Implement DB copy from one system to another taking foreign key constraints into consideration (
Table B is having a foreign key constraint to table A. So B can’t be copied before A. Imagine the I/P
as a list of list i.e. adjacency list of graph. Now devise a way to copy the DB)
Got eliminated here. Never felt so bad over losing something in last few years. Good company. Try
on LinkedIn and apply.
This article is contributed by Bharat. If you like GeeksforGeeks and would like to contribute, you can
also write an article and mail your article to [email protected]. See your article
appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/vizury-interactive-solutions-interview-experience/
The First Round Was very Standard, first we had to open its Hiring test portal, in which it had 20
MCQ and 2 coding questions, which we had to complete in 1:30 Hrs.
MCQ:
Coding:
1: given 3 Numbers in Linked list, we had to return the Linked List of representing sum of all three,
covering all base and condition of addition.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-177-first-round-pool-campus/
Interview Experience at Compro
Technologies, Delhi
I recently had an interview with Compro Technologies, Delhi based firm, for Associate Software
Developer. http://www.comprotechnologies.com/#home
2.c) PUZZLE :- given 25 balls and one with a defect such that weight is less, find in minimum
measurements, given a weighing balance.
2.d) given 3 boxes containing labelled BLACK, WHITE or BLACK WHITE , having only either
BLACK, WHITE or BLACK WHITE balls in each. Initially they were all correctly labelled, but
someone messed up the labels such that they are all in the wrong place. How many balls u need to
draw and from which box so that u can tell the exact position of each label.
2.e) U are at the intersection of a road that forms a fork ( Y) . One path leads to the city of Truth
speaking people and other to the city of Liars. A liar stands at the intersection, what question would
you ask him to reach the city of truth speaking people.
3.6) Puzzle :- in a strange island, there are three different colored toads, Blue, Green , and Red , such
that whenever two toads of different color meet they change their color to the third color. Is it ever
possible that all of them will become of same color, if initially there are 12 B , 17 G , 19 R
3.7) some friends went for a holiday at a hill station. In total , there were 13 days it rained and 12
lovely evenings and 11 lovely mornings. If it rained in the morning, the evening was lovely, if it
rained in the afternoon , the morning was lovely. How many days did the trip last.
3.8) he asked to measure a time of 15 minutes from two sand timers of 11 minutes and 7 minutes.
4.2) Explain the difference between call by value and cal by reference.
4.3) Is this a valid expression for function declaration void fun(int &a, int &b); ?
4.4) write a program to find a loop in a linked list. i had to find the element where linked list was
looped.
4.6) Puzzle :-
8 people want to cross a river via boat only. They are mother , father, policeman, criminal, 2
daughters, 2 sons.
The boat can be driven by Police, mother or father only.
The boat carries only 2 people at a time.
The criminal if left without police can hurt someone but wont run away if he is alone.
The daughters left without mother would be hurt by the father.
The sons left without Father would be hurt by the mother.
If one a riverside mother is absent and father arrives by boat, he can still hurt the daughters and vice
versa.
Find a way to take them all to the other side safely, without hurting anyone.
Thanks Geeksforgeeks for providing a sensible collection of questions with proper solutions.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/interview-experience-compro-technologies-delhi/
LinkedIn Interview Experience | Set 5 (On
campus)
Online round (1 hour on hackerrank):
1. There are ‘n’ ticket windows in the railway station, ith window has ai tickets available. Price of a
ticket is equal to the number of tickets remaining in that window at that time. When ‘m’ tickets have
been sold, what’s the maximum amount of money the railway station can earn?
e.g.
INPUT: n=2, m=4
a1=2 , a2=5
OUTPUT: 14(2nd window sold 4 tickets so 5+4+3+2).
2. You are given a 2-D matrix with M rows and N columns.You are initially positioned at (0,0) which
is the top-left cell in the array. You are allowed to move either right or downwards. The array is
filled with 1’s and 0’s. A 1 indicates that you can move through that cell, a 0 indicates that you cannot
move through that cell. Return the number of paths from top-left cell to bottom-right cell.(i.e.
(0,0)to(M-1,N-1)). Since answer can be large thus you have to return ans%(10^9+7).
Constraints: Best time and space complexity were required to cover all the test cases for both
questions.
INTERVIEW ROUNDS:
Again the main concentration was to work around all possible test cases and an efficient solution as
well.
Round 3 (50 mins Skype):
This round was with the hiring manager from their head office. He just started with the basic
introduction. Asked my area of interest. Then questions accordingly.
Like:
1) One liner command to kill all process in the system which were using JAVA?
2) Difference between TOP and PS commands? why TOP is called TOP?
3) Explain XSS attacks and how to prevent it? and the same for sqli? Any experience with them?
4) Algorithmic : http://www.geeksforgeeks.org/find-a-repeating-and-a-missing-number/ gives as
many solutions you can? Then ..tell about their time and space complexity?
5) Explain your final year project?
6) Why should I hire you , not others?
7) Experiences with automated and manual testings ?
Then he asked me if I had any questions, I asked some company stuff. That’s all !! Hope that helps.
Best of luck.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/linkedin-interview-experience-set-5-campus/
CouponDunia Interview Experience
I recently got an offer from CouponDunia, here is my interview experience:
1. Let’s say that you have 25 horses, and you want to pick the fastest 3 horses out of those 25. In
each race, only 5 horses can run at the same time because there are only 5 tracks. What is the
minimum number of races required to find the 3 fastest horses without using a stopwatch?
(http://www.programmerinterview.com/index.php/puzzles/25-horses-3-fastest-5-races-puzzle)
2. Implement queue with the help of two stacks.
3. Given a table “student” of with columns Name and Marks. You have to write a SQL query to get
the 2nd highest marks from the table. Also write a query to find the nth highest marks, where n
can be any number.
4. What is left join. Give example.
5. What is magic functions and autoloading in PHP?
6. What is SQL injection?
7. Given three arrays sorted in non-decreasing order, print all common elements in these arrays.
Examples:
ar1[] = {1, 5, 10, 20, 40, 80}
ar2[] = {6, 7, 20, 80, 100}
ar3[] = {3, 4, 15, 20, 30, 70, 80, 120}
Output: 20, 80
ar1[] = {1, 5, 5}
ar2[] = {3, 4, 5, 5, 10}
ar3[] = {5, 5, 10, 20}
Outptu: 5, 5
8. Difference between program, process and threads.
9. How will you display the most popular coupons on the CouponDunia website? What approach
will you follow?
1. Speed is of the utmost concern. Imagine we have 1 million emails to send. Your code should not
sequentially send one email after another.
2. Your solution should scale. In other words, if we determine the fastest we can send emails from
a single server is 300 emails/second I should be able to run the same Java program on another
server and be able to send another 300 emails/second.
3. Your code should be careful to ensure that it is not possible for the same email to be sent twice
(especially when running multiple processes of the program).
4. Don’t worry about whether the SMTP server can handle the load. It can.
5. Order emails are sent is not necessarily important. In other words, even though I’m calling this a
“queue” it’s not important to guarantee that emails are sent in the order they arequeued.
6. Comment your code extensively.
7. Once again, speed is the primary concern. So do remember to think about what the slow points
in the email sending process could be and take efforts to minimize those pain points.
8. Send me instructions on how to compile/run/test your code along with the code itself. Also the
sql statements for me to create the table that you are working with and the sql statements to insert
a few test emails.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/coupondunia-interview-experience/
Birst India Interview Experience
Total 5 rounds: Cleared 3 and reached upto 4 round and then got rejected :(.
1st Round : 20 MCQ 45 mins with 1 min/2 min dedicated question wise.
============
Got 85% correct and selected for Next telephonic round.
Enter Commands:
CREATE FOOD = APPLE
GET FOOD
APPLE
CREATE FOOD = BANANA
## Key ‘FOOD’ already exists ##
UPDATE WEATHER = RAIN
## Key ‘WEATHER’ does not exist ##
CREATE WEATHER = SUN
DELETE FOOD
GET FOOD
## Key ‘FOOD’ does not exist ##
GET WEATHER
SUN
GET ALL
## Key ‘ALL’ does not exist ##
QUIT
Further add following functionalities/Enhancements if possible:
Solution : I used Trie DS(and not Tree DS) to accomplish this and the 1st enhancement is very easy
with this DS with less memory usage. Hereis the code for reference in test.zip
Q) Given an array in ascending followed by descending order. Find out the max from the array?
This article is contributed by Mayank Mukherjee. If you like GeeksforGeeks and would like to
contribute, you can also write an article and mail your article to [email protected]. See
your article appearing on the GeeksforGeeks main page and help other Geeks.
Source
http://www.geeksforgeeks.org/birst-india-interview-experience/
Microsoft interview Experience | Set 49
(For Internship)
Recently Microsoft visited our campus for SDE intern. The process took over 4 months.
This was conducted on CoCubes.com ,there were around 25 questions of varying level of difficulty.
Topics: C , C++ , Aptitude.
Around 60 students out of 150 were shortlisted for the next round.
This was conducted on the same day. There were two questions of data structure.
1) Write a function to check whether the parenthesis ( “( )”, “{ }” , “[ ]” ) in a given string are
balanced or not.
http://www.geeksforgeeks.org/archives/6547
2) Write a recursive function to make a list from two given Linked lists, that contain intersection of
the elements present in the given lists inplace.
Only 9 were shortlisted for the further interviews. I was lucky enough to be one of them.
We were called to Microsoft India Development Center, Hyderabad.
Round 4 (Technical)
Time- 35 mins
The interview started with my introduction. Then there was a long discussion on my project. He told
me the flaws in my project and asked me to tell how would i deal with them.
1) Given two arrays of integers( in random order), how would u determine the rank of an element.
For ex: let the two arrays be
46 32 16 73 57 2 and
86 7 98 3 75
rank (46) = 6
rank (86) = 10
rank (2) = 1
i don’t remember the exact question but it was similar to this. Fairly simple. I suggested some
approaches and i was expected to come out with the best approach.
then i was asked to code my solution and design the test cases for the same.
3)Write and explain the code to connect nodes at same level in a binary tree.
http://www.geeksforgeeks.org/connect-nodes-at-same-level/
Soon after the fourth round some of us were called for the next round.
The experience was awesome and i found that the people over there are very humble and i really
liked their helping attitude.
A big thanks to GeeksforGeeks for providing such a brilliant platform for interview preparation.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-49-internship/
SAP Labs Interview Experience | Set 4
(Off-Campus)
Hi everyone, Recently i had wonderful interview experience with Sap Labs India. I would like to
share the interview experience with all the readers and hope it will help all of you in your
preparation for SAP Labs.
First of all, i got the mail from SAP about there opening for developer position and was asked to
attend one online test. Online test had 6 parts-psychometric test, aptitude, logical, English, computer
skills and 2 coding questions. Time given to us was 90 minutes. Paper was quite lengthy and of
average difficulty level. I was able to complete all the sections, but only one coding question. My
coding question was- to reverse a string, second i don’t remember.
After one week i got the mail that i cleared the online test round and was asked to attend the interview
rounds on 14th Feb 2015.
1st Round-
Firstly the interviewer asked me to introduce myself after he introduced himself. Since i went there as
experienced guy he asked me about my workings in the current company.
Later on he asked me few coding questions like BFS and to print prime numbers between two
intervals. Then he asked question about normalization(BCNF) and some queries like 2nd max and 2nd
min(as we all know..;)) . After that he asked me some basic questions related to C,C++,Java and
difference between each of them. In the end he asked me 4 puzzles(cut the cake into 8 equal parts in 3
cuts,bulb-switch problem,calculate 45 mins using 2 candles etc.).
2nd Round-
Again 2nd round started with an introduction from both sides. Then he started asking questions from
resume itself. Working in the current company and all the projects that i have done. Few simple
puzzles,OOPs concepts (with proper explanation and coding) and some database related
questions(questions were easy you just need to brush up the basics). Some keywords related
questions from C,C++,Java(usual questions like static,final,abstract etc.). That was the 2nd round.
Then i was called for the 3rd Round. Before 3rd round they also served tasty lunch.
3rd Round-
Introduction. After that he asked me what i knew about SAP and there products(Please do read all
about SAP and there products-not all but at least some famous products like ERP). Then he asked me
one puzzle-EGG-DROP-100 STAIRS puzzle(we all know). Then he asked me to code the puzzle(I
used the binary search approach-easiest one. :P). That was the 3rd round.
Then i was called for the 4th Round.
4th Round-
Introduction. After that interviewer asked me whether i do online shopping or not. I said yes then he
asked me to design the online shopping portal using ER-Diagram . Then he asked me to create all the
tables and populate it with data. Later on he asked me to normalize it. After all of this he asked me
some simple puzzles and current salary and notice period. That was the 4th round.
After that i was asked to attend the final round and before 5th round they served snacks and tea to all
of us-
5th Round-
5th round was kind of mixture of managerial and HR. Two people came to take the interview. They
asked me questions related to projects that i have done and working of my current company. I was
asked to tell them about my current company for at least 2 minutes. Then he asked me one simple
arithmetic puzzle- Using 3 only for six times or five times i have to generate 28 or 31 using world’s
any operator. That was the 5th round.
Over all it was a great experience. I loved being interviewed at SAP Labs. People at SAP are highly
cooperative and helpful.
At last but the most i would like to thank geeksforgeeks. You really helped me a lot to achieve my
goal. Thank you so much.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/sap-labs-interview-experience-set-4-off-campus/
Amazon Interview Experience | Set 178
(For SDE-1)
In-house interview with Amazon Bangalore for SDE 1. Here’s my experience.
Round 1:
My first round was the HM round because no other panel members were free.
1. Lots of questions my current project. Why I am looking for a job change.
2. Write a calculator web application just like the one that comes with MS windows.
Trick was to evaluate the expression according to the BODMAS
Lots of dicussion on different approach using 2 stacks, arrays, lists, Tree
with and without postfix conversion.
Asked to explain all the approach on the White Board.
Round 2:
1. Link all the level order nodes to makes a linked list with the first node of each level acting as the
root of that linklist.
10
/ \
6 17
/ \ /
4 14 19
So the Linklist will be
10->null
6->17->null
4->14->19->null
Gave the answer using the 2 queue. (Level order transversal) with alternate queue for the alternate
level
Than interviewer asked to solve the problem without using any other data structure (No stack or
queue)
Round 3:
1. Find the size of the smallest substring in a given string that contains all the characters in given set
in any order.
Ex:
INPUT:
String: "abfugtabecddcca"
Character Set: a,b,c
Output: 4 ("abec")
Technical question:
Do a spiral transversal of a 2D matrix
Ex:
a b c d
l m n e
k p o f
j i h g
output: a b c d e f g h i j k l m n o p
Thank you geeksforgeeks for providing the awesome platform for preparation.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-178-sde-1/
Fiberlink (maas360) Interview | Set 2
(Written Test Question)
Write a function “runCustomerSimulation” that takes two inputs – an integer: total number of
computers in a cafe and a string: a sequence of uppercase letters. Letters in the sequence occur in
pairs. The first occurrence indicates the arrival of a customer; the second indicates the departure of
that same customer. A customer will be serviced if there is an unoccupied computer. No letter will
occur more than two times.
Customers who leave without using a computer always depart before customers who are currently
using the computers. There are at most 20 computers per cafe.
Output:
For each set of input the function should output a number telling how many customers, if any walked
away without using a computer. Return 0 if all the customers were able to use a computer.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/fiberlink-maas360-interview-set-2-written-test-question/
They Shortlisted 22 people from 200+ people. There were 3 Technical Rounds + 1 HR Round.
1st Round:
1) Write a program to Reverse a number in Java without using builtin methods.
2) Write a program to Reverse a String in Java without using builtin methods.
3) He combined the above questions such that, no matter what we provide string or an integer or a
double, the program should reverse it. Basically He was expecting method overloading concept.
4) A puzzle. You will be given with a 3 Litre container & a 7 Litre Container. Measure exactly 5
Litres of water.
5) Reverse a linked list.
6) Asked about one of my projects I mentioned in my resume.
2nd Round:
1) Detailed discussion about all my projects that I mentioned in my resume.
2) Find the common elements from 3 Lists.
3) Some questions on Object Oriented Programming Concepts.
4) Some Questions on Multi-Threading.
5) Asked in detail about ‘volatile’ variables.
3rd Round:
1) Which protocol is used by telnet?
2) Difference between telnet and ssh
3) What happens when we open a file using one tab and delete it from the other tab of the terminal
4) Some questions from Software development life cylce.
5) Basics about Virtualization & Hyperwisers.
6) Explain Cloud computing in layman’s language. (Thanks to Balaji Vishwanthan for an amazing
answer for a similar question Quora)
HR Round:
1) About my family background.
2) Roles played by me in my various projects
3) Typical HR Questions like, Strengths, weeknesses and Hobbies.
After this the HR told that the manager of the team for which they wanted me to select has not come
for the interview process that day, so, I will be having one more round with the Manager within
couple of days in their office.
I waited for 2 weeks and still they havent called. I thought its better to give up. Then one morning the
HR called and asked me to come to their office for the interview with the manager. Uff! A relief..
At VMWare Office, before the manager takes the interview, one more person from that team took a
technical Interview.
They asked me to write the code in Java for the following questions:
1) Given an array with repeated numbers, print the frequencies of each number.
2) There are 3 kinds of balls in a big array. Red, Green, Blue color balls. Arrange them in such a way
that all the red balls to the left, Green balls in the middle and Blue balls to the right of the array.
3) Modified the above question such that, the arrangement should be like, [R,G,B,R,G,B,R,G,B]. And
discussed various boundary conditions.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/vmware-interview-experience-set-2-on-campus/
Practo Interview Experience | Set 2 (Off-
Campus)
First Round
1. There were 5 Programming Questions and the test was conducted on HackerRank.
Mostly the questions consisted of all levels from easy to tough mostly on Dynamic Programming.
After 1 week I got a mail saying that i cleared the first round.
Second Round :
3. Then a designing and database question was asked. He wanted to know how well are you able to
design tables and establish relationships between them.
4. Then he asked me some front end related questions as I was working as an intern on front end
development at a company.
Overall it was a very good experience. They test you from every aspect. In the End I would like to
say that Practo is one of the best companies to work for.
Thanks Geeks for Geeks for providing a platform to prepare for such stuff. Thanks
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/practo-interview-experience-set-2-off-campus/
R2 F2F
1) Find the maximum contiguous sum in an array. Had to write test cases as well.
2) don’t remember
R3 F2F
1) On a screen, there are multiple rectangles drawn, when a user clicks on any point, find the smallest
rectangle enclosing this point.
2) Design poke feature in Facebook
R4 F2F
1) Implement file read operation asyncronously.
2) there are N large log files in sorted by timestamp. Merge them.
3) there are N large files containing operations sorted based on name to be done on an address book.
Address book is stored as name value pair in another file which is sorted based on name. Apply these
operations and store in a new address file.
Had to write code and test cases for this.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-50/
You must be good enough in writing the codes at the moment because in each interview they made us
write full functions.
Interview process had 3 rounds. 1 coding round of 90 min. with 3 questions. And then two skype
interviews.
Round 1:
Q1. fishes of different length are given. you have to find out how many fishes can she get of length 10
by making cuts on fish, where number of cuts are limited? ex. 20 30 15(lengths) and number of cuts=3
Ans. : 5 (20—-2(one cut of 10 10) and 30—-(2 cuts of 10 10 10))
round 2:
Q1. tell me about yourself?
Q2. given a string, find the length of longest string where no character repeats twice?
Q3. There is a dictionary with few words each of length 3 and start and finish word is given. You can
reach from one word to another word by changing only one digit. Like from cat, you can reach to hat
or bat or cap. What is the minimum number of steps should be taken to reach finish word from start
word.
Q4. given an array. find the pattern it follows?
there can be 4 patterns only: increasing, decreasing, increase then decrease and decrease then
increase.
round 3:
Q1. tell me about yourself?
Q2. print the bottom view of the tree?
Q3. given a bst, convert it to a binary tree such that each element is replaced by the sum of all the
elements greater than it+ its own sum?
Q4. add two numbers without using arithmetic operators?
Q5. quicksort takes O(n2) when elements are sorted what is the solution to reduce it to O(nlogn)?
the interview was quite easy. GUYS I WOULD LIKE TO FOCUS THAT PREPARE “tell me about
yourself” VERY WELL. Tell them about why u r so excited about joining there company, whether they
ask you or not.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/coupondunia-interview-experience-set-2-fresher/
Amazon Interview Experience | Set 179
(For SDE-1)
Telephonic
1) Given an array which has elements in increasing order first , and then decreasing, suggest an
algorithm for searching an element in it.
3) do not remember
F2F 1
1) Number of hops required to reach the end of an array , where the maximum hop is the value at
index.
Tweaked question after this, to reach any node.
2) print the path between any two given nodes in a binary tree
F2F2
1) Project and resume discussion.
Problems faced and how you approached them.
2) A large number of emails coming into the system, at any given time find the top k issues being
faced by the users. Problem reduced to find the top k trending words in a large file.
F2F3
1) Given a pre-order traversal of a binary tree represented by , I for internal node and L for leaf,
build the tree.
2) Find the next smallest element for all the elements in a given array.
F2F4
Started off with a lengthy discussion on current project, was asked to draw a schematic of the same,
and then was asked to discuss my roles and responsibilities as well as suggest what improvements
could be made to it.
1) Given a 2-D array, in which all the elements are either 0’s or 1’s, and all the rows are sorted, Give
an algorithm for finding the row having the maximum number of 1’s. Was asked to code and analyse
time complexity as well.
2) There is a given set of colours , say [1-N]. Now , people are coming into a stadium wearing t-
shirts of any of these colors. Write an algorithm to find the first person to come in, to have worn an
unique color.
The question wasn’t clear to me at first, so after a few examples , got what he was trying to ask.
For eg. Suppose we have colors R G B
and the stream of people are as,
GRBGGGG
the output should be R.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-179-for-sde-1/
SAP Labs Interview Experience | Set 5
(Experienced)
First of all, i got the mail and was asked to attend one online test. Online test had 6 parts-
psychometric test, aptitude, logical, English, computer skills and 2 coding questions. Time was 90
minutes. I cleared the online test round and was asked to attend the interview rounds.
1st Round-
First the interviewer asked me to give my introduction.Then he asked about the projects which i am
doing in my current company.C,C++ basic soncepts,real life examples for inheritance etc.As my
project was on web programming he asked me questions related to web like why we use
backend,how to troubleshoot problems,about performance issues, client and server.
2nd Round-
Again 2nd round started with an introduction . Then he started asking questions from resume. Working
in the current company and all the projects that i have done. Few OOPs concepts (with proper
explanation and coding) and some database related questions.That was the 2nd round. He asked me to
find a number which when divided by 2 ,3 ,4 ,5 ,6, 7 ,8 , 9 ,10 individually gives remainder 1 and
when divided by 11 gives remainder 0.Then he told me to draw E-R diagram of shopping site
like flipkart.
3rd Round-
Introduction. After that he asked why i wanted to join Sap.He asked me two SQL questions.one was
related to joins and normalization and the other was related to the aggregate functions used in SQL.
Then he asked me simple linked list question which was to find the (k/n)th node where k is the size of
the linked list and n is a given number.After that he asked me a puzzle to find the average salary of
number of persons without disclosing their salary to anyone.
4th Round-
It was just a formality and it was of 20-25 minutes.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/sap-labs-interview-experience-set-5-off-campus/
Amazon Interview Experience | Set 180
(Telephonic Interview )
I had a telephonic interview. It was of 90 minutes.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-180-telephonic-interview/
What changes to Android app you would like to make incase you become a developer there.
What do you know about a service why kind of background work can be done in them.Why not an
AsyncTask
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/coupondunia-interview-experience-set-3-for-android-developer/
Written Round :
there where 3 coding question , out of which 2 where DS related and 3 rd one was Problem solving
1. Count no of words in given string .
2. Find first non repeating character in a stream of characters
3. related to slot machine and its working
Interviews
F2F 1.
1. firstly some non technical questions where there , such as
tell me about yourself ,
Why Amazon etc
2. followed by 2 coding questions
1. Given a sorted dictionary of alien language , find order of characters.
2. find minimum number of characters needed to be added to the end of a string to make it
palindrome.
F2F 2.
was a senior guy ,
1.started with discussion on previous interview questions , as I had used DP in second question so a
brief discussion on DP , tried to test me that does I really know the concept of DP.
2. asked few puzzles , One should be prepared for some out of box questions as they want to check
the thought process . even they change puzzles and try to get different solutions. Think loud always.
F2F 3.
was also a senior guy,
1. Started with general induction and asked about till then my interview experience and related stuff.
2. Simple Matrix multiplication problem ,with only 2 double pointer are given , we need to check
sizes of both matrix , multiplication feasibility and then do multiplication .
3. Design Question from DataBase point of view , asked about table structure for the problem and had
a good discussion on it , concept such as normalisation was discussed .
Telephonic 4th
He was a very senior guy from different team ,
1. Started with general introduction followed by many Behavioural hr questions .
2. Followed by Design Question, a feature of Outlook
A Server receives meeting objects from multiple senders. Meeting object contains meeting time, sent
time, recipient(s), sender id,etc. When recipient comes and checks the server, he/she should get
requests based on meeting time and not based on sent time. Many discussions on space complexity
and time complexity.?Eg:
When C requests the server, C should get ID3 as 1st, ID2 as 2nd and ID1 as 3rd meeting.
Thanks GeeksforGeeks for such a great content , Keep doing the great work
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-181-for-sde-1/
Commonfloor Placement Questions 2014
Company : commonfloor.com (MaxHeap Technologies)
Criteria : Open to CSE , EE , EC , MA ; No CGPA Criteria
Coding Question :
You are given the vertices , edges , start vertex and end vertex of a
graph .The graph is directed and can have loops .Each edge is of length 1 . You task is to find the min
distance b/w start and end vertex if it is reachable , else print (-1)*(#Vertices reacheable from start
vertex)
#Vertices
BFS is obvious .Only thing is that Graph must be implemented as Adjacency List r
Tech Interview Round 1: (Approx 1 hr)
4) Find the first non repeating element in an array and Various Approaches (Like
6) Find all the triplets from an array that sum to a given number.Report their i
OS Funda :
1) Def of Process , Threads , their diff ,Multi Threading and a discussion about
5) 2 Processes and their codes are given . (Indirect )Find the Critical Section
1) Find whether a string is a substring of another .[I tried KMP but ended up ex
2) Discussion on why my code didnt pass all test cases ==> Ways of representing
3) Question which can be mapped to finding Longest Common Subsequence. Write Com
4) Basics of Binary Search Trees , Defined a new bst with an additional attribut
HR Interview : (2 HR ppl , Appprox 1/2 hr )
1. Introduce yourself , What do you know abt Commonfloor , Why do you want to jo
2. Suggest Some changes and also new features to add to Commonfloor website .
3. Detailed Discussion about my internship
# How did I develop the ecommerce application ?(Like division of work , Coordina
If you like GeeksforGeeks and would like to contribute, you can also write an ar
Source
http://www.geeksforgeeks.org/commonfloor-placement-questions-2014/
Flipkart Interview Experience | Set 20 (For
SDE-II)
I was recently interviewed for SDE-II in Flipkart. A lot of emphasis was on designing and
geeksforgeeks has been a lot of help. These are my interview questions:
Had a discussion on the solution with various variants and edge/faulty cases.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-experience-set-20-for-sde-ii/
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/myntra-interview-experience-set-4-for-senior-software-engineer/
2) Write a recursive function to form a list containing intersection of two given linked list without
creating new nodes.
http://www.geeksforgeeks.org/intersection-of-two-sorted-linked-lists/
http://www.geeksforgeeks.org/union-and-intersection-of-two-linked-lists/
Students who solved both the questions were selected and some who solved one question were
selected too.
37 students were shorlisted for the next round.
Only 9 were shortlisted for the further interviews. I was lucky enough to be one of them.
We were called to Microsoft India Development Center, Hyderabad. There were total 23 students
from IIT indore, IIT hyderabad,
1)Nodes at K distance from the root.He asked me to write the test cases. I wrote around 15.He was
satisfied.
2) What is deadlock?
Conditions of deadlock.
Write a code to show deadlock.
Explain Bankers Algorithm.
3)Given a column number, find its corresponding Excel column name.
http://www.geeksforgeeks.org/find-excel-column-name-given-number/
He told me That i have good coding skills.
2)Assume a computer screen.All the pixels are colored black. Given (x1,y1) and (x2,y2) you have to
color the line joining these
The experience was Grand! The people were so down to earth ! Every interview felt like a simple
peer to peer conversation.
All i would suggest is Geeks For Geeks And u need Nothing to do
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-51-for-sde-intern/
Practo Interview Experience | Set 3 (Off-
Campus)
Applied for practo off campus in February, call came for first round on 20th February.
The first round was coding. It was hosted on hacker rank. Had 6 questions which need to be solved in
2 hours. The level of questions were nice and contained 3 DP and 3 adhoc questions.
The level of the questions were high. The catch is you don’t need to solve all the questions. I solved 2
questions completely and 2 questions partially(½ and 4/8 testcases) and that was enough to clear this
round.You can download and see the questions that were asked from the following link :
https://www.dropbox.com/sh/aoxkayew1x0aamj/AAC5kjRVcodxYgdfnjd7133Ua?dl=0
This round took place on skype. The interviewer shared a link for the scratchpad, it was hosted on
hacker rank. This round was divided into 3 parts :
Given a string, calculate the number of distinct palindromic substring. e.g. if the string is aabaa, then
distinct palindromic substrings are a, aa, aba, b, aabaa. So the answer is 5.
2. He was going through my resume and asked me to discuss any project of my liking. So I discussed
“Sentiment Analysis” and how it can be connected to the kind of work Practo does. He showed
interest in the project and to some extent was kind of impressed about the work. Discussed about all
the algorithms and technologies involved in the project.
3. In the end he gave me a design question. He asked me to design a database schema for the ongoing
cricket world cup which would be able to answer queries like “which bowler took how many
wickets in a particular match”, “how many runs were scored by batsman abc in xyz match”, “how
many no-balls were bowled in xyz match and at what position in the match and how many runs were
scored off those balls”, “ball by ball update, the kind of delivery”, etc.
Hint : took idea from the way espncricinfo displays an ongoing match summary.
This was it, this round took 1.5 hours, in the end he asked me whether i have any questions, i didn’t
have. He said I will receive a call from HR next day. The call didn’t come, instead a mail came and i
was lucky to get selected.
Tip : Be thorough with your resume and the projects you do, it matters a lot. Needless to say about
Competitive programming. Practice on Hackerrank, Codeforces and leetcode.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/practo-interview-experience-set-3-off-campus/
Pubmatic Interview Experience
I was interviewed at pubmatic. this was interview experience
Round 1.
1. Print the circumference of the tree
2. given an array as stock prices find the day when should user buy and sell to maximize the profit.
3. Create mirror tree from a given tree.
4. Given a Binary tree of strings. Return the stream of string as char* so that when reverse parsing the
same string gives back the same tree.
5. Given a sorted and rotated array, find a given number in that.
Round 2:
1. Signature and return type of malloc.
2. How does free() knows the size of the block to be freed because malloc only returns the starting
address.
3. Given a service provider(idea, airtel) design DB schema for storing all the information . ( more
focused to see how will you create schema normalised and use of indexes)
4. Given a table employee( id, name , manager id) write a query to return employee name and
manager name .
5. given a stream of billion numbers find top 100 number at any instant of time,
Round 3.
1. Given a stream of 200 billion numbers (each no > 50000) , find the average of numbers.
main focus was how you store the avg.
2. Crossword puzzle algorithm. given a dictionary and a a mXn grid. find how many possible words
can be formed from the grid.
3. Given an array of size m (m Final Round with VP
1. why do you want to join pubmatic ?
2. where do you see yourself down the line in 5 years.
3. Given an array, find the no of trianlges that can be formed.
4. what do you prefer array or link list?
5. what do you prefer between link list and doubly link list.
6. what is your unique talent that distinguishes you from others.
Round 5:
Normal HR questions.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/pubmatic-interview-experience/
Round 4: (Telephonic – Hiring Manager from Seatle – All Questions on Testing and Projects)
1. Tell me about yourself
2. Roles and responsibilities of your current role
3. How do you test a search box
4. Did you ever have a fight with developer over a defect? If you had how did you solved ?
5. Few behavioral questions
Use Cracking the Coding Interview book by McDowell Lakmen for behavioral as well as technical
questions.
Tips:
1. Think loud in front of interviewer.
2. Never keep quiet during interview
3. Prepare well on the projects which you are currently working on.
4. Be honest in behavioral questions
The beautiful part of the entire interview process was in none of the interviewer looked at my resume.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-182-for-sdet-1/
MakeMyTrip Interview Experience | Set 5
(Online Coding)
Question 1: Given an array with n elements consisting of numbers between 1 to n-1 with some
numbers being repeated multiple times in the array.
Give a result[] array as output containing all the repeated/duplicate elements.
int arr[] = { 1, 2, 3, 1, 3, 6, 6 };
int[] result = getduplicates(arr);
for (int i = 0; i < result.length; i++) {
System.out.println(Math.abs(result[i]));
}
return result;
}
}
Question 2: Given an array containing a sequence of numbers , you need to identify whether that
sequence is Fibonacci , Arithmetic Expression or Geometric Expression
============ And give it’s next term as output.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/makemytrip-interview-experience-set-5-online-coding/
Given an input of string have to find whether there exists a circle which the robot would traverse.
Input of string is the set of G,L,R have to return yes or no.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/myntra-interview-experience-set-5/
Round 1:
Lots of puzzles and algo’s. The interviewer didn’t let me write code for anything, the moment I say
efficient algorithm he moved next question.
Q1. A tree is represented in the form of array. Where index(i) of the array represent value of a node
and the value inside(A[i]) represent the parent index of the tree.
Value corresponding to root is -1. Construct the tree.
For Eg: 1,-1,1,2,3,1 index 1 is root, with three children at indexes (0, 2 and 5) and index 3 is a child
of 2, index 4 is a child of index 3
Initially I did it O(n*n) and later with the help of extra space O(n), I did it in O(n)
Q2. We played a game, there are n coins where each player has to pick up coins min 1 and max 6 one
by one and the person who picks the last coin is the looser
something like http://www.quora.com/Given-n-coins-for-two-players-playing-a-game-Each-player-
can-pick-at-least-1-and-at-most-5-coins-in-one-turn-The-player-who-picks-the-last-coin-loses-the-
game-If-they-play-optimally-which-player-will-win-the-game
We played two such sets and both times the interviewer won and he asked me to find the logic behind
it, luckily I could crack it using the two sample games I played.
Q3. http://www.braingle.in/brainteasers/teaser.php?op=2&id=9653&comm=0
After long discussion I could answer this as well, with some hints.
Round 2:
This round was a mix of core java and Designing
Q1. Categories of different books in a library is stored in database as
Category => String Name ,String Id,String ParentCategory_Id
Null ->Physics->Electronics->Current
Categories are infinite and sub categories are infinite
All Categories with the parentCategory_Id null are the first level categories, and under each such
category we will have multiple sub categories.
He will give me an array_list with these tuples and I have to generate entire tree.
I wrote a class Node{ String Id, String name, List children } and I return a node with null name and
null Id as the root.
Q2. A user logged in a page and the load balancer is sending each request of a user to different
servers(instances). I want session_data in all servers, how to do this?
Round 3:
This round went pretty good
Q1. How java files are loaded into tom cat server
Q2. How different versions of the dependency package resolve
Q3. Two classes with same name in diff package, do they overload
Q4. Two classes under same package(I told him compiler will throw error) and then asked which
class will throw error first and few more generic java questions.
Q5. Asked me to design a app like ola cab.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/snapdeal-interview-experience-set-12-for-senior-software-developer/
Accolite Interview Experience | Set 3 (On-
Campus)
Written MCQ
There were 20 multiple choice questions to be done in 30 minutes time and most of the technical
questions were from geeksquiz, one blood and relation question and one simple probability question.
Input
21021
10121
10021
Hence output should be 2 time units. (Definition of adjacent only included the left , right, bottom and
upper cell and NOT diagonal cell)
Q2. You are given a Binary tree and you need to find out the maximum path sum between any 2 leaf
nodes of the binary tree (The maximum path sum may or may not pass through root of tree). To be
done in O(n) time (20 marks) http://www.geeksforgeeks.org/find-maximum-path-sum-two-leaves-
binary-tree/
Q3. You are given an unsorted array of integers and you need to find out whether there exists a
majority element in it. (Majority element is one which appears more than n/2 times in an array of size
n). To be done in O(n) time (10 Marks) http://www.geeksforgeeks.org/majority-element/
The result of this round was declared late in the night. Some 7 or 8 students were called for the face
to face interview rounds. I was the first one to be called and F2F rounds started at 11.30 PM and
ended up in 5 AM in the morning :-p I was lucky to be free around 1.15 AM
Q2. Find 5th from last element in a singly linked list. Firstly I gave a solution which took two
traversals. She said to do it in 1 traversal only. I did it by taking two pointers and maintaining a
distance of 5 nodes between them. Q3. You are given a string for example if input string is “I am abc
xyz”. Output should be the modified string as “xyz abc am I” .This was to be done inplace and in O(n)
time.
Q4. You are given a unsorted array of both positive and negative integers. You need to find out the
maximum sum subarray in O(n) time. You need to find the start and ending indexes along with the sum.
Q5. You are given a BST and two keys k1 and k2. You need to find out the lowest common ancestor
of the two keys Iteratively. I suggested the solution of storing the path in a vector and finding the 1st
mismatch of key value in the root to k1 and root t k2 path.
Q2. You are given an elevator system with 3 elevators, you have to suggest some algorithm in which
the amount of time that a person waiting on some x floor and has pressed the up or down button
should wait for least amount of time and also the person inside the elevator also should not wait for
too long to reach his destination floor.
Q3. Asked some general questions as to what are tokens of a language. What is a grammar and
production rules. Then he asked me to check whether a given code in some language is syntactically
correct or not. You are provided the set of valid tokens for this language and also symbol table.
Q4. You are given a text file storing characters or words. Suggest some way to compress the file such
that there is always some amount of space compression possible.
I suggested to use a trie tree as all the prefixes will share the space. He said this approach is
dependent on whether the input has common prefixes or not.
Suggest some other way. I then said that we can use Huffman Encoding and assign smallest code to
most frequent word in the file and so on. He said again this approach also is dependent on whether
your input has frequently occurring words or not.
Then I suggested that since all characters can be represented in terms of 8 bits or 1 byte. We can take
the XOR of prev and next character and store it in the current character position. This way I would be
able to always get a n/2 size reduction in the encoded file. The idea was similar to
http://www.geeksforgeeks.org/xorlinked-list-a-memory-efficient-doubly-linked-list-set-2/
He was satisfied and this was the end of my 2nd F2F round. He told me to get some sleep because
you will be having a skype interview with our technical manager followed by HR round in the
morning.
Q2. He shared a google doc with me and gave me a regular expression like abab*(a|b) and an input
string s. I needed to write a code to check whether the given input string could be generated from this
regular expression or not. Return a Boolean true or false value. I coded it up in 5 minutes :-p
Q3. You are given a N-ary tree and a value K. You need to return true if there exists some root to leaf
path having sum = k and false otherwise. I did it using recursion and in O(n) time.
He told me that you’ll be having your final HR round in some time. I knew that I was going well
because he seemed to be quite satisfied with my answers.
Final HR round
That was the round for which I’ve been waiting for hours
She (the HR) started off with some general questions like tell me about yourself and your aims and
goals in life. What are your hobbies. I told her that I love art and craft. She asked me what will I make
for her if tomorrow is her birthday :-p She was very friendly and nice to talk to. It didn’t
seem that I was talking to the HR. It was more like talking to a friend. She asked me what I liked
about Accolite and why do I wish to join the company and stuff. Finally we discussed about the pay-
scale and work culture in Accolite.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/accolite-interview-experience-set-3-on-campus/
Amazon Interview Experience | Set 183
(SDE - New Grad Position)
Following is my experience. I hope it helps people out there, as I got help from other posts here
before my interview.
Duration: 4 hours
interviewer #1: 8 am – 9 am
answer2: BFS clicked me, told him to do BFS and write to a file level wise
But he found a bug in deserialize method, I changed the serialize method for null values to
speial character in file
but you need to find the LCA and you do not have access to root of tree!
some brainstorm, and I got it
what is time complexity:
worst case: O(n^2) in skewed tree
average case: was not sure, gave me hint, and I told him, was okay
told him the 1st way, was convinced but hinted me the better way
Got his hint, and gave the answer, was satisfied
Q3) given 2 strings, how would you find if they are anagrams of each other
-> solution 1: 2 hash ( was okay but asked the better way)
Interviewer #3:
– started with his long intro
– asked mine, and then stopped me as I was talking at length
– asked me amour my search project
– asked me the basic design
– how did you deal with data when you cannot fit in memory
– how did you do intersection of posting lists
– what is time complexity
– asked the system architecture question: design the TINYURL system in terms of server architecture
i.e. HA, scalability and request processing
– was satisfied, and left with good note.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-183-sde-new-grad-position/
Lenskart Interview Experience for
Application Developer
I had recently given Interview at Lenskart.com for Application Developer
First Round
Next was the round where i was given some below questions
Q1. Given 2 arrays of integers,find whether they will form the same binary search tree.
Exp :- 2,1,3 and 2,3,1 will form the same binary search tree.
Q2. Given a dictionary of words, find all possible sentences that can be formed from a string with no
spaces.
Exp : Iamcoolguy
Answer: I am cool guy.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/lenskart-interview-experience-for-application-developer/
SAP Labs Interview Experience | Set 6
(Experienced)
1st round online test-
1. Psychometric Test
2. General Aptitude
3. Analytical Aptitude
4. Verbal Skills
5. Computer Skills
6. Coding Skills
Coding ques – 2ques requiring very basic coding skills in C.
3rd round-Technical
Basic questions on
-C (string, array, bitwise operators)
-C++(inheritance concepts, private/public/protected concepts)
-protocols HTTP,TCP/IP
-current project
-ER diagram for some requirement the create Db tables and write C function for transaction from
tables.
-Noramlisation 1NF, 2NF, 3NF BCNF with examples
-Dynamic and static binding
-developement and testing lifecycle and types based ques
-Design patterns used in software development
-OS ques paging etc
-linux commands
-puzzles (find volume of air in a bottle etc)
-difference bet product and project
-diff bet system software and bussiness software
-abstract and interface examples
4th round-Mangerial
-normal ques about college, ranking in class etc
-why should I hire u (justify you characteristics which u mention in this ans), why do you want to join
SAP.
Then he asked me do i have any ques, I asked about Onsite opportunities, and then while discussing I
told him about my interest in visiting Heritage places, so he told me about an organization which
conducts Heritage walks in delhi for places not so famous but with rich historic significance and then
gave me contact details. I dont know how much I impressed him, Bt I was flattered by this gesture.
5th round- HR
He asked me how should i weigh Howrah bride and asked to give any answer I like, normal or
wacky. My answer was very normal so i not gonna write that.
And then ques about my weakness and strength, my previous company, reason to change etc.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/sap-labs-interview-experience-set-6-experienced/
SAP Labs Interview Experience | Set 7
A brief documentation of my SAP Labs India interview
my topic was “design parking app which will show the available parking slots and fare in a
particular area”
Round 5: HR Round
1. Tell me an experience of yours in that you didn’t like to do and how you handled it ?
2. What is your negative point that you want to improve?
3. why you want to leave the previous company and why SAP
4. how will you manage when requirement changes at last moment.
5. want to work with team or individually? and why?
Note: At the start of every round you have to give introduction, so make sure that you are giving all
info about you and prepare intro well.
Thanks geeksforgeeks, with your help i was able to crack this interview.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/sap-labs-interview-experience-set-7/
D E Shaw Interview | Set 8 (Telephonic
Round Questions)
Recently I got interviewed on phone for De Shaw Hyderabad (1 hr)
9. A problem : There are two stations S (source) and D (destination). In between there are many other
intermediate stations whose costs are given in the form of matrix like cost[i][j] from station i to j.
Find the minimum cost from source to destination.
10. There are 4 containers each of 10,10, 5 and 4 litres respectively. Both 10 l are full and each 4 and
l are empty. How will you measure 2 litres each in both 4 and 5 litre container. There is only 20 litres
of water available.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/d-e-shaw-interview-set-8-telephonic-round-questions/
1st Round
Q1 – Clone a graph. ( Similar Question -> http://www.geeksforgeeks.org/clone-linked-list-next-arbit-
pointer-set-2/)
Basically while cloning, when you create a new node in the cloned graph, have a hashmap which
maps the old node to new node.
So in the hashmap key = old node, value = new node.
Q2 – Given an array of numbers, for each number print the first number to it’s left which is greater
than the current number.
Example
Input -> 5,3,2,4,8,6
Output-> -1, 5,3,5,-1,8
Use stacks. Simple O(n) solution.
2nd Round
Q1 – Find the row number according to the excel nomenclature –> (the opposite of this,
http://www.geeksforgeeks.org/find-excel-column-name-given-number/)
http://www.geeksforgeeks.org/find-a-pair-with-the-given-difference/
Result
After three weeks, I got a generic email saying that I could not clear it. I had a really irresponsible
recruiter who did not have the courtesy to give me a call and just convey some feedback. Eventually, I
think I took too much time with the first question in the manager round.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-184-off-campus-for-sde1/
Amazon Interview Experience | Set 185
(For SDE1)
Hi, Recently i was interviewed for Amazon SDE-1 Position in Hyderabad.There a telephonic round
followed by 4 F2F rounds.
Telephonic Round:
1. Inserting an element into a BST
2. A array is increasing and then decreasing find the point where it stops increasing.
F2F Round 1:
1. Replace all the elements in the array with its next highest element to its right
Expected O(n) Solution.
2. Given a binary tree and a value k. A path is called heavy path if the sum of the elements in the path
(path from root to leaf) > k remove all the paths from the tree which are not heavy i.e., tree should
contain only heavy paths.
F2F Round 2:
1. Given a array find all the triplets which satisfy the triangle preoperty(sum of 2 sides should be
greater than third side)
Sol: sort then o(n^2 log(n)) using binary search.
F2F Round 3:
1. Design a stack with push pop and find min operations in o(1) time.
Ans:can be done using 2 Stacks
2. Given an input string and a dictionary of words, find out if the input string can be segmented into a
space-separated sequence of dictionary words.
Solution http://www.geeksforgeeks.org/dynamic-programming-set-32-word-break-problem/
F2F Round 4:
Discussion of projects and current work experience.
Diameter of a binary tree in o(n).
First devised o(n^2) then optimized to o(n)
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-185-for-sde1/
One97 Interview Experience | Set 3
(Backend/Node js Developer)
Round 1
Q1. Multiply two 2d matrices
Q2 You are given a stack in which element are filled at runtime. And normal push and pop operation.
Now write a function min which you minimum element in stack at any particular instance.
Sol. http://www.geeksforgeeks.org/design-and-implement-special-stack-data-structure/
Round 2
Q1 Given an array of size n contains element from 1 to n in any order(unsorted). Now one element is
dublicate. Find that elemet without using extra space.
http://www.geeksforgeeks.org/find-duplicates-in-on-time-and-constant-extra-space/
Q2 Given an array which contain repeated eleemt in consecutive order.Now write a recursive
function which remove consecutive elements from array.
Q4 Some talk on node js. and its event driven model.Why we use ngnix as proxy server.
Q5. Find number of unique visitors on a website having traffic upto 0.5 million daily(let’s say). How
will you number of unique visitors.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/one97-interview-experience-set-3-backendnode-js-developer/
Round 1:
(Online Coding Test on Hacker Rank)
This round consist of 3 question out of which two was easy and one was medium
I did all the 3 questions and get call for the telephonic interview.
Q2. http://www.geeksforgeeks.org/root-to-leaf-path-sum-equal-to-a-given-number/
Q3 sql query to find 2nd highest salary and 6th highest salary
Q4 6 pirate problem
Q6. Given a linked list with millions of node a node will contain character from a to z . Sort them.
Q7. There are 127 player in a knock out tournament how many min no of matches to be played to find
out winner.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/coupondunia-interview-experience-set-4-off-campus-for-internship/
Amazon Interview Experience | Set 186
(For SDE1)
Hi, Recently I was interviewed for the SDE-I for Amazon, Chennai.
I cleared the online coding round and I was asked to come down for the face to face discussions.
Round 2(F2F):
1. Find if the given binary tree is height balanced.
Round 3(F2F):
1. Find if the given tree is the subtree of the big tree.
2. Given a sorted matrix (row-wise and column wise) , find kth smallest element.
3. Given an array. Pop min element in O(1) time.
4. Implement increment operator for the array.
Round 4(F2F):
1. Print the level-order traversal from bottom to up in a given binary tree.
2. What is process and thread?
3. What is copy constructor?
4. Design parking lot.
Coding was required in each and every round. Think loud. Tell the interviewers what you think. Give
them different approaches. Be confident about your solution.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-186-for-sde1/
1. http://www.spoj.com/problems/ADDREV/
I did 2 questions out of 3 in 90 mins and got a call for a face to face interview in Gurgaon office.
Round 2.
It was simple aptitude round which consist of all type of questions It have to be done in 30 min. It
was just to check aptitude of candidate. Selection will not be affected by the result.
He was a cool guy with the matter of luck we both have same name.
5. Normalization
6.OOPs Concept.
7 He asked me to apply all the oops concept on the table which I have written previously
3.Why do I want to do a job when my father own has a very good business?
4.He gave me a puzzle to solve I have to plant 10 trees in 5 rows each row must have 4 trees.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/nirvana-financial-solutions-interview-experience-set-1-off-campus-
for-internship/
Interview experience at Ignite World
(Formerly Bharti Softbank Portal)
I was interviewed for windows developer.
Round 1 – telephonic
About yourself
Work done on windows platform
What is mvvm
What is data binding
Difference between Observable collection and List
INotifyPropertyChanged
ICollectionChanged
Why and where do we use “using” statement
Do you know socket programming? ( I said no )
ListBox vs LongListSelector
Round 2 – f2f DS
About yourself
About projects n questions from projects.
What are priority queues?
How to implement priority queues data structure wise?
Dynamic allocation of 1D and 2D arrays
Find middle element of linked list
Find nth element from last in a linked list
Reversing a linked list
Finding n/m element of a linked list
100 people in a circle with gun puzzle where 1st kills second and passes the gun.
Building an app in 3 hours using Flickr api where the user can search for a tag and it returns photos
with that tag. The feed needed to have infinite scrolling where more photos are loaded on reaching the
end of the current set of photos.
Virtualization
Background creation of images
MVVM implementation
Virtualization
Json parsing
There’s a circular hotel lobby with doors that leads to different rooms. There light inside the room
can be on/off. You need to check and turn off light in every room. Number of rooms is not known, you
can travel in both directions.
Identifying the starting point holds the crux here as the lobby is circular and number of rooms is not
known.
Round 5 – HR
About yourself
Why windows
Why engineering
How you got into app development
And mostly behavioral questions and compensation discussion.
I would like to thanks geeksforgeeks that helped me immensely in my preparations for this interview.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/interview-experience-at-ignite-world-formerly-bharti-softbank-portal/
CouponDunia Interview Experience | Set 5
(For full time Software Engineer)
I applied here from their career page and was asked to attend 5 rounds and I cleared all of them and
Round 1:
It was 5 question screening round which was meant to know about my expectations from the
organization.
Round 2:
Online Coding round on Hackerrank
Questions were fairly simple but test cases were very nice.
Round 3:
1st Interview
The interview went for about 1 hr and was completely technical. The questions asked were:
– Given a binary tree how would you identify whether it is a Binary Search tree or not?
I gave the answer using inorder traversal.
– given a bst, convert it to a binary tree such that each element is replaced by the sum of all the
elements greater than it?
– Given an employee table with employee name and salary find the 2nd highest salary.
I gave the vague answer of using inner query then he asked if instead of 2nd its nth highest then what
would I do. After sometime I asked for the keyword (which was LIMIT) and then I wrote the query
which was almost syntactically correct.
– The answer to the question of binary tree, he asked me if I could solve it without using any space
(my previous solution took O(n) space)?
I was writing the solution and in between he said to stop and asked me if I have any question.
Round 4:
Java application development
Imagine we have an Email Queue table in our database with each row representing an email that
needs sending. Table Name: EmailQueue Columns: id, from_email_address, to_email_address,
subject, body (you can also add columns as you wish, but at minimum it should have these columns).
Write a java program that will read from this table and send the emails over an SMTP server (not
local unix mail). For the SMTP sending you can use a pre-existing library of your choice, if you wish.
Please take into consideration the following:
1. Speed is of the utmost concern. Imagine we have 1 million emails to send. Your code should not
sequentially send one email after another.
2. Your solution should scale. In other words, if we determine the fastest we can send emails from
a single server is 300 emails/second I should be able to run the same Java program on another
server and be able to send another 300 emails/second.
3. Your code should be careful to ensure that it is not possible for the same email to be sent twice
(especially when running multiple processes of the program).
4. Don’t worry about whether the SMTP server can handle the load. It can.
5. Order emails are sent is not necessarily important. In other words, even though I’m calling this a
“queue” it’s not important to guarantee that emails are sent in the order they arequeued.
6. Comment your code extensively.
7. Once again, speed is the primary concern. So do remember to think about what the slow points
in the email sending process could be and take efforts to minimize those pain points.
8. Send me instructions on how to compile/run/test your code along with the code itself. Also the
sql statements for me to create the table that you are working with and the sql statements to insert
a few test emails.
Round 5:
Final interview
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/coupondunia-interview-experience-set-5/
Flipkart Interview Experience | Set 21
I was interviewed at Flipkart. Following was my interview experience.
Initially there was one telephonic screening round. then I was called at their bangalore office.
Telephonic round:
Given an unsorted array find an entry in array where arr[i]= i; modified it to if array is sorted.
find median of a long stream of numbers at any instant of time.
implement LRU cache. (DS used in it and explanation )
Round 2: Technical
Optimize the code done in machine coding round
A lot of discussion on the approach i used. Various edge case discussions.
Round 3. Technical
print the top view and right view if tree.
create a mirror tree from the already existing tree inplace.
How many ways a 4*n wall be filled with 4*1 sheets so that the wall ends uniformly.
Basically Hiring manager wants to check if you are a good asset to his team and will fit in the
company culture.
Thanks a lot to GeeksForGeeks for such an awesome platform for geeks like us
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-experience-set-21/
SAP Labs Interview Questions | Set 8
(Bangalore)
Round One:
1. Find Min and Max of an array in only one traversal.
2. Given a chessboard find maximum number of squares present.
3. Job description.
4. Difference between deep and shallow copy.
5. What is C++
6. What’s “preinitialization”
Round Two:
1. reverse a linked list
1.1 Use Recursion
2. Copy constructor, operator = different used cases, code
3. Deep Copy, Shallow Copy Used cases
4. Different versions of polymorphism, how to solve the problem of multiple inheritance.
5. Deep look into Virtual concepts, inheritance.
6. Template classes, WAP operator= for template class such that it behaves differently for int and char
*
7. Given a tree, WAP such that a matrix is generated so that:
Tree:
1
/ \
2 3
| / \
4 5 6
1 2 3 4 5 6
1 0 1 1 1 1 1
2 0 0 0 1 0 0
3 0 0 0 0 1 1
4 0 0 0 0 0 0
5 0 0 0 0 0 0
6 0 0 0 0 0 0
Hint: Preorder
8. Given an array, 1 2 0 5 4 88 0 0 0 6
make it, 1 2 5 4 88 6 0 0 0 0
9. Gave me class hierarchy, List the number of VTables created
10. When to use List and when to use Vector of STL
11. Given a string “I LOVE INDIA”, print “INDIA LOVE I”
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/sap-labs-interview-questions-set-8-bangalore/
Three questions asked. The test duration was 3 hours and was conducted on hackerearth.
1. Write a sql parser to properly parse queries for a particular table. The input will consist of several
lines: the first line is of two values, N and M, separated by a comma. The next line has the names of
the columns of the table. The next N lines will contain N rows of the table (each column delimited by
a comma). After that, the next M lines will contain where clause of sql query which you are supposed
to execute and return their output (one in each line).
Query input will be given in following format: ID > 99 and Name = “Rahul Pandely”
You are supposed to evaluate query and print the number of rows that come under the criteria. For
example solution for above query will be 1.
2. Given HTTP request or response headers, write a program that prints the “request” or “response”
based on the input.
Also,
In case of a “response”, print the following:
– Response code
– Content-Type of the body
For eg:
Given the input:
GET /index.html HTTP/1.1
Host: www.browserstack.com
3. You will be given lines of a web server log as shown in example below. You are supposed to
parse it and for all the HTTP codes that occurred in the file, print in each line the HTTP code that
occurred followed by how many times did it occur. Output should be sorted in descending order of
occurrences.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/browserstack-interview-set-7-online-coding-questions/
Flipkart Interview Experience | Set 22 (For
SDE 2)
Telephonic Round – 1:
1) Inversion count in an array – http://www.geeksforgeeks.org/counting-inversions/
2) Iterative pre order traversal.
Telephonic Round – 2:
1) Given an array and a number x, check for pair in array with sum as x –
http://www.geeksforgeeks.org/write-a-c-program-that-given-a-set-a-of-n-numbers-and-another-
number-x-determines-whether-or-not-there-exist-two-elements-in-s-whose-sum-is-exactly-x/
2) Some question similar to reversing a linked list
I was called to Bengaluru for In house interviews after two telephonic rounds
Coding Round:
1) Word Break Problem – http://www.geeksforgeeks.org/dynamic-programming-set-32-word-break-
problem/
Design Round:
1) Design delivery system from city Hub to the customer – There was focus on how to figure out the
location of the customer from address, finding the shortest path etc.,
2) Design a state machine – Each state can handle n events and based on the event type next state is
determined
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-experience-set-22-for-sde-2/
Category: Interview Experiences Tags: Flipkart
Amazon Interview Experience | Set 187
(For SDE1)
Hi, Recently i was interviewed for Amazon SDE-1 Position in Hyderabad.There a telephonic round
followed by 4 F2F rounds.
Telephonic Round:
1. Given a array find all the triplets which satisfy the triangle property(sum of 2 sides should be
greater than third side)
http://www.geeksforgeeks.org/find-number-of-triangles-possible/
F2F Round 1:
1. Given a dependency where for java packages p1,p2,p3
p1:{p2,p3}
p2:{p3}
p3:{}
This means p1 can be compiled when compilation of p2 and p3 done
p2 can compile when p3 is compiled
p3 can start as it does not have any dependence.
Figure out strategy to find the order of compilation of processes.
Ans:Topological sorting
2. Discussion on project
Asked all concept related to my final year project.
3. Current project in company
Challenges faced at company
2F Round 2:
1. Given a binary tree print its side view from left from bottom to top and right side view as up to
downward .
Eg. For image 1 output will be 20,30,50,90,100
and for Example 2( image 2) output should be 6,3,1,2,5,10,7,4,6
2F Round 3:
1. Why are you looking for change in 6 months of experience .
2. Discussion on how to send notification to friends when a user post on social network like facebook
The discussion was on when to load friend list of user and he was expecting we should load friend
list when user login.
2F Round 4:
1. Discussion on current project challenges faced
Situation when you have to take decision in absence of your team lead/Manager
2. Why are you looking for change in 6 months of experience
Tips:
1. Think loud they always support you
2. Ask for hint if not getting.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-187-for-sde1/
Akosha Interview Experience
I recently got a call from Akosha Bangalore for on-site interview. This Interview had three round,
two technical and one manager round.
I got the offer from company but they were paying sameas what I’m getting currently. More over HR
is very bad, she has no sense of talking.
After few days I reject the offer (due to their bad behavior, they call me 2’s in a day(7-8 days) from
different sources just to say resign asap)
I would to say thanks to Geeksforgeek for such a wonderful platform for tech guys.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/akosha-interview-experience/
Flipkart Interview Experience | Set 23
I recently had flipkart interview on-site, Bangalore. This interview has 4 rounds. Three technical and
one manager.
String e1 = "a>b=1";
String e2 = "a>b=2";
String e3 = "a>c>e=3";
String e4 = "a>c>f=4";
String e5 = "b>a=5";
String e6 = "a>b>c=5";
String e7 = "b=7";
String e8 = "a>b>c>d=99";
String e9 = "a>b=99";
‘b’: {
‘a’ : 5
Highlighted one are invalid bec as they come they ask for overwrite the data (a>b>c = 5; C has e and
f so we can overwrite.
1. Construct JSON
2. Print it
3. If you print in same as above (nice manner) +point
I solved this problem using Trie
One can see my implementation at here:
https://github.com/nitsgupta/practice/tree/master/JAVA/JsonBuilder
*Calculate width of binary tree mathematically, what is the maximum width of any tree could have of
n nodes.
— I came up with 2logn
*Probability question: You are given with PxQ matrix and a point inside the matrix (x,y) where you
standing. If you step outside the matrix you’ll die. You are allowed to move in all four direction.
Movement will be totally random. For Given N steps, what is the probability that you’ll alive?
My approach: I tried different approaches from bad to good approach. My last approach based on
small problem to big problem i.e. Induction based. But I was not able to bring up to the equation what
he was expecting.
http://stackoverflow.com/questions/16522296/probability-of-death-of-a-man-moving-n-steps-in-a-
matrix
I would to say thanks to Geeksforgeek for such a wonderful platform for tech guys.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-experience-set-23/
Kritikal Solutions Interview Experience
1st round:
Two sets:
Second set was mcq based on computer science subjects like os,ds etc.
String questions.
To sort array of 0s 1s 2s
To implement stack.
I rejected the offer as there pay scale was not good, In ctc basic salary or not good and was very less.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/kritikal-solutions-interview-experience/
24*7 Innovation Labs Interview Experience
I had an interview with 24*7 innovation labs. Their process is telephonic followed by 3 f2f
interviews.
Round-1 Telephonic
1) Stack reversal in place
2) How Hashmap works
I was called for face-2-face interview on March-19th. I had 2 face-2-face technical rounds and 1
round with Hiring manager
Round-II
1) About current project and discussion on why few things were used and if they can be done in other
ways.
2) find length of string(assume there is no inbuilt function to find string length)
3) Reverse words in string
4) Reverse words in string without changing the input string and without extra memory
5) Delete nth node in linked list from beginning
6) Delete nth node in linked list from ending
7) Mirror image of a tree
Round-III
1) About current project and discussion on why few things were used and if they can be done in other
ways.
2) LRU cache implementation
3) Minimum number of platforms required in a railway station
http://www.geeksforgeeks.org/minimum-number-platforms-required-railwaybus-station/
On calling the HR couple of times and mailing her about the feedback the HR told that my profile
does not suit for their requirements.
I suggested HR to properly screen the profiles based on their resume. Felt bad for being rejected on
non-technical reason.
Tips:
Go through the questions in geeks4geeks
Interviews are not specific about programming language as they work on multiple languages so
choose whatever language you are comfortable with.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/247-innovation-labs-interview-experience/
Written test
The person who wrote this problem is going through the bad phase of his life. But, fortunately he won
some cash in his last programming event.
Now to make his girlfriend feel special, he wants to buy her some chocolates. As mentioned, he is not
having good time so he want to spend as less as possible.
Keeping that in mind, he decided to play a game with her. The rule of game is as follows:
1) There are N chocolates represented by type 1..N
2) He will arrange them in a row in some random order
3) Now she (his girlfriend ofcourse) has to pick an index say i, then she will get all the chocolates at
index j such that j>i and type of chocolate at j is strictly less than type of chocolate at index i.
He believes that his girlfriend is not that clever and will surely not choose the most optimal index, but
he wants to know that if by any chance she picked the optimal index then how many chocolates will
he have to buy.
Input:
First line contain N. then next line contain N space separated integers.
output :
A single integer which is the answer.
Constraints :
1 = N = 105
1Round-1 Telephonic
Given a binary tree find the pairs which violate the BST property.
In BST EVERY element in left subtree must be less than every element in the right subtree
eg: 50
30 60
20 25 10 40
In above tree the pairs violating BST property are (20, 10), (30, 25), (30, 10) , (25, 10), (50, 10) and
(60, 40).
Expected time complexity for the problem is O(nlogn) time ?
solution: Make in-order traversal. Store the in-order traversal in an array. Find the pairs which
voilate the property
I have not cleared this round so no f2f interview questions.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/bankbazaar-interview-experience-set-2/
Inmobi Interview Experience | Set 3
I had an interview with Inmobi. Their process is written test followed by 3/4 f2f interviews. It was a
drive over weekend.
Written test:
They did not expect any code in this round. An algo or pseudo code is fine.
1) You are given 2 vessels with capacity M liters and N liters capacity and infinite supply of water.
You need to find the minimum number of steps required to get P liters. Any of the below action is
considered a step
a) Filling vessel with water
b) Emptying vessel
c) Pouring water from one vessel to another vessel.
2) Given n sets each containing m integers. You need to create MinDiff set by picking exactly 1
element from each set. The difference between the maximum and minimum elements in the MinDiff set
should be minimum.
eg: for the sets {30, 20, 10, 40},{ 22, 33, 44, 99},{ 16, 17, 18, 19} min diff set is {19, 20, 22}. Max
and min elements in MinDiff set are 22 and 19 and their difference is 3.
Round-I
1) Little discussion on my project
2) Given a chessboard and the initial position of horse. If “n” is the number of steps the horse can
make then what is probability that it goes out of board ?
Round-II
1) you will be given the binary representation of the numbers in the form of 2D array.
2) Find the average of mid 50% of elements in the running stream of integers
Source
http://www.geeksforgeeks.org/inmobi-interview-experience-set-3/
Taxi4Sure Interview Experience
I had attended taxi4sure drive. Their process is written test followed by n f2f interviews.
Written test
1) Given an array of students whose ranks can be 0 or 1. Sort the elements so that all the students with
rank 0 come before 1.
Bonus points if algo is in-place
2) Find the first student from left side with rank 1
3) Write the algo to sort the students based on rank if the possible ranks are 0,1,2
I have given counting sort algo but looks they did not like my solution so was not proceeded further.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/taxi4sure-interview-experience/
1) You have a single core cpu. Your applications does a lot of I/O operations. Can multi-threading
used for making the application more efficient ?
2) A cluster consists of some finite number of server. A cluster is configured to use a DB(mongo db).
Given that you have “n”(which can be large) clusters, give the design for a system for taking the
periodic back-ups of these clusters.
a) For each cluster, the cluster user would configure the start time to start taking the back-up and
how frequently the back-up can be taken
b) Assume you have backupservice.takebackup(Cluster cluster) throws BackUpFailedException
method available
c) Can multi-threading be used ?
d) How is timer going to be implemented ?
e) the takebackup() method can throw exception if backing up fails. How is this handled
f) Define required classes with the data and methods
3) Write code for pattern matching of regular expression. Only . and * are the special characters in the
pattern
boolean isPatternMatched(String inputString, String pattern);
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/scalegrid-interview-experience/
1) Find k distant nodes in given tree. The paths going through parent should also be printed.
3) Give design for leader board implementation. 1000 customers with maximum points should be
displayed on the leader dashboard. UI should handle real time changes. A customer’s points are
updated after each ride/order.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/ola-cabs-interview-experience-set-3/
Round-1
1) Find all anagrams in a given sorted dictionary
2) Given pack of cards represented as A1,A2…A13 and B1,B2,..B13, and C1,c2,…c13 and
d1,d2..d13.
You are given a file which has 51 card numbers. Only 1 card is missing. Find the missing card.
3) How do you write an order service which scales horizontally. Into how many services can you
split this. An architecture/design diagram and explanation is required
Round-2
1) http://www.programmerinterview.com/index.php/puzzles/25-horses-3-fastest-5-races-puzzle/
2) http://www.mathsisfun.com/puzzles/weighing-9-balls-solution.html
3) Write JSON Parser. What are the Data Structures used for this?
4) Write DFS code. What are the Data Structures used for this?
5) http://www.geeksforgeeks.org/largest-sum-contiguous-subarray/
6) In an array all elements are repeated twice except one element. Find the element.
eg: 2, 3, 4, 4, 3 — In this 2 is the element which is not repeated.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/metlife-interview-questions/
Writtent test
Very basic questions. They just wanted to see if you can code or not.
One more round is supposed to happen after this but the interviewer was not available so it was
cancelled.
Have not heard any response from VMWare i also thought of not troubling them.
Tips
In telephonic round they are not bothered about time complexity of your algo. They just wanted to
know if you can code whatever you think.
So if you do not find best solution also it is OK but write the code for average case at-least.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/vmware-interview-experience-set-3/
Round 1:
1. Rotate a matrix by 90 degrees clockwise.( He asked me have you heard of question.I said Yes.Then
he asked me to code)
2. Find vertical sum of nodes present in same vertical line in binary tree. ( He again asked me have
you heard of question. I have heard it but didn’t remember the approach. It took some time and then I
started telling my approach.He aasked me to write code and question regarding get sums from left to
right , for which I made use of linked hashmap)
Round 2:
1.Reverse K blocks of nodes in linked list.
There are two interviewers this time, probably, guy was senior he was asking me question.He was
very particular in coding. Checked every edge case.and asked me evrything.Initially I told the
approach and then started coding.
Pretty straightforward written code.Again he checked all edge cases with my code.
I thought this was last round as they have said like.She asked me about my strengths and challenges I
faced.How I overcame through it
I was expecting result either yes/no.But they called me for another round of interview may be because
of my expected salary which was high compared to my previous.
Round 4 (Technical):
1.Given “aaabbbccc” it should return “a3b3c3″ in place. Initially I explained brute force approach
then he said array has 2n space.I was able to remember approach for quicksort and started explaining
after which I grew confident on it.He was satisfied.Questions on time complexity of algo and space
complexity discussions.
2.Again a question on OOPs.This time I was completely wrong in answering it.I thought interview
with yatra was closing for me.He was not satisified much with this.
Round 5( Manger)
1.He asked me to find words which are having particular pattern.Then I said it was KMP algo. Can I
explain it ?? I started explaining approach, may be he was busy with something, he asked me to write
pseudo code.He left the room for 15 mins then he came back I had almost completed the code, which
he was satisified.
Some basic questions on spring ( my previous work was related to it). Then my expected salary and
my position If I got selected in yatra were discussed.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/interview-experience-with-yatrahyderabad-set-3-for-senior-software-
engineer/
Question in Amazon Interview
I have gone through few rounds while rest of the round questions are standard ones and already in the
internet, I couldn’t find this problem and couldn’t solve properly.
Problem:
There are Items[I1, I2, I3, I4] available in warehouses [W1, W2, W3, W4, W5] and serviceable by
multiple partners with some shipping cost.
I1 available in W1
– serviceable by these partners S1[0.75 -shipping cost/selection cost], S2 [0.74], S3 [0.70]
available in W2
– serviceable by these partners S1[0.75], S2 [0.74], S3 [0.70]
available in W3
– serviceable by these partners S1[0.80], S2 [0.74], S3 [0.70]
I2 available in W4
– serviceable by these partners S2[0.85], S3 [0.94], S4[0.30]
available in W3
– serviceable by these partners S1[0.80], S2 [0.74], S3 [0.70]
I3 available in W1
– serviceable by these partners S1[0.85], S2 [0.55], S3 [0.70]
available in W2
– serviceable by these partners S1[0.80], S2 [0.54], S3 [0.70]
I4 available in W4
– serviceable by these partners S2 [0.74], S3 [0.70], S4[0.30]
available in W2
– serviceable by these partners S1[0.85], S2 [0.80], S3 [0.70]
available in W3
– serviceable by these partners S1[0.80], S2 [0.74], S3 [0.70]
You have to optimally select the items so that total cost will be minimum.
Ex: I can make a shipment from I1, I2, I4 fulfilled by W3 which will cost:
for partner S1: 2.40
for partner S2: 2.22
for partner S3: 2.10
Another Shipment I3 fulfilled by W2 which will cost: S2 [0.54]
Total cost: 2.10+0.54 = 2.64 with Shipment SH1 {I1,I2,I4} By S3 and SH2 {I3} by S2
Another possible way
I1, I3, I4 serviceable by W2 by Provider S2 : 2.08
I2 serviceable by W4 by S4: 0.30
Total cost: 2.38
Write a program for the same to get optimum minimum cost for the number of shipments can be
delivered from warehouses with shipping cost?
“If you ship multiple items in single packet, then the cost will be minimum. Assume Shipment
Provider charges per packet and not on the weight and packing charges will be minimum. Idea is to
consolidate/aggregate as many items as possible to one location so that packaging cost is minimum
and on top of that you should consider warehouse selection cost.”
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/question-in-amazon-interview/
Top 25 Interview Questions
Here is the collection of TOP 25 frequently asked questions based on experience (mine and friends)
of interviews in multiple companies.
2) A unsorted array of integers is given; you need to find the max product formed my multiplying three
numbers. (You cannot sort the array, watch out when there are negative numbers)
13) Object Oriented concept, Polymorphism , Method overloading, method overriding, Difference
between abstraction and encapsulation, Aggregation and Composition
15) Delete a given node in Linked List under given constraints (http://www.geeksforgeeks.org/delete-
a-given-node-in-linked-list-under-given-constraints/)
16) Implement Stack using Queues(http://www.geeksforgeeks.org/implement-stack-using-queue/)
19) Given an array of integers, update the index with multiplication of previous and next integers,
e.g. Input: 2 , 3, 4, 5, 6
Output: 2*3, 2*4, 3*5, 4*6, 5*6
23) Find the number which is not repeated in Array of integers, others are present for two times.
Thanks to geeks4geeks team for providing a nice platform. You guys are the best.
This article is contributed by Rishi Verma. Please write comments if you find anything incorrect, or
you want to share more information about the topic discussed above.
Source
http://www.geeksforgeeks.org/top-25-interview-questions/
Palantir Technologies Interview | Set 1
The interview was scheduled after I passed the coding challenge.
The coding challenge was kinda simple, it was a grid, with each cell connected to its neighbors with
some cost, you are allowed to move right and down, and you are required to calculate the minimum
total cost for some employees (defined on the grid) to reach the bottom corner.
The grid size was a max of 1000*1000, so a simple Dijkstra could solve it.
The interview started about 20 minutes late due to technical problems with Skype connection, so the
interviewer dived in quickly to the technical question.
We want to create LRU Cache, a data structure that stores pairs , and has maximum capacity, after
which, any insertion process should remove the least recently used element.
An element is considered used when it’s first inserted to the cache, and if its value was retrieved.
The interviewer wrote the body of the class, and my task was to implement it.
The first idea I got was to use a doubly-linked list, where any insertion process to the cache means
we insert a new element as the head of the linked list, and of course the least recently used element is
at the tail of the list.
The insertion worst case run-time was O(1), but the retrieval method was to run in O(n).
I was then asked to find a better way to improve the running time of the get method, and I suggested
we use a hashtable to store the pairs , but then we would still need another way to store the order of
usage of every element.
I suggested we can use a heap, to easily retrieve the least recently used element, but the interviewer
asked me to combine the idea of the hash table with the idea of the linked list to get a better
implementation.
So, the idea I got was to create both a hash table to be used in the get method, and a linked list to store
the precedence of each key.
So, for each key, we have 2 entries, 1 entry in the hash table, and another one in the linked list, so I
created another hash table, that given the key, it returns the node of that key in the linked list.
I started writing the code and kept updating it whenever we find a bug.
/*
* Cache of at most maxCapacity objects, referenced by identifiers of
* type <K>. When the cache needs to free up space, it drops the
* least-recently-used object.
*/
class LruCache<K, T> {
class ListNode
{
public K key;
public ListNode next, prev;
public ListNode()
{
next = prev = null;
}
public ListNode (K key)
{
this.key = key;
}
public ListNode (ListNode next, ListNode prev)
{
this.next = next;
this.prev = prev;
}
public setNext (ListNode next)
public getNext
public setPrev (ListNode prev)
public getPrev
}
/*
--------------------- (K1, T1) <- 1 (1, K1) (LRU)
--------------------- (K2, T2) <- 2 (2, K2)
(K3, T3) <- 3 (3, K3) (MRU)
*/
/*
* Puts <object> in the cache. At the time it's put in
* it is the most-recently-used.
*/
public void put(K key, T object) {
// fill in
ListNode newNode = new ListNode (key);
list.setHead = newNode;
list.size++;
valueTable.add(key, object);
nodeTable.add(key, newNode);
if (list.size > maxCapacity)
{
ListNode tail = list.getTail();
valueTable.remove (tail.getKey());
nodeTable.remove (tail.getKey());
list.removeNode (tail);
list.size--;
}
}
}
After we finished the technical question, the interviewer moved on to discuss the projects on my
resume, and asked which project was most enjoyable and why.
My answer was for the Ocean Simulation project, because among all projects I have done in college,
that was the one I most used algorithms and tried to make the software as smart as possible.
1 thing is, I asked the interviewer about interns life at Palantir, his reply was “Are you applying for an
internship?”
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/palantir-technologies-interview-set-1/
Bloomberg Interview | Set 1 (Phone
Interview)
Click hereto see the documentation of the video conference.
Before proceeding to reading this, make sure you read a little about bloomberg, and most importantly
its R&D center in London, you will be given a good portion of time to tell the interviewer what you
know about bloomberg, the interviewer said he worked for more than 11 years in bloomberg, so it
won’t be good if you just made up some answers, just have a little read about it.
The interview, Ian, started an hour earlier, and the interviewer gave me some time to prepare my
machine, if it happened to you, just don’t panic, and of course you can tell him you prefer to have the
interview on time.
The interviewer started by introducing himself, and the technology he has been using in bloomberg.
Next, I was asked to introduce myself, and we had a talk about my resume, my education and projects.
The interviewer then jumped to the technical question, by pasting the body of the code, in order to fill
in the functions:
#include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <cstdio>
#include <limits>
#include <vector>
#include <cstdlib>
#include <numeric>
#include <sstream>
#include <iostream>
#include <algorithm>
using namespace std;
//1234
//1,234
int main() {
string res;
int _num;
cin >> _num;
res = formatNum(_num);
cout << res;
return 0;
}
The question was rather easy, I was asked to implement a function that given an integer number num,
it returns the a string representation of the number, comma separated.
i.e. f(1234) = “1,234”
int total_processed = 0;
string ret = "";
return ret;
}
The interviewer then asked that the function should support different comma styles, i.e. the US vs
Indian style
//Indian 1000000 -> 10,00,000
//US 1000000 -> 1,000,000
I suggested that a certain style should be passed to the function, either as an integer mask or a vector
of integers, representing the positions at which a comma is needed.
He asked if only a string abbreviation can be sent to the function instead of a vector, so I suggested
using a map, which stores for each style code the corresponding vector of integers.
My implementation was as follows:
int total_processed = 0;
string ret = "";
vector <int> style = style_map[rec_style];
int n = style.size();
n--;
return ret;
}
class something{
string num, rec_style;
something(int n, string style);
change_style(string new_style);
bool operator < (something e) const{
}
}
I was then given the chance to ask the interviewer whatever I like about the company and his work in
bloomberg.
Summary: The interview is easy, you just have to stay cool, and try to give the answers to the point
without any exaggerations, Good Luck!
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/bloomberg-interview-set-1-phone-interview/
Bloomberg Interview | Set 2 (Video
Conference)
Click hereto see the documentation of the first phone interview.
The video conference came after passing the phone interview, it was held on Skype with 2
interviewers from Bloomberg: Freddy and Chad.
The call started by both of them introducing themselves, and so did I, and I was, again, asked to say
what I know about bloomberg, and why I want to work there.
The interviewers then jumped to the first question, it was direct, for the following code, answer the
given 9 questions.
#include <string.h>
int main(int argc, char *argv[])
{
char abc[27];
char *ptr = abc;
strcpy(abc, "abcdefgxyz");
/*
* What are the types and values of expressions:
*
* 1. abc
* 2. *abc
* 3. abc[2]
* 4. &abc[3] //&abc[3] = abc + 3*sizeof(char)
* 5. abc+4
* 6. *(abc+5) + 20000 //h long long x = int * 1LL * int
* 7. abc[10] //'\0'
* 8. abc[12] //memset ()
* 9. &ptr //char**
*/
return 0;
}
The shown code is built to print out the current date, but for some reason, it doesn’t.
You are required to figure out the reason.
#include <stdio.h>
#include <string.h>
#include <time.h>
char *get_date()
{
char buf[80];
time_t now = time(0);
strcpy(buf, ctime(&now));
return buf;
}
At the beginning the code looked fine to me, the only thing I thought would be the problem, is the
declaration of the char array buf on the stack instead of the heap.
So, I suggested that dynamic allocation should solve the problem and that we should use
malloc(80*sizeof(char)) instead of buf[80]
The interviewers said it was the correct step, but he still needs a reason.
The interviewers gave a hint, that in case a breakpoint was set just before the printf if, the debugger
shows that date does hold the correct result, so the problem is in printf.
After I had enough time, the interviewer decided to give me the answer to move next.
The problem was that when printf is called, it needs a part of the stack, and this may affect the stack-
reserved array of characters buf.
//////////////////
//
// number of ways
// n = 3
// 3 = 1,2
// 1,1,1,
// 2,1
I then realized the problem forms linear recurrence, where f(n) = f(n-1) + f(n-2), so it can be solved
using matrix exponentiation.
I spend around 15 minutes explaining the solution to the interviewers, and they didn’t seem to
understand a word of it.
f(0) = 1
f(1) = 1
[1 1][f(n)] [f(n)+f(n-1)]
[1 0][f(n-1)] [f(n)]
[1 1]^m
[1 0]
The running time complexity of the solution is O(log(n)), same as the memory complexity.
There was another solution that I didn’t have time to say, which has a time complexity of O(n) and a
memory complexity of O(1), which models this problem to the fibonacci problem.
The last question was so trivial, I was asked to reverse a string in place, I used the 2 pointers, here
was the code:
//////////
// "hello world" -> "dlrow olleh"
Finally I was asked to use this code to reverse words within a sentence, in place, here was the code:
// "hello" -> ?
//"hello world"
reverse_word (str, size); //linear
//"dlrow olleh"
//"world olleh"
//"world hello"
Result: Rejected.
Summary: The interviewers are not so good with problem solving, they are good implementers just it,
so type neat and clean code, use the obvious ideas, don’t do complicated solutions, because they most
probably won’t get it.
If I made one mistake in this interview, I would say it was using matrix exponentiation rather than the
easier linear-time constant-memory solution.
Good Luck with that, passing this video conference means you are going to London for an onsite, final
interview, so you have another reason to do your best.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/bloomberg-interview-set-2-video-conference/
Google Interview Question for Java
Position
The solution will be evaluated on following parameters.
Object Oriented Design aspects of the solution.
Overall coding practices.
Working test cases of the solution.
You can use Ant/Maven as build tools for the solution, Junit, Mockito or other testing frameworks.
You may also include a brief explanation of your design and assumptions along with your code.
Problem Statement: In a Formula-1 challenge, there are n teams numbered 1 to n. Each team has a
car and a driver. Car’s specification are as follows:
– Top speed: (150 + 10 * i) km per hour
– Acceleration: (2 * i) meter per second square.
– Handling factor (hf) = 0.8
– Nitro : Increases the speed to double or top speed, whichever is less. Can be used only once.
All of them start at the same time and try to attain their top speed. A re-assessment of the positions is
done every 2 seconds(So even if the car has crossed the finish line in between, you’ll get to know
after 2 seconds). During this assessment, each driver checks if there is any car within 10 meters of his
car, his speed reduces to: hf * (speed at that moment). Also, if the driver notices that he is the last one
on the race, he uses ‘nitro’.
Taking the number of teams and length of track as the input, Calculate the final speeds and the
corresponding completion times.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/google-interview-question-for-java-position/
Round 2
1) How would you implement snakes and ladder game?(Hint: Use arrayList)
2) How would you come to know if a number is a power of 2? Code.
3) Given an arrayList, get the number which is lonely or does not have any duplicates. What is the
time complexity here.
4) How will you implement a functionality where updating the DB updates the value on the UI without
entire page refresh
Round 3
1) Consider a square matrix with elements 0s & 1s in it. The rows are sorted while columns are not.
Calculate the row with the maximum sum. (Hint : you don’t need to iterate through all the rows &
columns to get the answer)
2) Consider an array:
[1,2,5,6,5,2]
Get the index of the element which is :
at-least repeated once & has the lowest index.
Output for the above given array is : 2
Explanation : Since both 2 & 5 are repeated elements but since the index of 2 is less than that of 5,
hence the answer is 2.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/bankbazaar-interview-experience-set-3/
Flipkart Interview Experience | Set 24
Round 1
1) There are M chocolate packets each packet can have variable number of chocolates in each packet.
There are N students (N
Source
http://www.geeksforgeeks.org/flipkart-interview-experience-set-24/
* Aptitude MCQ consists of very easy questions, speed is all what matters here. Attempt all questions
(No negative marking).
* Quant questions were a bit difficult and took time to solve. For some questions, we had to deduce
the answer by checking all the options. Hackerrank coding questions were average.
Line intersection problem and overlapping paintings problem.
” It is important to solve atleast 1 coding problem (3 test cases atleast), to get into the next round. ”
Get familiar with Hackerrank before your interview.
*C/Java MCQ questions were average. You had to choose either C or Java. Basic output questions.
#Round 2 (Technical Interview I): Majority of the students were eliminated after the first round.
This round consisted of questions from DS, Algo, OS and Networks. linked list, stack, queue and tree
questions were their favorites. Refer geeksforgeeks for questions on these topics (LL reversal,
identical trees etc). Also, the interviewer would ask you to write the code for questions on LL, trees
etc., so be prepared for it. I was also asked about deadlock, process synchronization, TCP/IP.
If you are unable to solve a problem, that is perfectly all right. Don’t give up. Tell the interviewer
what you are thinking. The interviewer would help you to reach the final solution.
#Round 3 (Technical Interview II) : Same DS, Algo questions and resume based interview. Your
previous projects, interests. Please don’t write non-sense in your resume. If you have something in
your resume, be prepared to back it up. Asked some advanced Java questions since I had done a
project in J2EE. Make sure you know everything about your previous projects.
#Round 4 (Managerial Interview) : Questions about resume, why Snapdeal, puzzles and SQL query
questions. SQL questions were difficult. Study nested queries, joins etc. Again, don’t quit. Try to
reach out a solution, interact with the interviewer. They want to know your thought process. I wasn’t
able to give the correct/optimal solution of queries and the puzzle, but i was able to dig deep and give
a non-optimal solution. Practice popular puzzles.
Round 2,3,4 may take upto 1.5 hrs each depending upon the interviewers and candidates. They would
know almost everything about you after these 3 rounds.
#Round 5 (HR Interview): Again resume based, introduction, hobbies etc. Might give puzzles to
solve (gave to my friend). Asked questions about Snapdeal. Lasted 15 minutes.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/snapdeal-interview-experience-set-13-on-campus-for-sdet/
Amazon Interview Experience | Set 188
(For SDE1)
Recently I am interviewed for Amazon SDE-1 position for Bangalore. There are 3 F2F rounds
followed by a telephonic round.
As it was a drive, they asked everyone to write code for these problems
1. http://www.geeksforgeeks.org/add-two-numbers-represented-by-linked-lists/
2. http://www.geeksforgeeks.org/longest-palindrome-substring-set-1/
1st F2F:
1. Why do you want to leave your current company?
2. Why Amazon?
3. http://www.geeksforgeeks.org/median-of-stream-of-integers-running-integers/
I told him min heap & max heap method, then he asked me who can you do it using trees.
4. There is a mxn matrix which contains only 1 & 0’s. You have to print the unique rows. I solved it
using tries, then he asked why cannot I use hash map and asked to write the code using tries.
3rd F2F:
1. In a stack pop fn will return you the value & pop the value and push fn will push the value into
stack , so how do you implement top fn. asked for O(1) solun.
2. Write a fun to check whether a given tree is a BST or not.
Tips:
They will help you are struck just think loud.
Practice writing code on paper.
I thank GeeksForGeeks for this great work.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-188-for-sde1/
Flipkart Interview Experience | Set 25
Hello, I recently attended an interview at Flipkart. There were four rounds:
Round 1:
I was given a problem statement and I had to write a fully functional working code at my laptop. I
was told that the focus is not on logic but on the way I code and the design of my solution. The
problem statement was something like : “There is a n player game of cards. The deck of card is not
fair, i.e. any card can be there any number of times. A card has a number and a color. Each player gets
k card each (n and k can be harcoded in the solution). The computer starts the game by throwing a
card from the deck of cards. Assume the card is 4 of Green. Then the other player has to throw either
a 4 of any color or Green of any number. If the player does not have any such card, then it can say
pass. The player who finishes all his card wins. The logic of selecting the card by the user can be
hardcoded (Eg, If you use a list data structure for storing the cards for a player, then you can say that
the player always throws the first card from the list). The logic was required only to start and
conclude the game.
I was given close to 1 hour to finish this. First we had a discussion about the design of my solution
and then I was asked to code. After I was done coding, she checked my code, asked a few questions
about how will I add some new features in the game.
After the first round, I was told they’ll send the lunch to me. They sent Dominoes pizza for lunch
I was also given a problem to solve (I don’t remember it now). Then they asked me if I get to meet a
celebrity and ask him a question, who will it be. I was asked to take my time to answer this question.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-experience-set-25/
Synopsys Interview Experience | Set 3 (For
R&D Engineer)
Recently I gave interview in Synopsis for the position of R&D Engineer. These were the questions
asked :
3. Round 3 : F2F HR
a. Why do you want to leave your existing company?
b. Why do you want to join us?
c. In what other companies you have applied?
d. Questions related to expected salary and some random stuffs.
f. How are you as a team player?
e. Two puzzles were asked. Could not remember them, but they were easy.
c. Given a number x, find the minimum number of squared term required out of all possible ways
to write the input as squares of numbers.
Eg : i/p : 10
we can have many ways of breaking the number 5 : 1×1 + 1×1 + 1×1 + 1×1 + 1×1 2×2 + 1×1
o/p : 2 because the decomposition 2×2+1×1 is having the minimum number of squared term(which is
2).
d. In the previous question, what if we have a constraint that each individual product can’t be
repeated i.e say for 8 : 2×2+2×2 will not be permissible because we can’t have two identical
products (i.e 2×2, 2×2)
e.g n=3 :
possibilities : AB, AAA, BA
Output: 3
hint : Think Recursive
d. Given a linked list find if there is a loop in it or not. if loop exists, find the starting position of
loop.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/synopsys-interview-experience-set-3-for-rd-engineer/
10 Most asked Questions from Java
Programmers
Hope you liked my previous post “Top 25 Interview Questions”. Here comes the next 10.
2) “n” points are given , find the number of quadruplets which form square.
Thanks to geeks4geeks team for providing a nice platform. You guys are the best.
This article is contributed by Rishi Verma. Please write comments if you find anything incorrect, or
you want to share more information about the topic discussed above.
Source
http://www.geeksforgeeks.org/10-important-interview-questions/
OLA Cabs Interview Experience | Set 4
(For SDE 2)
I was recently interviewed for SDE 2 position at OlaCabs.
Round 3 (1 hour)
– Application monitoring – how will you handle data coming from various applications?
– Ola operates within city limits (a fixed area). How to determine a user is inside that area and then
show him available cabs. (Simpler problem is how to determine whether a point is inside a
ploygonor not).
– Given an array containing 0,1,2. Sort them maintaining the order in which they were in the original
array.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/ola-cabs-interview-experience-set-4-for-sde-2/
F2F1
1- There are two arrays .You need to copy content of one array to other ,each slot should include 5
elements and there should be a wait of 5 second after every slot.
3- Framework design.
F2F2
Merge two sorted array.
Project level discussion.
Test cases of split function in java.
F2F3
Find highest consecutive character in a string.
Race condition.
project discussion.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/quikr-interview-experience-set-2-for-sdet/
2. Discussion on Design of previous code. A lot of new use cases to handle. Explain your design.
How will you deal with new changes in problem statements.
4. Hiring Manager: tell me about yourself, why flipkart, why change etc. You know c++ only but here
you need to work in java how will you deal. etc…
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-experience-set-26/
80 people from my university participated in the contest. Microsoft selected around 6 for the final
interview round.
Behavioral: talk about the most interesting project, and what I learned from it.
3) Given a list of events with start time and end time, find the events which have conflict with any
other.
How would I decide which feature should be implemented next in an operating system.
Behavioral: talk about my favorite project and one instance where I had to convince other people,
Additional comments:
1. Overall experience was pretty nice. Microsoft paid for all expenses for us to visit their office. The
recruiter looked after us as well, really no complaints.
2. Two of the interviewers were very down to earth, despite all their experience and high positions.
Conversation with them flowed naturally, and I had a great time.
3. One of them (from question #1), however, had a very bad attitude toward the candidates. He didn’t
study the problem well enough to assess solutions that weren’t similar to his, and made disrespectful
comments about our ideas to solve the problem in our own way. This is not just my opinion, as I also
asked other candidates.
I perfect’d interview 2, did good in interview 3, but was not good enough in interview 1 (for the
reasons already stated). I was not given an offer then.
What I can say is: no matter how well you prepare, you still rely on the interviewers. Study hard and
hope to get interviewers that are nice and don’t want to lower you.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-52-fresher/
Flipkart Interview Experience | Set 27 (For
SDE)
Telephonic Round: It was an exploratory discussion with the hiring manager. More about the current
work and behavioral questions.
Machine Coding Round: Design and build tic tac toe game. The code should be up and running. It
should be scalable to multi-users and nXn grid.
Design Round:
Design a cricket series. Extend it to olympics.
Thanks to GFG!!
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-experience-set-27-for-sde/
Section 2- Software Knowledge (Questions like latest version of iOS, Windows, Android. Operating
Systems etc)
Coding Question 1:
Given a string of parentheses, write a program to find whether its valid or not.
Examples-
input: {{{}}}
output: Valid
input: }{}{}{}}
output: Invalid
Coding Question 2:
Given ‘m’ number of small bricks (each x inches long) and ‘n’ big bricks (each y inches long), we
want to create row which is z inches long using combination of small and big bricks. Write a program
to verify whether it is possible to create such row of bricks or not.
Note: Solution Mx + Ny = z is not recommended.
Examples-
input: We have 4(m) small bricks each 3 inches(x) long and 3(n) big bricks each 4 inches(y) long. We
need to create row which is 14(z) inches long.
output: Yes
input: We have 2(m) small bricks each 2 inches(x) long and 2(n) big bricks each 5 inches(y) long. We
need to create row which is 6(z) inches long.
output: No (no combination of bricks will make wall which is 6 inches long).
Interview:
For automation testing- Programming question like
Convert a binary tree into its mirror.
Reversing a linked list.
Database Queries etc. were asked.
Solution Q1:
#include <stdio.h>
#include <stdlib.h>
int main()
{
char str[20];
int i=0;
return 0;
}
Solution Q2:
#include <iostream>
using namespace std;
int main()
{
int m,x,n,y,z;
int small=0, large=0, sum=0;
cout << "Enter values : ";
cin >> m >> x >> n >> y >> z;
int i=0,j=0,flag=0;
for (i=0; i<m; i++)
{
small=small+x;
for (j=0; j<=n; j++)
{
sum=small+large;
if (sum>z)
break;
if (sum==z)
{
cout<<"\nYes. Combination Possible";
flag=1;
}
large=large+y;
}
large=0;
}
if (flag==0)
cout<<"\nNo. Not possible";
return 0;
}
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/hike-interview-experience-set-7-for-automation-testingmanual-testing/
Snapdeal Interview Experience | Set 14
(On-Campus for Software Engineer 1)
Hi, Recently i was interviewed for Snapdeal Software engineer 1 Position in my college campus.
Round 1: Online
1) Check whether two given lines intersect or not,coordinates of end points were given
2) Find the number of paintings visible ,their positions as one dimensional co-ordinates of end points
were given
Round 5:
HR round
Basic questions about snapdeal
Why Snapdeal?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/snapdeal-interview-experience-set-14-on-campus-for-software-
engineer-1/
Interview experience at "Infinera
Bangalore India"
Interview process took 3 to 4 hours and it was done.
It was good interview.
It was on Java, Data structures and algorithm.
2nd round
Questions on Java Threading, what is static synchronization and normal synchronization on method.
Gave one problem and asked to solve that
I have been given with library called add.jar, which does addition job.This jar has many other
methods too.All these methods are used at various places in our applications.This library has
exposed some interfaces to client.
If I want to print the time taken by all the methods used in my application.
How can we do that??
3rd round
Explain how Collections.synchronizedMap() method works.
Write some Restfull apis for telephone functionality
and some questions on my project.
4th round
Director took the interview.
Simple behavioural questions and some java questions.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/interview-experience-at-infinera-bangalore-india/
MCQ question:
1. Programming: 10 Questions
2. Machine Learning Hadoop : 6 Questions
3. Networking : 6 Questions
4. Operating System: 6 Questions
5. Infrastructure: 6 Questions
6. Application Security: 6 Questions
CODING questions:
2 coding questions.
One of them is simple array question and the other related to Dynamic Programming.
After few months i received the mail for the next round.
F2F Rounds:
I was welcomed by the interviewer with small introduction. Interviewer gone through my Resume.
Questions:
1.Implementation of Doubly Linked List.
2.Extended the first question to sort the Linked List and remove the duplicates.
3.Heap Sort.
4.Different algorithms.
The interviewer looks what strategies you take in order to solve the problem.
Moving forward he asked question related to my 6 months Industrial Training and Projects.
Then the interviewer started asking basics questions which touched following topics :
Questions:
Be careful while preparing your Resume. Interviewer asked questions based on the resume.
Questions:
Implementation of Stack.
Different Sorting Algorithms.
Linked List and Array questions.
JAVA related questions that covers Java Collections, Multithreading and basics Java questions.
Network Security and Encryption related questions.
Puzzle (Hour Min hand)
Software Engineering questions.
Operating System questions.
DBMS questions.
etc
HR round.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/visa-interview-experience-set-7/
Carwale Interview Experience (Off-
Campus for SDE 1)
Recently I am interviewed for Carwale SDE-1 position in Navi Mumbai.
The first time through you visit every door and toggle the door (if the door is closed, you open it, if
it’s open, you close it).
The second time you only visit every 2nd door (door #2, #4, #6). The third time, every 3rd door
(door #3, #6, #9), etc.
2. What’s the fewest weights you have to measure any weight from 1 to 27?
3. What’s the fewest weights you need to balance any weight from 1 to 29?
4. Three boxes labelled as red, blue and mixed. These labels are incorrect.one box contains red balls
and another box contains blue balls and remaining one box contains both red and blue balls. Pickup
one ball from any box (U should pick up ball only once) and name the correct labels.
3. Given an array A [] and a number x, check for all pair in A [] with sum as x.
5. What was the toughest project you ever received? Problems faced in that. How you solved it.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/carwale-interview-experience-off-campus-for-sde-1/
Flipkart Interview Experience | Set 28 (For
SDE2)
Round1: Machine coding and discussion based on that.
Was asked to design and code snake and ladder game. Then questions where asked on how it can be
extended.
Question 1: you are given a 1d array. The values represent the height of wall from floor. We are
supposed to find what will be the amount of water it can hold. For ex.. Array(1,0,3) can hold 1 unit of
water. Array(3,1,3) can hold 2 units of water. I did not give correct solution here. Can anyone suggest
me the correct solution here…
Question 2: We have a huge log file for meeting times in an office. Each entry has only start and end
time. Given this we have to find the time which has the most number of meetings. He basically
expected me to sort it and find the conflicting entries.
I was rejected in this round. But all interviewers were down to earth. It was a nice experience. All
the best for others.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-experience-set-28-for-sde2/
Telephonic Round 1 :
—————————
He seemed a bit unprepared for the interview. He started with some introduction and knowledge
transfer about current work and then created a binary tree and asked me to write the level order,
preorder, postorder and inorder traversals for that tree.
Then, the coding questions followed.
2) Flattening a multi-level linked list but the nodes in depth should be printed first. So, basically the
1st question resembles BFS and this one resembles DFS. Did this using recursion very easily.
3) Process vs Threads. What happens when you type in a URL? High-level design. Handshaking
protocol. HTTPS protocol, etc
Telephonic Round 2 :
—————————
I must say this guy who interviewed me was really smart. This round was a little more than 1 hour
and there were 3 questions.
F2F R1:
————–
Started with introduction. A lot of questions about current company, current work, current project and
then a design question.
How would you design the meeting invite feature of Microsoft Outlook? Considering each meeting
invite as an object and that Web server is the storage space for the invites, design a data structure to
receive and send invites to user in an efficient manner. The message objects must be received in a
sorted manner based on the time of meeting. I suggested using a Binary Search Tree and justified the
use of this DS. I gave an O(NlogN) solution. I was then asked to code it. I coded it in C#.
F2F R2:
————–
1) Reverse a sub array in an array. Pretty easy.
2) Rotate a subarray in an array where start and end indices of the sub array are provided and ‘k’ is
provided which is the number of rotations to be done. The interviewer behaved really dumb in this
question. All he wanted was a solution. He made me dry run the code again and again and he wasn’t
really bothered about the concept or the approach. I don’t think he could relate to my solution which
was O(n) in time and O(1) in space.
3) Find if a linked list has a loop. Old question. Take a fast and a slow pointer. But to get this solution
wasn’t really his motive. He asked why slow pointer should move by one node at a time and why the
fast pointer should move at the speed of two nodes at a time. As led by the discussion, I was then
asked to find the optimal speeds of slow and fast pointers for a given linked list. Again, led by the
discussion, he asked if it’s given that the linked list has a loop and the size of the loop is given, can I
find the optimal speeds of the slow and fast pointers?
F2F R3:
————–
1) Same question as Q3 asked in telephonic round with the only difference that the heights of the
buildings was provided in a linked list. Coded it in C. Then, the interviewer twisted the question by
placing the sun after the last building(previously the sun was placed before the first building). Used a
stack. However, this can simply be done by the reversing the heights array and using the same function
written for the first part of the problem.
2) Design a data structure to represent the hierarchy of employees in an organization. Also, the design
should be such that, you can retrieve the no. of reportees of a manager(not just the direct reportees but
all the employees under him) very fast(O(1) was expected). Also, insertion of a new employee and
removal of an employee should be fast too.
I suggested using a n-ary tree of hash tables. Also, used an additional hash table where key was
employeeId and value was the address of the hash table (or the node) in the n-ary tree. My solution
did give no. of reportees in O(1) and addition and removal of employees was in O(n) time, where n is
the total number of employees. There wasn’t enough time to code though.
F2F R4:
————–
This round had a lot of HR questions. Cultural info. Current project. He also asked coding questions
but he wasn’t really bothered about the optimality of the solution.
1) Two nodes in a BST are swapped. Find them. Told my approach. Didn’t ask me to code it.
2) Print all the permutations of a string in lexicographic order. Coded it. Took me a lot of dry runs to
make him understand that the code is correct
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-189-for-sde1/
Paytm Interview Experience | Set 4 (Walk-
in Drive)
I got a chance to participate in walk-in drive at Paytm Head quarters. Went through following
process.
1) Written test: It contained 20 objective questions having a mix of C, networking and Database
questions and 2 subjective questions.
Subjective questions: Stock buy sell maximum profit and Find sub string in a string
Interviewer was impressed with solution of coin change and later he discussed what were the most
difficult data structure problems which I had solved. I told some like phone number keypad problem,
sudoku solver etc.
I was only possible because of all the stuff I prepared regularly from geeksforgeeks which I could not
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/paytm-interview-experience-set-4-walk-in-drive/
2) Store deepest right leaf nodes in a list. There can be more than one right leaf which are deepest
and at same level. Approach was to find deepest right leaf node level and connecting all right leafs at
that level in a linked list by inserting new node at beginning.
2) In running stream of integers find k largest integers at any point of time. (hashtable plus min heap
approach made by day)
1) Print matrix spirally from any point and using given direction. (This was very difficult to solve
because usually the problem is simply print matrix spirally)
2) He asked about most challenging faced so far. (At some point of time I realized I was telling
conflict but soon concentrated to tell a challenge. Please prepare behavioral questions beforehand
and be specific. Nobody is sitting there to listen a story)
1) Tell me about your entire work experience briefing each project starting from latest. He stopped at
some points and asked tech questions.
2) What is the most conflicting situation faced and how you handles it?
3) What is the most innovative input you provided where you were appreciated by your manager?
4) Implement garbage collector. (Had no idea how to do that, but took some time and was able to tell
an approach to maintain reference count in hashtable. He asked to code the approach)
Three rounds were completed on a day and fourth and final round was telephonic. My last round
turned out to be negative because I was not able to write complete code in given time.
Still the problem asked in round 1 and round 2 were new to me and was able to solve those using
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-190-delhi-drive/
Snapdeal Interview Experience | Set 14
(For Software Engineer)
Snapdeal interview experience for Software Engineer position:
Round 3: F2F
Ques 1: Given an integer array representing size of candles which reduce 1 unit in a day. Room is
illuminated using given x candles. Question is to find maximum number of days room is without
darkness.
Ques 2: Given a path of x length and some pickup/ drop points of some passengers, find amount
payable by a passenger. Basically it is car pool system and cost payable by a passenger will be his
contribution in car pool. For eg. if A travels with B for 10 km and then next 20 km with C and D then
A’s cost will proportional to (cost of 10 km) /2 plus (cost of 20 km)/3
It was very tedious process. All rounds went well but I could not figure out what went wrong. Plus
there is very difference between hikes given in Delhi and Bangalore. HR don’t have clear thought
about whom they want to hire and don’t even share the feedback. Wasted a lot of time in Snapdeal
process.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/snapdeal-interview-experience-set-14-for-software-engineer/
Prop Tiger Interview Experience | Set 2
(For Software Engineer)
Gone through Prop Tiger process for Java opening for Software Engineer.
F2F round:
Ques 1: Brief intro about Java projects. Pointed at some instances and asked Java questions.
Ques 2: Asked to write complete error free code in one shot tofind diameter of binary tree.
Ques 3: Again asked to code in one shot to convert binary tree which hold children sum property.
Ques 4: Prove right or wrong p^2-1 =12k where p= prime number and k= positive integer. Simple
approach is to use (p-1)(p+1) which means p^2-1 is divisible by 4, then find how it is also divisible
by 3.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/prop-tiger-interview-experience-set-2-for-software-engineer/
Round 1:
Ques 1: Brief about yourself.
Ques 2: Find all pair of elements in an array which sum as given integer x.
Ques 3: Find index in an array such that sum of all elements on its left is equal to su of all elements to
its right.
Ques 4: Find third highest salary from employee’s salary database.
Ques 5: What is JAX-RS?
Ques 6: How to make sting mutable in Java? (initializing string using new will create it in heap which
is not immutable but interviewer was interested to hear about string builder and string buffer )
Ques 7: What was the entire stack used in your current project?
Ques 8: How to include changes of other person in your branch (git)? What is –rebase in git? Some
more questions of merge conflicts.
Round 2:
Ques 1: Asked about current project.
Ques 2: Project was in nodejs so asked about why it is useful and in what scenarios callbacks are
used ? How to run functions simultaneously ?
Round 3: HR round
Asked why you want to switch? What you are looking for ? etc etc
Round 4: PI test
It was predictive index test to determine compatibility with current employees. It was sort of
psychometric analysis test. (Not a big deal)
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/delhivery-interview-experience/
Ques 1: Tell me about your projects? Why you want to switch so soon?
Ques 2: Asked questions on web optimization like how to reduce server load, processing time, how
to handle multiple requests etc. Caching , forward and reverse proxy, CDN, EC2 and scripting
language always helps in answering these questions although there are many more awesome methods.
Ques 3: Asked me to complete a task. First discussed approach by searching on internet then
completed the task using Java. Task was related to fetching mails (sent via offline chat client) from
IMAP or POP3 mail box and develop an admin UI to view customers who used chat client and their
messages with some more functionalities. I used JavaMail API.
Ques 1: What is RSA and how does it avoid man in the middle attack.
Ques 2: Find kth largest from two sorted arrays having integer elements. Used merge procedure of
merge sort k times (O(k) time complexity). Interviewer asked to develop an algorithm in log(n) time.
This was the best interview process I have gone so far which examine a candidate by his ability to
complete a task within specified amount of time.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/travel-triangle-interview-experience/
Synopsys Interview Experience | Set 4 (For
R&D Engineer I)
Recently, I was interviewed for Synopsys (R&D Engineer I). There were two telephonic rounds
followed by 5 F2F rounds.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/synopsys-interview-experience-set-4-for-rd-engineer-i/
MAQ Software Interview Experience | Set 7
Round 1: written
Apti, C, C++, OS, DS
Round 3: Skype
1. Resume, projects, OS, SQL, DS and OOP concepts.
2. Asked to find fibonacci series in O(log n) method.
Ans: use matrix method
3. Add two nos without + operator.
Ans. used half adder method
Round 4: skype
1. Resume, projects, OS, SQL, DS and OOP concepts.
2. Puzzles: 2 eggs puzzle, 20 horses race puzzle(give the data-structure too).
Tell about urself, why MAQ, plan for higher studies etc.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/maq-software-interview-experience-set-7/
Microsoft Interview Experience | Set 53
Round 0 –
Second max element in BST
I used quick sort partition logic to separate odd and even numbers and then ran quick sort on both
halves.
Round 1 –
Assume an RAM of size 1024 bytes. There are multiple processes running on the system. Your
application will get this information –
(Thread Id, Memory Block, time, R/W) – which essentially tells that the thread T was using memory
block M at time t and operation could be read or write.
You are given with the list of threads accessing memory locations, you have to find conflicts.
Example –
(1, 512, 1, R)
(2, 432, 2, W)
(3, 512, 3, R)
(4, 932, 4, R)
(5, 512, 5, W)
(6, 932, 6, R)
(7, 835, 7, R)
(8, 432, 8, R)
O/P –
Thread 1 & 3 conflicts with thread 5
All other operations are safe.
Round 2 –
http://www.geeksforgeeks.org/turn-an-image-by-90-degree/
Round 3 –
http://stackoverflow.com/questions/746082/how-to-find-list-of-possible-words-from-a-letter-matrix-
boggle-solver
> My solution was mutation of this – http://www.geeksforgeeks.org/mobile-numeric-keypad-
problem/
Round 4 –
3D boggle solver and 3D cross word solver.
Design data structure to store and give a solution.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-53/
Amazon Interview Experience | 191
1st round (data structures and algorithm)
1) Ladder of n steps is given.Find the number number of ways to reach the end point.I can take either
1 step or two steps at a time.
2) Find the k largest number in running stream of words.
couldn’t write the running program for the second question.
hash(key)
{
return key%1000;
}
and your own hash operations. Did it using hashmap with pointer to an avl tree.
Bar raiser
1) About work experience,projects and current company
2) To find the shortest sub-sequence with maximum sum.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-191/
Microsoft Interview Experience | Set 54
(For SDE)
Round 1 (45 mins):
Tell me about yourself.
1. Given an array of strings with R, G & B as characters. Sort the array such that all R comes first,
followed by Gs & followed by Bs. Do it in O(n) time complexity. (Paper Code)
For eg. array is:
I/P: G G R B R B B G R B R
O/P: R R R R G G G B B B B
Done using the same logic as that of sorting 0s, 1s & 2s in no time. Interviewer was happy. *:) happy
2. Can you do the same above program using Singly Linked List (SLL) & Doubly Linked List
(DLL) in O(n) time complexity.
1. Matrix Multiplication of 2 matrices. Both of the matrices are Distributed across a cluster of
nodes. And matrices are of huge size (BigData). How can you multiply these matrices efficiently. He
wanted to know the approach only but not the actual code.
(He asked me this Distributed problem esp. as I’ve worked on Apache Spark & Hadoop
Distributed architecture in my project. So he was very keen to check my knowledge in the
Distributed & BigData domain.)
My approach: As we know that in matrix multiplication, ith row is multiplied with jth column,
(i+1)th row is multiplied with (j+1)th column, & so on till (n-1)th row with (m-1)th column.
Map each ith row to jth column, (i+1)th row to (j+1)th column & so on till (n-1)th row to (m-1)th
column.
The idea is to make Keys as ROW index & Values as Column index.
While doing the Reduce operation, Multiply the respective Rows & Columns using above Mapped
Rows & Columns. B’coz generally in the Reduce operation of MapReduce jobs, Spark/Hadoop
brings all of the mapped data into one Server to do the computation & stores the result. So in the
Reduce operation, Spark/Hadoop will bring only the mapped Row & Column while doing the actual
multiplication. We need NOT to bring all Rows & Columns data at once.
This was my approach. One can think of the other approach also & share their better approach too.
Laterally he asked me about MapReduce jobs in further details & asked me about Hadoop &
Distributed architecture (NameNode, DataNode, etc.). Some questions on Scalability.
2. Given an N-ary tree with thousands of nodes in it. Pair (Join) the Leaf nodes which do NOT
SHARE the common path. i.e. Two Leaves can be Paired only if they do NOT have Intersecting
path.
For example,
A
/ | \
B C D
/ / | \
E F G H
Note: If we pair(join) say, (E-F) then we can NOT pair any of the (D-G) or (D-H) as they SHARE
the COMMON path from A to C.
i.e. E-B-A-C-F —> (E-F) pair
D-A-C-G —> (D-G) pair
D-A-C-H —> (D-H) pair
I’ve told him using BFS as it traverses each Edge exactly ONCE. The idea was while doing BFS
traversal, Pair Childs of a Visiting node if both of their Childs are Leaf nodes.
If the Visiting node has only ONE Child (Left Child or Right Child only) then store this Child in the
TEMPORARY array (Array of Pointers to the Childs).
Once the BFS traversal ends, Pair the remaining Childs in the TEMPORARY array one by one.
Again he was NOT satisfied as BFS works LEVEL-WISE. So he told me what if some of the nodes
have SKEWED sub-tree with thousands of nodes.
I got stuck.
He was so impressed *:) happy with my 1st problem’s approach using MapReduce. He was a little
bit satisfied with the 2nd problem’s approach. So I’ve been forwarded to 3rd round.
Lunch time. Soooooooo Good. Food was so good. Really liked it.
He had quickly looked at my CV. Then he asked me to tell something about the projects that I’ve
worked on & working on. As I’ve worked mostly on Machine Learning & NLP domain, he asked
me few questions about NLP. How will you Scale your current project.
Done it in no time.
He asked me do it in a SINGLE PASS. As the solution requires 2 PASSES of the sentence. (1st for
reversing each individual word & 2nd for reversing WHOLE sentence).
Got stuck. Taken a long time to think about this. Couldn’t able to do this. Finally he asked
me another question.
I’ve been told to wait for the 4th & Final round.
Provide all the services IaaS, PaaS & SaaS using Service-Oriented Architecture (SOA).
Have given very Low-level design. NOT up to his expectations. As I’ve NOT worked on Cloud
Technology earlier.
Advise:
Prepare for the Design questions & Scalability.
One can go through this link: https://www.quora.com/How-should-I-prepare-system-design-
questions-for-Google-Facebook-Interview
Watch out this video. Its very good.
They look for the basics of Data Structures & Algorithms. (esp. Linked Lists & Tree)
Lastly, GeeksForGeeks is the best source for all. GFG really helped me a lot in the preparation.
Thanks
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-54-for-sde/
Microsoft Interview Experience | Set 55
(For Software Engineer 2)
Skype round 1: (10 min)
Print a tree in zigzag order. For Example for the given input tree:-
1
2 3
4 5 6 7
1
3 2
4 5 6 7
Code for the logic in any language that you are comfortable in.
They called me to Hyderabad for an F2F immediately after Skpe rounds, (I managed to postpone it to
the next week).
Question 1:
Given a character array which each position is filled with either a single digit numbers or a comma,
Array of 22 characters:-
Write a code to reply true if we find a set of three set of numbers separated by a comma such that
X , Y, Z and Z = X + Y
In the array above 77+22 = 99 so return true.Code for the same with negative test cases.
Question 2:
If in a given Doubly Circular Linked List a couple of next pointers are corrupted, give the logic to
rectify them all.
Write a Code for listing the job ids + task id combination in round robin fashion.
Example:-
Choose any data structure of the input (array of structures or linked lists or queue).
Design Test cases for the same.
Question 2:
Given a BST, create a Doubly Linked List from the same in place.
Tree node -> left pointer = DLL node -> previous pointer
Tree node -> right pointer = DLL node -> next pointer
Face2Face Round 4: (with the Director) (1 hour approx)
He asked typical HR questions like
Why Microsoft?
Where do you yourself 10n years from now? Blah blah.
Question 1:
Given a mess of 3 balls (colored red blue and white) write an algorithm + program with the most
efficient way to sort them color wise. (Dutch National Flag Problem)
Question 2:
Given a string print the string with alternate occurrences of any character dropped.
Position was software Engineer 2. MSFT does not have SDE and SDET anymore, All roles shall be
SE from now on.
Thank you geeks for geeks. This site is a Marvel for job aspirants.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-55-for-software-engineer-2/
Flipkart Interview Experience | Set 29
Round 1: Machine Coding
Q. In a regular expression, * represents 0 or more repetitions for preceding character. & represents
the regex preceeding it is at the end of string. and all small case letters represent themselves. For
example:
rat&
Pass: bigrat, smallrat
Fail: ratoulite rats
a*b
Pass: b, ab, aab
Fail a, asd
abc
Pass: abc, abcd zabcd
Fail: abdc, dabfc
with geeks for geeks it may seem easy but a thorough analysis is needed. Including pseudo-code. I did
the thing after adding an extra variable in node DS.
Round 4: Senior Manager Round
1. Why flipkart
2. Job description, very specific about current role
3. Reader-writer problem code, without semaphore. I used two variables, asked me to minimize
variable usage.
4. Given a text file, store all the words using a tree. I gave a trie solution.
5. What is the most challenging project you have done in your lifetime and why.
PS: If thorough knowledge about approaches are not prepared then its better to get screwed. They
will ask every case possible.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-experience-set-29/
NI Coding test
There were two questions.
Q 1. Given N and N elements Find the number of distinct sums. For example:
3
1, 2, 3
Possible sums of all subarrays: 1, 2, 3, 3, 5, 6. Return Value: 5 (Distinct sums are: 1, 2, 3, 5, 6)
Solved 1st with 100% success, and in 2nd 14/16 cases were passing.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/ni-coding-test/
Round 1
It was a written round:
7 ques, 20 marks in total, 40 mins
Q1. Write a program to find intersection of 2 strings with non-repeating characters.
Q2. Mention the differences between primary key and unique key.
Q3. Write a function which intakes an integer array. Swap the max element and the second
Lowest element of the array keeping the position of rest of the elements as previous i.e unchanged.
Q4. Puzzle: 9 balls with 1 heavier ball in them and a 2 pan balance is provided, find the minimum
number of attempts required to find the heavier ball.
Ans: 2 (According to me)
Q5: How many print statements for f(4,a,b,c) :
f(n,a,b,c)
{
if (n==0)
{
printf(“\n a=%d b= %d c= %d”,a,b,c);
}
else
{
F(n-1,c,a,b);
printf(“\n a=%d b= %d c= %d”,a,b,c);
F(n-1,b,c,a);
}
}
f(int m,int n)
{
int val = 1;
if (n%2==1)
val = val*m;
else if (n/2 ==1)
val = val*f(m*m,n/2);
return val;
}
Round 2
Interview with VP-Tech
After introducing himself as Abhishek he began his chain of questions which encompassed
OOPS, RDBMS, DS, ALGO
Q1. Can constructors be private. If yes then how to get an instance of such a class
Basically a question about singleton class
Q2. Write a query to fetch all the people with their birthdays today from a table which is as follows:
NAME | DAY OF BIRTH (INT) |MONTH OF BIRTH (INT)|YEAR OF BIRTH
package remove_extra_parenthesis;
import java.util.*;
class stackelement
{
char element;
int index;
stackelement()
{
element = 'a';
index = 0;
}
stackelement(char cc, int in)
{
element = cc;
index = in;
}
}
if(se.element == ')')
{
if (st.isEmpty())
{
a[se.index]='$';
}
else if(st.peek().element != '(')
{
a[se.index]='$';
System.out.printf("peeking %c which was at index %d inside,
setting dollar to %c at index %d \n",
st.peek().element,st.peek().index,se.element,se.index);
}
else
{
check=st.pop();
System.out.printf("poping1 %c which was at index %d inside \
check.element,check.index);
}
}
}
while(!st.isEmpty())
{
check=st.pop();
a[check.index]='$';
System.out.printf("poping2 %c which was at index %d inside \n",
check.element,check.index);
}
//char first=st.pop().element;
for(int i=0; i<s.length(); i++)
{
if(a[i]!='$')
System.out.printf("%c",a[i]);
}
//System.out.printf("idiot %c",first);
}
}
1
1 2 1
1 2 3 2 1
1 2 3 4 3 2 1
1 2 3 2 1
1 2 1
1
After this round they told me to leave for the day and for next rounds we will let me know you, if I am
through this round at a later date.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/infoedge-interview-experience-set-2-for-php-mysql-developer-
profile/
Zoomcar Interview Experience
There were six rounds.
Short Story-
Second – Algorithms
Third – Technical
Long Story-
The first round was online coding. It consisted of 10 mcq which were based on data structures,
complexities, sql queries, operating system, aptitude, c and c++. It also consisted of 5 coding
questions. Out of which two were pretty straight forward, one was medium and other two were tough.
I was only able to solve 3 problems and half solved fourth. In one of the problems you had to
implement a binary search tree. I don’t remember the exact questions, if you read geeksforgeeksthen
you can clear this round.
The second round was telephonic. I was asked two coding questions. Given a 2 dimensional array in
which the rows and columns are sorted find a given element. You can find an O(m+n) solution here
Search in row wise and column wise sorted matrix. The other question was given a 2 dimensional
array in which the elements are either ‘x’ or ‘o’. Replace all ‘o’ with ‘x’ if the top, bottom, right and
left elements are ‘x’. I did it using two traversals. In first traversal I replaced ‘o’ which satisfy the
constraint with some arbitrary value ‘y’ and then replaced all ‘y’ with ‘x’ in the second traversal. I
was asked if I was aware of any version control software’s. I said, I knew about git and svn. He
asked me to tell the difference between git merge and rebase. He asked me how would you implement
your own version control software. I told him I would implement it using MD5 algorithm. I would see
if hash values are different and then point accordingly that there have been some changes in the local
repository. He did not want me to tell the entire design, he was satisfied with my answer and time
was up for the interview.
The third round was theoretical. He asked me about system calls, fork, difference between nfa and
dfa, rsa algorithm, virtual function, inheritance, polymorphism, inode in unix file structure. He was
testing my concepts. You need to know the basics of operating system and theory of computation to
ace this interview.
In the fourth round was mainly data structures and algorithm based. He asked me to tell the
difference between binary search tree and binary tree. Tell the difference between binary tree and
heap. How to delete a node in a binary search tree. Given two arrays of same size containing
randomly arranged values. You need to rearrange the values such that if the two arrays are a and b
then sum of product of corresponding values i.e. a1*b1 + a2*b2 + a3*b3 + …. + an*bn where a1,b1
are the first elements of array a and b respectively of size n. I gave an answer for this question that I
will simply sort one array in ascending order and the other array in descending order and do the
corresponding operations and it will give me the required result.
In the fifth round which was a f2f round, there was a discussion about my college projects and
intern ship projects. He then moved on to ask again algorithm related questions. Given a number find
the next greatest palindrome. Given a ternary search tree how will you insert, find and delete
elements. The ternary search tree is implement in such a fashion that each element has three childs
left,middle and right. The left value is less than the parents value, middle value is equal to parents
value (middle will be present only in case of duplicate elements) and right value is greater than the
parents value. The tree should be height balanced considering middle values.
In the sixth round which was also a f2f round, there was a discussion about my projects and whether
I had any previous web development experience or not. He asked to tell me what happens when i
enter a url in my browser, explain each step in detail. Then asked me search an element in sorted
pivoted array without duplicates and then extended the question to search an element in sorted
pivoted array with duplicates. I was asked a puzzle next which was, you have 10 bottles each bottle
has 10 tablets. A tablet usually weighs one gram. One of the bottles has tablets weighing 2 grams find
the bottle number when you have an weighing machine which tells you the weight you put on it and
you can use it only once. I gave him the straight forward answer that I will take 1 tablet from first
bottle, 2 tablets from second bottle and 3 from third bottle etc and it would tell me uniquely which
bottle has 2 grams weighing tablets. Then he extended the question if there are two such bottles then
how can you find them. I was not able to solve this question as the constraint was 10 tablets in each
bottle. If this constraint was not present I would have taken 2 from first, 4 from second, 8 from third
and then I could uniquely identify the two bottles with different weight tablets.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/zoomcar-interview-experience/
D E Shaw Interview Experience | Set 9
Telephonic:
1. JD (Job Description)
2. What are storage classes (Explained all different kinds of storage classes)
2.1 Whats register
3. How static affects life and scope of a variable
3.1 why can’t we refer to a static variable from outside file as extern.
4. Difference between paging and segmentation
5. What is fragmentation, what is internal and external fragmentation
6. Steps of writing a code to executing it as a program (Detailed steps like lexical symantic analysis,
pre-processing, intermediate code generation, linking, loading)
6.1. How to distinguish when to use static bindings and dynamic bindings.
7. Details about pre-processing
7.1 What happens when we write #include after pre-processing. Details
7.2 Difference between #include and #include “stdio.h”
8. What happens to a program having system-calls (Context switching, needed to explain in detail)
9. Deadlock, deadlock avoidence
10. Trashing
11. Some very simple algo questions like find intersection point of two linked lists, Address of node
is given to be X, how to delete X
12. Different kinds of scheduling algorithms
13. When stack overflow happens.
14. Inheritence
14.1 What is the difference between runtime polymorphism and compile time polymorphism
14.2 How compiler internally achieves runtime polymorphysm
14.3 How is the entry stored in VTable
15. Explain the structure of Inode table.
Round 1:
1. Job Description
2. What is BST, How can we know if a tree is BST or not. Provided 2-3 solutions. One Simple
inorder traversal, limiting case occured. Then NextMax, nextMin for every element. Asked to
optimize, was not able to do it.
2. Given a paragraph, print all anagrams together. Solution, Modify DS as:
class newWords{
string origWord
string sortedWord
}
Sort the paragraph on the basis of sorted word, we’ll get all anagrams together.
3. DBMS, Said no but Interviewer insisted to tell about ACID property. Asked to write code to
ensure atomicity.
4. Just a bit about authentication
5. Structure of an Inode table entry
6. Linux command to know unique words in a File
7. Implement priority queue, write code. [Implemented using array]
8. Find nth maximum element in a BST. Modified Inorder traversal LPR (Left, parent, right) to RPL.
Write a working code.
9. What are clustered and unclustured DB
Round 2:
1. Job description with used cases.
2. Operator overloading with used cases.
3. Design a structure to address employees in an organization. Used Runtime polymorphism concepts
to design classes.
4. http://www.geeksforgeeks.org/the-stock-span-problem/ Reached halfway but was not able to
complete the solution.
5. Find minimum in stack at any point of time.
Some small questions.. I can’t recall. Contrary to the feedback I got from people, they were very
HR Round:
1. Tell me something about yourself which I cannot get from CV
2. Tell me some interesting things about college
3. How do you like Hyderabad
4. Why do you want to switch job when after conversation I think you are having a great time in
Samsung
5. You have any idea what we work on.
6. Why so much code? [I mentioned codechef, topcoder and github in my CV]
7. What are the best and worst moments of your college.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/d-e-shaw-interview-experience-set-9/
Codenation Interview Experience
There were 4 rounds
Short Story –
First Round – Online Round (3 coding questions 90 min)
Second Round – Skype Interivew (Data Structure and Puzzle)
Third Round – Skype Interview (Open ended Questions)
Fourth Round – Skype Interivew (with CEO)
Long Story –
The first round consisted of three algorithmic questions conducted on Hacker rank. They were
tough questions. One of the questions could be solved using euler totient function. The second
questions was this. I don’t remember the third question. I was only able to solve the first question and
that was enough to clear this round.
The second round was based on data structures and puzzles, conducted on skype. He asked me to
implement a stack. I implement it using a singly linked list. With the pointer pointing to the end of the
linked list. I implemented push, pop operations handling overflow and underflow cases. Initially I
was maintaining two pointers but he was not satisfied with it and told me to do it using only one
pointer. I implement push and pop functions in O(1). I was asked 5 pirates and 100 gold coins puzzle.
The fourth round was with CEO and it was on Skype. It was HR round. He asked me why do you
want to join this company. What was the toughest problem you have faced. I don’t remember the
remaining questions.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/codenation-interview-experience/
During the game,players and their scores will be maintained and shown by the system and winner
will be declared at the end of the game.
Likewise multiple games can be played in parallel on multiple free lanes.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/ola-cabs-interview-experience-set-5-for-sde/
2nd round –
1. There is a stream of integers incoming. You are only concerned about finding whether a number
exists in a window of k numbers. Write code to find the number with minimum number of
comparisons.
2. Imagine you have four operations. ‘K’ (types k on screen), ‘select all’, ‘copy’, ‘paste’. Find out
maximum number of K’s possible for given number of keystrokes.
6th round-
1. Rotate a 2D array by 90 degrees.
2. Print tree nodes in a level order. Each level on a newline.
Result- HR said that you will offered a job. But a week later I got rejected. I found their process
highly arbitrary.
Practice code on paper and get to know on what criteria you are getting selected.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-192/
1. Given an image with a lot of pixels, find all the pairs of pixels that are strongly connected.
2. Given an N-ary tree with thousands of nodes, pair the leaf nodes which do NOT SHARE the
common path. i.e. Two Leaves can be Paired only if they do NOT have a common edge that was used
in a previous pairing.
For example,
A
/ | \
B C D
/ / | \
E F G H
Leaf nodes: E, F, G, H & D
Note: If we pair(join) say, (E-F) then we can NOT pair any of the (D-G) or (D-H) as they SHARE the
COMMON path from A to C.
So basically you just have to see the cases where you can insert the new nodes differently
I will probably try to contribute with an article on this.
This site helped me a ton and I hope others will find their dream jobs too !
Thanks geeks
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-56-for-sde-2/
SAP Labs Interview Questions | Set 9
(Fresher)
The 1st round was an Online Test. It consisted of 107 questions (60- Psychometric Questions) and the
overall time limit of 90 minutes. The level of difficulty was moderate. The last 2 questions were
coding (Tip: These carry more marks so solve them first).
Round# 4: HR
Interviewer introduced himself, he was about 35, asked me to introduce myself, and explain me about
my projects, after that he asked whether ever worked within a team, I answered everything.
What are my interested areas, I said cloud computing, Big data and IoT he asked me to explain. Asked
whether I have any other offers, I said yes then y I would prefer SAP. I explained him, he asked me
about my family, will I able to move to Bangalore? He did not say I was selected but from his words I
got that :). finally he said we have an offer to u, and explained all benefits , pay and all. I said thank u
sir, he asked me to chose preferred joining date and asked if I had any query and I asked few and said
thank you.
Small Suggestion:
Its not about the answer its all about how u approach the problem may it be a program or a puzzle. Be
confident, tell them if u don’t know a particular question, make sure u tell them your approach ,given
an opportunity to ask questions at the end, always ask a few, this would show your interest to the
interviewer.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/sap-labs-interview-questions-set-9-bangalore/
Flipkart Interview Experience | Set 30(For
SDE 2)
Machine Coding Round: (1 hour)
—————————————–
Implement a finite state machine.
– The machine should have one start state and can have multiple end states
– It should be extensible (I should be able to add any number of states or transitions at any time)
– I should be able to set notifications on or off for any state or for the whole state machine
Design: (1 hour)
————————-
Implement Bidding system in Flipkart’s website
What is the maximum number of meetings that can be accommodated in the meeting room ?
2) Given a number line from -infinity to +infinity. You start at 0 and can go either to the left or to the
right. The condition is that in i-th move, you take i steps.
a) Find if you can reach a given number x
b) Find the most optimal way to reach a given number x, if we can indeed reach it
3) Given a string s1 and another string s2, what is the smallest substring in s1 that contains all the
characters of s2 ? (most efficient solution)
4) Given a string s1 from a dictionary and a string s2 from a dictionary, find the minimum number of
steps to transform s1 to s2 under the following conditions:
– You can change the implementaion of dictionary
– Every transformation should belong to the dictionary
– You are given a O(1) library function F(s1,s2) which returns True or False for the query ‘can
s2 be obtained from s1 with a single transformation’
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/flipkart-interview-experience-set-30for-sde-2/
D E Shaw Interview Experience | Set 10
(Off-Campus)
I received a call from a consultancy, informing me that there are vacancies in D E Shaw for freshers.
So they take my resume from naukri.com and send it to DE Shaw. Within 10 minutes, i got another call
from D E Shaw recruiter. She scheduled my telephonic interview on the next day.
After few days I got a call for the interviews at Hyd. D E Shaw has awesome office. (All rounds
were taken by 2 Interviewers)
Interview round 1:
HR round:
Some basic HR questions
Apart from that, below are some questions, asked to other candidates there.
1. Design a online reservation system for n rooms.
2. Longest palindromic substring .
3. 25 Horses puzzle
4. Which sorting algo is used to sort names in a large file .
5. Reverse a stack.
6. Reverse a doubly linked list .
Geeks for Geeks helped me lot in my preparations. I followed GFG thoroughly during my
preparations, hope that my experience would help you in your interviews.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/d-e-shaw-interview-experience-set-10-off-campus/
Goibibo Interview Experience
The interview process in all consisted of 4 rounds, I was applying for Software Developer.
In almost every round there is a bit of about yourself, experience with projects, things you want and
like to work on etc. There were 4-5 problem-solving and algorithm questions in each round.
In the first round it started with Dynamic Programming questions , mostly working with sub-array to
NP hard/complete questions and questions based on technologies you have worked with.
Second round was again algos around trees, and solving few puzzles around 2 to 3.
The third round was pretty easy. It was mostly about your claims on the resume, about your projects
etc and 3 coding questions.One was logic to print a certain kind of pattern of stars, and finding square
root without using any builtin functions.
In all out of around 15 questions (algos + puzzles) I gave complete solutions for upto 12 of them and
the 3 of them could get half-way to the solution where they basically looked at your approach.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/goibibo-interview-experience/
Round 1
a. Inorder predecessor and successor for a given key in BST –
http://www.geeksforgeeks.org/inorder-predecessor-successor-given-key-bst/
Round 2
a. A Boolean Matrix Question
http://www.geeksforgeeks.org/a-boolean-matrix-question/
Round 3
a. Detailed discussion of my project, complete architecture, how can it be made better. He was
listening carefully and was pointing out issues.
Just normal discussion and he will basically check how involved are you in your job. Just be
confident about what you have done.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/ola-interview-experience-set-6-for-sde-1/
Amazon Interview Experience | 193 (For
SDE-1)
I had interview with amazon.com for SDE1 position.
2nd round –
1. Placing N chess queens on an N×N chessboard so that no two queens attack each other. For
example, following is a solution for 4 Queen problem.
http://www.geeksforgeeks.org/backtracking-set-3-n-queen-problem/
I had a long discussion on this question finally he was satisfied with my solution.
2. Write a program to find the sum of maximum sum subsequence of the given array such that the
intgers in the subsequence are sorted in increasing order.
http://www.geeksforgeeks.org/dynamic-programming-set-14-maximum-sum-increasing-subsequence/
3. Given a Binary Tree, check if all leaves are at same level or not.
http://www.geeksforgeeks.org/check-leaves-level/
3rd round –
Given a sorted array arr[] and a number x, write a function that counts the occurrences of x in arr[].
Expected time complexity is O(Logn)
http://www.geeksforgeeks.org/count-number-of-occurrences-in-a-sorted-array/
Find k largest elements in an array. Elements in array can be in any order.
In every round, after each question, complexity of the algorithm was asked. Its good to ask questions
to get more clarification about the question.
I want to thank the entire team of geeksforgeeks. It is a great portal and it helped me a lot in preparing
for Amazon interview.
Tips: Discuss various approaches with interviewer. Try to interact continuously with interviewer.
they were very friendly during interview.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-193-for-sde-1/
Fiberlink (maas360) Interview | Set 3
I applied at Fiberlink thorough a referral.
Round 1 (Coding test): 1 question to solve at HackerRank with a time limit of 1 hour.
Q. Find all distinct palindromic sub-strings of a given string.
GeeksforGeeks link
You have to implement a function GetVersion(int) , which prints out the whole stack for a particular
version.
– How to find intersection point of two linked lists in single traversals for both lists.
– Given a building with infinite number of floors. The number of rooms on each floor are
20,21,20,21.. and so on starting from the ground floor. The room number starts from 1 and keeps on
increasing. Given a room number, find the floor on which room lies and the position of room from the
left. Write a code for it.
– Other logical puzzles
After clearing the above rounds, they called me up to Fiberlink Office, Bangalore for some F2F
rounds.
After the HR interview, the HR told me that it has been very positive for me and that she has to do a
formal discussion with all the interviewers for a final nod, and you can expect the offer structure by
tomorrow (got the final offer letter after a week).
Overall, the experience was really nice. The interviewers were amazingly curious and helpful. They
are open to other approaches and answers rather than the one they know. A lot of questions were on
projects you have worked upon.
—————————————————————————————————————————
Some words for the GeeksforGeeks team:
Thanks to you guys for compiling up all the super awesome stuff out there at GeeksforGeeks.org.
Even the app has been quite amazing. The recent update of the website to responsive design is
splendid.
Keep up the good work.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/fiberlink-maas360-interview-set-3/
Yatra.com Interview Experience | Set 4
First round : Written Test
The test paper was consist of 20 MCQ from C, C++ Java and some aptitude question and 4 coding
question.
2. http://www.geeksforgeeks.org/reverse-words-in-a-given-string/
3. Birthday problem
An array is given which contains the age of your friends , if the age of the friend is greater than any
neighbor then he will get more chocolate than him. You have to find the number of chocolates for
distributing each one.
Ex {9, 8, 7, 3, 2, 1}
Second Round :
He asked me questions from Data Structures and java.
3. To find the count for each element in array how many number are smaller than this number which
appeared previously in the array.
3rd round
In the beginning the interviewer said I got a very good reviews for you that you are very good in
algorithm. I was like yippeee but then the real story began.
He asked me so many questions which were away from my reach then he said, I am done you can
leave for the day we will contact you. I knew that I got rejected.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/yatra-com-interview-experience-set-4/
Microsoft Interview Experience | Set 57
(For SDE)
Round 1 (45 mins)
1) There was a detailed discussion on the project i did at Microsoft and also over the two projects
mentioned in my resume.
2) There is a Bing log file containing the domain names. Design a cache memory system for faster dns
look ups.( i suggested a Trie and a min heap based solution).
I was asked to make it space efficient. (I replaced trie with map)
3)There is a turn based 2 player game in which there are 9 pins and each player is allowed to pick
either 1, 2 or 3 pins only. The last player to pick the pin is the loser.
Design winning strategy for such a game.
2)Suppose the large file contains name, address, Dob, pan no etc as attributes. Design class interface
for such a system.The question was re framed again with more conditions which i am unable to recall
now.
2)There was a detailed discussion over how the stl map data structure is implemented.
2)There is a rotated and pivoted array. Write the code to determine how many times the array is
rotated. (i did it in O(log n)).
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-57-for-sde/
D E Shaw Interview Experience | Set 11
(On-Campus)
D.E Shaw & Arcesium (A spin-off from D.E Shaw which happened very recently) came to our
college for recruitment.
So here is my experience .
Written Round :
20 Maths aptitude ( Hard ones )
20 Programming aptitude ( C , C++ , Java )-Many (OS , Networks, DBMS)-Few
One Coding Question .
Round 1 : ( HR )
They saw my photography blog, and asked me a few questions regarding it first.
1. What qualities in you made you a photographer ?
2. What challenges do you think Arcesium would face ?
3. Tell me about one thing you would like to change about your life.
4. What would you do if u do all the work and someone else gets the appreciation in your team?
5. Why do u want to be a part of our company?
6. What do u know about Arceisum ?
7. What is your greatest achievement ?
8. How did u perform your Written Round ?
Round 2: ( Technical – I )
This was very interesting as i was the last person to attend and it was already 10:30pm
The interviewer was so kind to come out and apologize for the delay . I told him that it was a
pleasure waiting for this opportunity and he took me in.
There were two people conducting the rounds in D.E.Shaw.
1. He asked me regarding my project on Hadoop.
2. What happens if a NameNode sends a heartbeat once in ten minutes?
3. Describe HDFS.
4. Describe Replication in Hadoop.
( Guys these questions were asked only because i did a project on hadoop )
5. You are given a table of 99 rows and 1 column, containing numbers from 1-100 where one number
is missing. Find the missing number using an SQL Query. ( NOT PL/SQL )
6. Write a query to find the distinct elements from a Table.
7. There is table where only one row is fully repeated. Write a Query to find the Repeated row.
8. What is Two – Phase Commit protocol ?
9. Explain about Super block and Boot Block in UNIX.
10. If u r given a chance to modify something in UNIX, which one would u choose.
11. What does an Inode Contain?
12. You are given an array for size N. With all numbers of values less than N. Find the Duplicate
elements.
13. You are given an Integer where only one Bit is set, Identify that Bit in O(1).
14. You are given two binary trees, check if they both are Mirrors of each other.
15. Find the Height of a given binary tree.
16. Scheduling in UNIX
17. What would happen if there is an infinite loop running that creates and deletes files in UNIX? ( I
was thinking for few seconds , when he smiled and said, sounds Interesting right ! Don’t forget to give
it a try ! I said “Sure ” )
18. Cursors in DBMS.
19. B tree, B+ Trees.
20. OOPS Concepts ( Inheritance, Abstract Classes, Diamond Problem etc. )
This interview was so much fun as the panel members were so friendly !
Round 3: ( Technical II )
1. Questions about prev Rounds.
2. Find the Largest Contiguous Sum in An Array of both negative and positive Integers. He needed a
O(n) Solution only.
3. Questions about RB-Trees, AVL Trees.
4. U have to list Recently Five viewed Photos from your Blog . Which Data structure would u use ?
Guys – the Above question went on for half hour !
I had to Provide all different data structures and he insisted on improving it further.
Finally he was convinced with a Unbounded buffer having a sliding window of size 5 along with a
Max Heap. He also wanted to view Pictures based on their Unique ID and their Time-stamp Values .
Finally, Two people were Selected and I was Wait-listed ( Meaning, they would call me in future if
they have requirements as they wanted to hire only two now)
I Thank GeeksForGeeks and everyone who has posted wonderful Articles that helped me learn a lot. I
Got placed in PayPal the next day ! This was a wonderful interview experience for me as it was both
fun and challenging !
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/d-e-shaw-interview-experience-set-11-on-campus/
eBay Interview Experience
Online Aptitude Round:
20 Maths and Logical aptitude ( Hard )
20 Programming aptitude ( C , C++ , Java, OS)
1) What data Structure Google is using for searching pattern. (Explain Trie and approach how u will
code)
2) What data Structure Google is using for Storing Data.
OS Questions
1) What is Thrashing? Explain
2) What is deadlock? Explain all conditions
DBMS Questions
1) ACID properties Explain with an example
2) Mongodb, NoSQL and SQL discussions for long time.
Java Questions
1) What is Hashmap ? how it implemented ?
2) What is arraylist ? Difference between array and arraylist ?
3) What is difference between int and Integer in java?
4) Difference between Hashtable and Hashmap ?
Be good in java
What is data type? What is advantage of Having data type? what will happen if we do not have data
type
Advantage and disadvantage.
How will you sort 20 Gb file ? You have 4 Gb Ram ? Try to come up with solution
What will happen when you press a key in keyboard ?how it works internally ?
Explain AVL tree – Write the Function for Left_Right Rotation ( I took time for this Question Never
expect they will ask code for Avl tree )
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/ebay-interview-experience/
MAQ Software Interview Experience | Set 8
(Off Campus for Software Engineer-1)
First Round (Technical Round on Skype (45 minutes )
Q1-some Questions from my resume.
Q2-Program for Factorial and how to calculate factorials of large numbers.
Q3-Detect a loop in linked list and find the middle node in linked list.
Q4-Given a stream of number which are added to the arrary A[]. find the middle element of the
stream.
Q5-What is indexing and hashing in DBMS.
Q6-Interface in Java.
Q7-Difference beween Abstraction and Encapsulation.
Q8-Multithreading in Java.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/maq-software-interview-experience-set-8-off-campus-for-software-
engineer-1/
3. There were about 15 aspirants. Some freshers and some with around 1 year exp.
Following is my experience:
1st Round:
Written round. 20 MCQ on outputs, oops, java, etc.
3 subjective.
A. One was to compress a string. For ex. i/p string is aaabbbbcc then o/p is a3b4c2
Totally working code with all the corner scenarios handled was expected.
B. Don’t remember the Second question, but it was super easy then the first.
C. Third question was optional. They said who know can answere. Question was to differentiate
between hashtree and hashmap in java. I left it blank.
2nd Round:
A. Detailed discussion on round 1 string compression.
B. How to check if a binary tree is BST
C. Asked me about myself. I asked him the office culture. Asked him about work they are planning for
new joinees and how are they planning to onboard them with yatra(trainings and all). Asked him
about office hours as well
3rd Round:
A. He asked me BST question from previous round. I told him its done already
B. Cloning a linked list with random pointers
C. A base string is given, lets say helloworld. Stream of sample strings are coming like oworldhell. I
had to tell if the sample string is a rotation of base string.
D. Then i asked him about his experience in yatra
4th Round (hiring manager):
A. Notice period
B. Current ctc
C. Expecting salary
D. Apart from work, what did i learnt at my previous company
E. Biggest mistake of your 1 year in previous company
F. What will you do in a conflict with manager
G. Team lead has provided a design, you yourself created another. How will you persuade team to
follow your design
H. Your latest conflict with team/manager. How did you tackle it.
I. Asked her questions about work i am expecting with this job. Asked her why hyderabad office has
just 30-40 employees. Asked about her experience.
Hiring manager explicitly mentioned she likes full stack people. In my current company, same is the
case. I told her about that. She liked it.
I thank geeksforgeeks for the preparation. And, very well done with the new UI. Really appreciate it!!
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/yatra-com-interview-experience-set-5-for-software-developer-1/
Tejus Network Interview Experience
I had interview with Tejus Network for Software Engineer position.
Round 1:
8 Programming Questions were asked, write code foe each.
1. Fibonacci series
2. First Non Repeated Character (With Less time Complexity)
3. Single Design Pattern
4. Consumer Producer Problem, Using Thread
5. Implement Set and Sort an Employee class, based on Id and Name.
6. Reverse Of Link list without using API
7. Implement hash code and Equals Method
8. Create Instance of Set and store Class Object into Set .
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/tejus-network-interview-experience/
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/zopper-com-interview-experience/
Round 1:
Some Programming Questions were asked, write code for each.
1. SQL: Find Average salary of male employees, whose salary is greater than Female Employees.
2. First Non Repeated Character (With Less time Complexity)
3. Create 2 threads, one print even number other is odd number
4. Anagram Program
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/interview-experience-with-spire-technologies/
1) One Written Test – 8 Problem statement – 1 Hour Time – from Basic to Mid-level difficulty, for
which we have to write the Logic/Algorithms
Some which I remember were good enough are –
i) Given a Folder path in a Directory Structure. E.g. “temp/reg”; you need to find all the files with
extensions “.c” in this folder as well as in the sub-folders.
ii) Finding the Longest Palindrome Sub-String in the given string.
iii) From the given string, print the Alphabets which occur more than once in the string.
iv) Given two Integers A & B, Print the number of bits to be flipped in order to convert ‘A’ to ‘B’.
v) Implement EnQueue() and DeQueue() of Queue DS using Push() and Pop() of Stack DS. Write
Steps and Sequence.
Though I couldn’t clear the 3rd Round, the overall experience was good.
## Remember:-
—————————
>> Please check their Technical Requirement, and revise your concepts of OS(How Process works,
Process Life Cycle, RAM, Virtual Memory, DeadLocks etc.), UNIX(Revise Basic Commands like
‘grep’ etc.).
>> Practice basic Problems like, Searching, Sorting, Fibonacci, Factorial, Recursion, Stack, Queue,
Linked List and their Application.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-194-for-software-support-engineer/
Morgan Stanley Interview | Set 13 (On-
Campus)
I gave the Morgan Stanley aptitude test, here’s my experience.
The test was for 200 marks 90 min duration without any breaks and you can attempt any sections in
any order. The test was conducted on hackerrank.com.
50 marks algorithms, data structures and logical reasoning mcqs. There were 20 mcqs.
The logical reasoning mcqs were based on proving if a statement is correct and deriving relations.
The data structure mcqs consisted of graphs and trees. Questions were like given n leaves and m
internal nodes what is the height of the tree, one on full binary tree height, BFS output for a given
graph.
2. I don’t recall the exact question but here’s how it goes. Given a input such as
I/P
5
Source
http://www.geeksforgeeks.org/morgan-stanley-interview-set-13-on-campus/
F2F:
Round1:
1) Design, develop and implement an elevator problem (only 20 minutes)
Round2:
1) All possible permutations of a string.
http://www.geeksforgeeks.org/write-a-c-program-to-print-all-permutations-of-a-given-string/
Eg :
%95% ( Result : 98769512345,9545654312 etc having 95 sequence anywhere)
(Note : Not to use TRIE)
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/freecharge-interview-experience-for-senior-software-engineer/
[24]7 Innovation Labs Interview Experience
| Set 2
Telephonic Discussion:
1) Basic Java Questions about Strings.
2) Sorting linked list of 0 and 1 and make separate linked list for both (further modified it to make
separate linked lists of alternate elements in linked list)
3) Explain quickSort
First Round:
1) Implement 2 stacks in one array
2) Given a number N count the no of times 6 occurs in the number range between 1-N. [For N = 100
output = 20 {6,16,26,36,46,56,60,61,62,63,64,65,66,67,68,69,76,86,96} 66 has two ‘6’]
Second Round:
1) Print BST in Descending order
2) Find media of BST without traversing it completely, weights of nodes are given.
3) Explain Heapsort
Third Round:
1) Design game for chess
2) Design a meeting scheduling application like outlook
3) Design a DB for Library
Manager Round:
1) Discussion about what my current work is?
2) Why i want to leave my current company?
3) If i had any questions
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/247-innovation-labs-interview-experience-set-2/
Flipkart Interview Experience | Set 31 (For
Fresher)
PROCESS
Test–> Test–> Technical Interview–> Technical Interview.
OWN EXPERIENCE
TEST [ Duration: 90 mins | Questions: 2 ] (ROUND 1)
2 coding questions on Hackerrank platform
Experience
1) A Diamond is present on the nth step. A Boy wants to get it. He can jump either j steps or 1 step at
a time. In how many steps will he get the Diamond(Very Easy)
Given above program you have to print the value of one and zero.
** you can solve it directly by recursion but try doing that for 100
(1https://www.codechef.com/problems/SUMTRIAN
if u have trouble solving the codechef problem then try editorial or search online how to solve it.
Tips
The programs asked in this round are not lengthy, but takes a lot of time to thing, after that debugging
is another issue.
So, choose your language wisely and learn its Standard library
C++ programmers learn how to use STL
practice easy level in hackerrank for few days and later shift to medium and hard
Experience
You are provided with n and m values which denote the rows and columns
2-if he cannot move one point to the right, he rotates right and then takes the path to the right
3-if after performing 4 rotate operations , if he cannot move then he would stop.
sample 1:
33
output : 9
explanation:
the traversal is
129
438
567
Tips
If u look at the problem and test case u feel like it involves a lot of graphs. But you are provided with
only 20 minutes, I cant solve it by approaching the problem that way.
So, I tried few own test cases and the logic is very simple
Don’t look at the problem only one way. Trust your instincts
Experience
Try solving it yourself. (just have to explain on paper and they might ask u to write the sample code
on paper)
Finally, He suggested me to use the sorting technique after the meeting is done.
I explained the interviewer both the questions nicely with time and space complexities.
Tips
geeksforgeeks.org
BLOGS/ARTICLES
Notes | HackerEarth
http://https://www.codechef.com/wiki/recursion-sums-triangle (Read this only after trying the
problem)
VIDEOS TO WATCH
DS and sorting are best explained by Robert Sidgewick in Java (coursera)
WEBSITE TO REFER
https://www.geeksforgeeks.org
GENERAL TIPS/ADVICE
Don’t tell the complexities with out analyzing the problem correctly.
Learn the Syntax of the language perfectly( we should not focus on the syntax when we are working on
problem with time constraints)
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-experience-set-31-for-fresher/
Zoho Interview | Set 5 (On-Campus Drive)
Round 1:
Questions based on aptitude (10) and c program output (20)
Time 2hr.
Round 2:
5 problem given we have to solve at least 3
Program 1:
Help john to find new friends in social network
Input:
3
Mani 3 ram raj guna
Ram 2 kumar Kishore
Mughil 3 praveen Naveen Ramesh
Output:
Raj guna kumar Kishore praveen Naveen Ramesh
Program 2:
Input:
With the starting and ending time of work given find the minimum no of workers needed
Output:
2
Program 3:
Find the union intersection of two list and also find except (remove even elements from list1 and odd
elements from list2)
Input
List 1: 1,3,4,5,6,8,9
List 2: 1, 5,8,9,2
Union: 1, 3,4,5,6,8,9,2
Intersection: 1,5,8,9
Except: 1, 3, 5,9,8,2
Program 4:
Output:
4 1 2
7 5 3
8 9 6
Output:
5 1 2 3
9 10 6 4
13 11 7 8
14 15 16 12
Program 5:
Find the largest possible prime number with given no
Input
5
4691
Output:
9461
Round 3:
For one batch of people
Basic programs like pattern printing
1
22
333
4444
And
1
24
357
6 8 10 12
Round 4:
Tech hr: Topics revolved around OOPS and java thread and Ubuntu commands.
Round 5:
General hr: As usual stuffs like personal info and about projects and why zoho?
Good luck friends
Thanks for geeks for geeks team it helped me a lot.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/zoho-interview-set-5-on-campus-drive/
1. Given some data about computer systems (like RAM, ROM, processor speed, battery, etc). You
need to print the top-k computers based on (i) RAM (ii) If RAM is same then ROM (iii) If ROM is
same then processor speed, etc.
Constraints: k <= 100
(No. of computer systems) n <= 1000000
Solution: Any O(nlogn) sorting would work. But what I did was implement Bubble Sort and ran k-
passes of it. Then printed the last k-elements of the array. It took O(nk) time which was okay since k
<= 100.
2. There is a maze of size n*n. Tom is sitting at (0,0). Jerry is sitting in another cell (the position of
Jerry is input). Then there are k pieces of cheese placed in k different cells (k <= 10). Some cells are
blocked while some are not. Tom can move to 4 cells at any point of time (left, right, up, down one
position). Tom has to collect all the pieces of cheese and then reach to Jerry’s cell. You need to print
the minimum no. of steps required to do so.
1. Given a variation of singly linked list, where every node can have 2 pointers: next and down. You
need to flatten the list into a singly linked list in which every node has only a next pointer. This needs
to be done in-place, so the down pointer of every node should be set to null.
Example:
Solution: I first told him to do it iteratively using stack. He said that its too complex. I then told him to
use recursion, which was about 2 lines of code. He asked me to code it and was completely satisfied.
Remember to cover all the base cases and the corner cases.
2.1. You are given a string. Print the first non-repeating character.
Solution: I asked him the character encoding. He said ASCII. I told him to take an integer array
“count” of size 128 with every element set to 0. Scan the string and for every character ‘c’, do
count[(int)c]++. Then scan the string again and when you find the first character for which
count[(int)c] == 1, print it and break out. If no such character found whose count[(int)c] == 1, that
means no answer (no non-repeating character in the string).
2.2. What if the string is very long. Doing two passes is expensive.
Solution: I would use an array of structure with two elements count and index. When we do
count[(int)c]++, we will also set index[(int)c] = index of c in the string. Now instead of scanning the
string second time, scan the structure array (for i = 0 to 127) and keep a temporary variable,
tempIndex = MAX_INTEGER. When you find count[i] == 1, check if index[i] < tempIndex. If true,
update tempIndex to index[i]. In the end print the character in the string at index = tempIndex. If
tempIndex == MAX_INTEGER, that means no answer (no non-repeating character in the string).
2.3. You are not given a string. You are given some queries of Type 1 and Type 2.
Type 1: Append character (given as input) to the end of the string. The string is initially empty.
Type 2: Print the first non-repeating character in the string that is formed so far.
Solution: Keep on constructing the string for every Type 1 query. That would take O(n) time for every
Type 1 query on a non-mutable string. If we use a mutable data type, like StringBuilder in case of
Java, it would take O(1) time for every Type 1 query.
For Type 2 query, run the algorithm of 2.2 (above). That would take O(n) time for every Type 2 query.
If there are q Type 2 queries, it will take O(nq) time.
2.4. Solve 2.3 (above) in constant time, i.e. for every query (of Type 1 or Type 2) take constant time.
So overall complexity should be O(q) where q = no. of Type 1 queries + no. of Type 2 queries.
Solution: Took a lot of time (around 20 minutes), and tried a lot of stuff before arriving at the below
solution.
Construct a queue using a doubly linked list (singly linked list can also be used with some
modification in the below algorithm, but the interviewer said not to bother).
Construct a hashMap with Key = character, and two values. Value 1: boolean isPresentInQueue,
Value 2: Pointer to a node in linked list.
When you receive a character (in Type 1 Query), check if that character is present in hashMap.
If not present, insert it. Set isPresentInQueue to true. Insert the character to the end of the
queue and keep the pointer (address) of the inserted node in the Value 2 part of the hashMap
(for that particular character). This will take O(1) time.
If the character is present in hashMap and isPresentInQueue is set to true for that character,
set isPresentInQueue to false. Using the pointer (address) in the Value 2 part of the
hashMap (for that particular character), delete the node from the linked list. This will take
O(1) time.
If the character is present in hashMap and isPresentInQueue is false, ignore the character
and move forward. This will take O(1) time.
When you receive a Type 2 Query, just print the front (head) of the linked list. That would be the
answer. This will take O(1) time.
Every query (of both Type 1 and Type 2) is taking constant time. So, overall complexity is O(q) or
O(no. of queries).
Solution: I said I don’t know what external merge sorting is. But I know what merge sorting is, and I
know that external sorting is basically sorting some data that is present in the secondary memory
(because it is too big and can not be brought entirely into the main memory). So, he said now combine
the two. I gave a couple of algorithms, the first one was a naive approach in which I would divide the
entire data into k pieces, bring each piece into memory, sort it, push back to secondary memory and so
on. Then I told something similar to Tournament Trees.
4. Explain the best, average and worst case complexities of all the sorting algorithms that I know. In
which scenarios do they work the best.
Solution: I told him about 8 algorithms, their best, average and worst case complexities, and the
scenarios in which they are useful (for all of them). Believe me, every one of them is useful in some
case or the other. For example, bubble sort is one of the best algorithm to solve the coding question
asked in the first round.
6. Questions about an event (algorithmic coding contest) that I organized in my college’s tech-fest.
General Advice:
They will ask to write syntactically correct code for all your solutions. So, don’t give a very
complex solution (unless necessary).
They will ask time and space complexity of all your solutions. Properly analyze the solutions
before telling the complexity. In case of recursive solutions, write recurrence relations.
Don’t just think in your mind. Think out loud. Tell them everything that is going in your mind.
If you know a problem beforehand, tell them that you have seen it earlier. They are interested in
knowing
how would you solve a new problem and that is your best opportunity to show your thought
process. If you don’t tell them that you know the solution and fool around, they will figure out
and it will be bad for you. Believe me, they will surely figure out that you knew the solution
beforehand.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-experience-set-32-for-sde-1/
D E Shaw Interview Experience | Set 12
(On-Campus)
D.E Shaw & Arcesium (A post trade technical plateform)
1st Round (all question for 1 mark each and .25 negative )
section 1 20 Maths aptitude ( Hard ones time limit 20 mins)
section 2 20 Programming aptitude (average, time limit 20 mins) ( C , C++ , Java )
section 3 One Coding Question. (time limit 20 mins )
It was a simple question. We have given an array containing the location of n magnets placed in a
horizontal line. we needed to locate points where net megnetic field strength is zero.
Round 1 HR
1. Tell me about yourself Hrishikesh.
2. How was the written test ?
3. Have you attended any interview previously? why did they reject you?
4. Do you guess the answer? why?
5. What is your greatest achievement?
6. What do you like the most?
7. What is arcesium ?
8. What do you like about the company?
9. What are your interests?
Round 2 ( Technical-I )
There were 2 interviewers, and it had a time limit of 45 mins but they did interviewing me for more
than 2 hours. Questions were from all subjects of computer science.
1. They discussed the coding question I had in written test. They asked me to suggest better approach.
I suggested one, They asked me to use binary search, then I said it wont improve the efficiency.
2. We have given a link-list containing loop. Find head of loop (I said I know it) .
3. Detailed discussion on poly-way merge sort. How it improves running time for large files.
4. Find exact sum of all the elements in an array in less than O(n). I suggested multithreading
approach. (They asked me to write code) .
5. Extension to above question do it using multiple process. What are differences in threads and
process?
6. What is hash map? What is the difference between hash map and map? how does STL in c++
implements both?
7. detailed discusion on all the steps of compiler till execution of a program.
8. How will you get output of lexical analyser in gcc?
9. What is lex and yacc ? How Yacc has been implemented?
10. Difference between LL parsing and LR parsing.
11. What is linking, loading and binding ?
12. What is selection and projection in DBMS?
13. Implement selection and projection operation for a file (record wise formated) using just one unix
command. ( I said cat filename | grep “/'[^’]+’|[^,]+/” | less )for specified file format.(They liked my
approach and got Impressed by this)
14. How does pipe( | ) works that you used in last answer. How will u implement it in unix?
15. Design your own command shell in unix. That should works for all commands in the system.
16. Implement Google spell-corrector. What data structure will you use and how will it work?
(I suggested first trie but later on made it more efficient by using suffix array data structure. They
asked me to implement all operation of suffix array).(They liked my approach).
Outof 14 candidates 4 got selected for the next round. I was lucky enough to be 1 among them
Although I have forgotten few questions, I’ve tried my best to recall them and include them here.
Round 4 HR
1. What do u like to do apart from coding?
2. Have you ever worked in a team?
3. Do you study alone or in a group?
4. What is your first step if you have got stuck somewhere?
5. Do you ask your friend for help?
6. Do you like to help your friend in study?
7. Will you like to share problems you facing in your project with your manager?
8. What if everything u doing and appreciation for that goes to your teammate?
This site helped me a ton and I hope this article will be helpful for others !
All the Best
Thanks geeks
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/d-e-shaw-interview-experience-set-12-on-campus/
Walmart Labs Interview Experience | Set 2
(On-Campus)
1st round (Written Test)
It was an online test of 90 minutes and was conducted on Hackerearth. It consisted of 10 MCQ’s and
3 coding questions. MCQ’s consisted of general aptitude questions, questions related to networking,
programming etc and very easy.
2. Given arrival and departure time of employees in an office. Find the maximum no of chairs needed
so that at no instance, an employee has to stand. (30 marks question).
Example-
Input-
5.00 6.00 7.00
6.30 7.00 8.00
Output-2
It is similar to this http://www.geeksforgeeks.org/minimum-number-platforms-required-railwaybus-
station/. The main thing in this question was reading the input as number of employees was not given
beforehand. It was also asked to check for all INVALID inputs and return -1 in those cases.
3. Given a 2D matrix of n x m. The matrix contained integers. Given a source position of a person and
a destination position, find the number of ways in which that person can reach destination from source
fulfilling the following conditions-
(i) Movement can be only in north, south, east or west direction.
(ii) A person can move from one cell to other if and only if that cell has value less than the value in
current cell. (standard bfs problem). (25 marks question).
2. Given a character array and a dictionary, find the no. of valid sentences that can be made by putting
space after any character in this array. A valid sentence is the one whose all the words are present in
the dictionary. Write code on paper.
Example-
Input- catsanddog
Output- 2 (cat sand dog & cats and dog)
http://www.geeksforgeeks.org/dynamic-programming-set-32-word-break-problem/
3. Given an array of random integer, find the maximum length of subsequence in it such that the
elements of subsequence are consecutive.
Example- input [25,1,26,2,27,3,29,28]
Ans=5 (subsequence 25,26,27,29,28}
I told her a brute force method of O(n^2) and a O(nlogn) solution but she was looking for a O(n) dp
solution. This round lasted for about 1 hour.
I converted the whole problem into a graph where each node will have connections to its next k-1
nodes and also connection to a node to which a bridge or tunnel on that node leads (if any bridge or
tunnel is there at that node) and then Applied BFS. He then asked me to write code on paper.
Complexity-O(n*k)
2. Given a linked list having loop, detect the loop and return the starting point of that loop.
http://www.geeksforgeeks.org/detect-and-remove-loop-in-a-linked-list/
3. He asked me about what is map (general concept of map not language specific as in c++ or java).
He then told me to design a data structure using the basic data structures such that searching in that can
be done in O(1) in 95% cases and in 5% cases searching can take more than O(1) and the element to
be searched can be an integer or a string.
I told him to take hash of string in any way (multiplying by prime nos etc.) and then take modulo 10^6
as maximum size of array can be 10^6. He then asked me how will I remove collisions occurring due
to same hash value. I told him to use chaining with a balanced BST at the collision index in order to
achieve minimum complexity (o(logn)). He then asked me that if suppose during 1 year only 100
elements were required to be stored in array and searched in above problem and after 1 year
elements become 10^6, then during 1 year a lot of memory will be wasted if I allocate 10^6 initially;
he asked me how would I do this. I told him that initially allocate memory of array of 100 size and
then after 1 year, allocate a new memory of 10^6 elements and copy elements from original array to
new array. This round lasted for about 1 hour.
Advice:
Prepare all the data structures from geeksforgeeks, maximum question asked were from geeks only.
Think aloud in the interview. The interviewer will help by giving hints whenever u will be stuck at
any problem.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/walmart-labs-interview-experience-set-2-on-campus/
Intuit Interview Experience | Set 8 (On-
Campus for Internship)
Intuit, Inc. visited our campus for recruiting interns over the Summer. There was a CGPA cut-off for
writing the written test followed by 2 F2F interviews for the shortlisted students.
Round 1
1. A lady buys goods worth Rs 200 from a shop, whose shopkeeper is selling the goods with zero
profit. The lady gives him a Rs 1000 note. The shopkeeper gets the change from the next shop, keeps
Rs 200 for himself, and returns Rs 800 to the lady. Later the shopkeeper of the next shop comes with
the Rs 1000 note saying “duplicate” and takes his money back. How much loss did the shopkeeper
take?
4. 8 balls ->7 same weight but 1 is heavy. 2 tries to weight on weight scale. Find heavier ball.
Round 2
1. Median of two sorted arrays
2. String array of words given. Least possible steps from one word to another.
Intuit, Inc. is an amazing company and you will surely learn a lot during your internship.
Source
http://www.geeksforgeeks.org/intuit-interview-experience-set-8-on-campus-for-internship/
Amazon Interview Experience | 195 (On-
Campus For SDE-1)
20 mcqs – OS, Apti, Puzzles, C, DSA
2 coding –
1. Merge intervals given in array
2. Variation of josephus problem with k=2
Interview round 1
1. Find Largest Sub-Matrix With All 1s (Not Necessarily Square)
2. Search element in a sorted rotated array in only one (logn).
Interview Round 2
1. Delete half nodes from binary tree
2. kth largest element in large array
3. All strings possible from a no. for example 26, Ans – “B”,”Z”,”BF”
4. Implement a stack with push(), pop() and min() in O(1) time, using Class concept.
Tips –
Only Hardwork and practice helps. And of course your luck on interview day
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-195-on-campus-for-sde-1/
Amazon Interview Experience | 196 (On-
Campus)
20 mcqs – OS, Apti, Puzzles, C, DSA
2 coding –
1. Merge intervals given in array
2. Variation of josephus problem with k=2
Interview Round 1:
A detailed discussion on my summer intern project . Questions testing the knowledge of N/W layer. I
was asked to explain all the layers of TCP/IP model using the analogy of post office.
Interview Round 2
1. Discussion of previous round interview questions.
2. Merge two BSTs(examine all cover cases)
3. Search in a rotated and sorted array.
4. Find maximum distance between two leaves in a BT.
Tips –
Only Hard work and Practice helps.Please be thorough with the OS,DBMS,N/W.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/amazon-interview-experience-196-on-campus/
2. Given a set of length of N sticks, a cut operation is performed such that each rod is cut by the
minimum in that set in every step. Repeat the same till no rods are left and output the number of rods
cut in each step.
https://www.hackerrank.com/challenges/cut-the-sticks
This round was for 1.5 hours and overall 25 were short listed for interviews.
1. Given the pre-order and post-order traversals of binary tree, write a code to construct the tree.
2. Code to reverse a linked list in all approaches you can think of( recursion, iterative, stack etc)
3. Code of reverse a linked list in groups of given size ‘k’, say if k=3 reverse every 3 nodes.
1. Find the second largest element in an array, I said heap sort (maintain a min heap) so I was asked
to write a code for heap sort.
2. In an n*n 2d matrix, starting from the very first element i.e array[0][0] , the only possible ways to
move is directly to the element below it or diagonally right of the element. Also as we move, keep
adding the elements in the path. Give an approach to reach the last level in the matrix with minimum
sum.
Ex : 1 2 3 4
23 45 1000 10
12 8 990 78
Always start at 1, can go either to 23 or 45. If 23, then sum till then would be 24 else 46 and so on.
3. Given a binary tree, find the maximum sum between any two leaf nodes (of course leaf nodes not
given) i.e the maximum sum of the nodes in path between the two leaf nodes (including the leaf
nodes).
Note : The leaf nodes can be such that they may belong to the same subtree, or different.
4. Given an array of elements which is unsorted and a sum ‘k’, find if a subsequence exists such that
the sum of the elements in the subsequence add to the sum ‘k’. O(n) solution was expected.
1. Design any category under the ‘Book My Show’ application. So I chose movies, was asked to draw
a data model to represent all entities and relationships between them, also to bring it to a normalized
form. Few more specifications and requirements were added, so had to design to handle those.
2. Questions like Why Myntra, my strengths, weaknesses, area of interest, what made me take
Computer Science and Engineering.
Few questions related to my Internship projects were asked – difference between C and C# mainly in
terms of executable files etc.
HR Round
This was a casual friendly talk with same set of questions like Why Engineering, How do you see
yourself in the next 5 years and so on.
I would like to give credits of my success to GeeksForGeeks for its wonderful collection of
questions.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/myntra-interview-experience-set-6-on-campus-for-software-engineer/
Amazon Interview Experience | 197 (On-
Campus for Internship)
Hi folks, Amazon recently visited our campus hiring for SDE. They are usually the first or second
company to visit our campus, but this time, they came in much later, which gave me lots of time to
prepare (by prepare I mean go through g4g)
I had great fun preparing for the Amazon visit, and really enjoyed myself through the interview
process. The process spanned across two days, and was definitely among the most comprehensive
interview sets one could ever have. The interviewers were really chill and I really felt really
comfortable throughout the interview.
20 apti questions from C/C++/Java outputs, OS, DS, Algorithms, Time and speed, mixtures, etc.:-
As long as you are able to solve the coding questions you should be fine.
Q1) Given a set of time intervals in any order, merge all overlapping intervals into one and output the
result which should have only mutually exclusive intervals. Let the intervals be represented as pairs
of integers for simplicity.
The use of IDEs were disallowed, so be comfortable with coding on the HackerRank editor. The
error reports there are a little difficult to comprehend, and so make sure you are comfortable with
that.
1) Find the largest rectangular area possible in a given histogram where the largest rectangle can be
made of a number of contiguous bars. For simplicity, assume that all bars have same width and the
width is 1 unit.
They wanted a solution better than n^2
A lot of my friends who came up with efficient algos didn’t make it through this round, as I believe
they didn’t get noticed enough
Amazon’s hiring policy was to rather miss out a good candidate than hire a bad one, which was
evident here. Around 20 people made it through this round (They also considered the previous round
score (to an extent) for this round)
Given a 2D array, find the maximum sum sub-matrix in it, also display it.
Working code was required, which was then tested with a couple of inputs, so there is no getting
away.
Then he gave me a couple of question on trees, one of them was finding the vertical sum of nodes,
given a tree, and working code for the same.
Questions on database management systems, and some other technical questions from my projects.
Then it was my turn to ask him questions. He really liked the questions I asked him.
F2F 3: Advanced Data structures and algorithms round. (~1 hour 30 mins)
This was easily the most enjoyable interviews I have ever had for a variety of reasons.
1) The first question was, “What are trees?” I said, “When people think of trees, they only conceive
of binary trees, but trees can have more than 2 children… and so on”
So then he tells me that all his questions were going to from whatever hints I give him from my
answers to his previous questions.
So the next half an hour was spent on n-ary trees.
2) Some question, which reduced to finding the smallest element in a sorted-rotated array.
Code for the same, along with all corner cases. Make sure you write all the corner cases, in your first
attempt itself.
3) Examples where trees are used in Real life, and in computers. This was a very lively discussion.
He didn’t accept “Family trees” as an answer, claiming that families these days do not follow tree
structures any more.
5) Given three strings A, B and C. Write a function that checks whether C is an interleaving of A and
B. C is said to be interleaving A and B, if it contains all characters of A and B and order of all
characters in individual strings is preserved.
6) So, after all that, He wanted an ELI5 (explain like how you would to a kid) version for all my
projects, and the technology stacks I had used for them.
This meant that whatever answer I gave was ‘too complicated’ for him, and I had to simplify it,
without using synonyms of “Somehow”. Again, super fun.
Then gave a solution by cloning and checking the strings as and when necessary, he wanted a better
approach, and gave me quite a bit of time.
After this, it was my turn to ask him questions. Again, a bunch of questions, to which I got some really
great answers.
And finally, we concluded the interview with a nice talk about Snooker, and how the Chennai centre
Other than the telephonic conversation, we also used an online collaborator, which let him see what
ever code I wrote on my laptop.
We started with a bit of introductions, (turned out that, we were from the same school), and general
introductions, “Tell me about yourself”.
He didn’t have a copy of my resume, and he wanted me to make sure that didn’t affect anything.
Lots of questions, like “Give me an instance where you and your teammate had a disagreement during
a project, and how you resolved it”
“Give me a place where you showed some leadership quality to resolve conflicts”, many other
similar questions.
1) Given a huge array which is stored across 100 computers, with no way to bring them all together,
find the median of the above array.
I had already seen the problem with 2 instead of 100, and when I told him the answer immediately, it
was evident, and so we moved on to the next question.
2) Given a chess board, and a starting position, and a set number of moves, find the probability that
the knight will remain on the board after the moves are done.
Handle all the corner cases, like when if during the first move, the knight goes outside the board, that
traversal ends there.
I had to code the entire thing, on the collaborator, and by habit I kept pressing ctrl+s, and hence, it
kept disconnecting. *facepalm*
He was in a real hurry, but he still made sure he answered all the questions I had for him.
But he was not too satisfied my solution, and gave me time to improve and said he’d come back in 5
General tips:
a) What makes Amazon any more customer centric than the other similar e-commerce websites?
b) How do programmers contribute to how the customer actually feels about the company? because
coders do after all only implement what their managers tell them.
c) Given that this is such a tough interview, how many of such tough questions do you actually see in
production?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-197-on-campus-for-internship/
Amazon Interview Experience | 198 (For
SDE1)
I have recently attended an interview with Amazon Hyderabad, for SDE-I position. All 4 rounds are
conducted by different people from different teams.
1st Round:
1. What are the traversals required to serialize and deserialize a binary tree?
And what about for BST?
Given InOrder and Post Order of a binary tree, construct the original tree back. Write the code.
2. From a large stream of integers coming continuously, Find the k smallest elements always at any
particular time?
2nd Round:
1. Given a set of strings. We are required to merge all these strings into a single string.
You are given with a merge(str1, str2) function, whose cost is sum of lengths of the strings passed.
How can you merge the strings, by making the cost as low as possible?
Solution:
Initially sort the strings in ascending order wrt their lengths. Now take out the first two strings and
concatenate them.
Keep the resultant string in the sorted strings, wrt its length.
For eg:
input array: 5 x 6
1, 2, 3, 4, 5, 6
7, 8, 9, 10, 11, 12
13, 14, 15, 16, 17, 18
19, 20, 21, 22, 23, 24
25, 26, 27, 28, 29, 30
submatrix positions:
(3, 4), (4, 5)
which is
16, 17
22, 23
o/p is: 78
Solution: Since there will be multiple submatrix will be given for your, its not optimum to go element
by element for each submatrix. Do some pre-processing, like build another matrix same size as input
matrix, which will contain sum of its sub matrix. This way we can calculate the sum in O(1) time.
For the above example, the sum matrix is:
3rd Round:
2. There is a stream of integers coming. At any particular point of time, you are required to give the
first non-repeated element from it.
For eg: 2, 3, 1, 2, 1, 3, 5
o/p: If I ask you at 2nd position(after 3), the answer is: 2
If I ask you at 5th position(after 1), the answer is: 3
If I ask you at 6th position(after 3), the answer is: “No such element”
If I ask you at 7th position(after 5), the answer is: 5
Solution:
Manager Round:
1. Google crawler question.
Given a set of N documents.
Given k strings: {str_1, str_2, …, str_k)
Now return the document numbers, which contains all the k strings.
i/p:
1
/ / | \ \
2 3 4 5 6
/ / |
7 8 9
o/p:
1
/ / | \ \
6 5 4 3 2
/ | \
9 8 7
I haven’t done well in last two rounds. So I got rejected. But it was a nice experience altogether.
Thanks to geeksforgeeks for hell lot of questions. It takes at least a life time to prepare all the
questions present in geeks for geeks, if we go by one question per day. Thanks.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-198-for-sde1/
Xome interview experience for software
developer
Round-1:(1:15 min)
Basic questions on runtime polymorphism and static polymorphism
Multiple inheritance in java how can we implement using interfaces.
Connect all the nodes that are at the same level.
Implement stack such that middle element must be implement in constant time.
return a int value(0, 1) denoting the user has watched the entire video or not.
Round-3:(1:15min)
Removing duplicates in a given sorted array
Removing all nodes in a given bst.
Group reversal in a linked list.
Round-4(1:15min)
How can we sum at each level ..discussed on various of dfs and bfs approaches
Round-5(1:05min)
Given a binary tree..and node value.print the nearest leaf node for the node with given key.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/xome-interview-experience-for-software-developer/
Microsoft Interview Experience | Set 58
(For Software Engineer)
Microsoft Interview for Software Engineer Hyderabad.
Round 1: (1 hr)
1. Given 3 sorted arrays. Find the common element of all the arrays in O(N) time and no extra space.
If there is none, return false.
2. Double linked list: 1 goes to the next node and 1 to the random node. Copy this list. Extra space
can be used.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-58-for-software-engineer/
Round 1 –
1) 25 Horses puzzle where you to find top 5 horses. Answer : 8
2) Two sand timers which measure 11,7 minutes.You have to measure 15min using those.
3) Given 4 pairs of socks one of each yellow,blue,black,green.You have arrange them in such a way
that there are 4 socks in between yellow socks ,3 in between the blue socks,2 in between the black
and 1 in between the green socks.
4) Given weighing scale.Find defective ball out of 27 balls in minimum number of comparisons.You
will also have to tell whether defective ball is lighter or heavier.
5) 100 floors – 2 eggs puzzle.
6) 2 ropes which can be burnt in 20min each.Have to measure 15min using those.
Round 2 –
Talked about resume,projects.
1) Reverse a string,number.
2) Reverse number using recursion.
3) Coin change – DP
4) Given a string count all different palindrome strings possible of any length and from each and
every permutation of given string. Ex: Given TACKLE – all palindrome strings of length 1,2,3… from
TACKLE , ACKLET, CKEATL ,ETALKC etc.
5) A 3×3 matrix with all distinct integers 1-9. How many combinations of matrix such that 3 digit
number in first row when multiplied by 2 represents number in row 2 and when multiplied by 3
represents number in row 3.
6) Repeating elements in a integer array.
7) Left view of a tree.
8) Given a sudoku (a 9×9 matrix) .In single iteration you will to tell if it is solved or not.
9) Data Structure used for implementation of dictionary.
10) Given 2 dates.have to find number of days between them.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/oracle-interview-set-12-on-campus-for-application-dev-profile/
Category: Interview Experiences Tags: Oracle
Microsoft Interview Experience | Set 59
(On-Campus)
Microsoft came to our campus. Branches eligible was CS and IT. There were a total of 5 rounds (and
1 additional group fly round).
I was able to solve 8-9 mcq’s. Luckily I managed to qualify this round .
2nd question:
You are provided with a binary tree and given two integers n and k.You have to determine sum of data
of all the nodes which are at a distance of k from the node which has data n.
I managed to solve question no. 2 completely and in question no. 1 segmentation fault came.
3. Real life situation -suppose you have developed a software and you have delievered it to some of
your client .If your client is facing some problem with the software then how will you solve the
issue.Discussion on it.
4. Given 1 billion numbers.Find the median of these numbers -i gave min & max heap soln ,O(n)
median finding algorithm soln. Then he asked me to explain the median finding algo to a layman .I
gave sorting soln.
5. One simple SQL query- given a table containing employee id,manager id,city and employee
name.The manager himself is an employee who has an entry in the table. You have to print the details
of the employee whose managers city is same as his city .
6. Given a string .Find the maximum palindrome substring in the given string. I told him I have 3 solns
for it -dp soln,find longest palindrome at every index soln,using suffix tree.He asked me to explain dp
soln and to tell him best and worst case for it ?
7. Questions on why I used free() to free a memory allocated via malloc- questions related to garbage
collection, single and double pointer,pointer as reference and pointer by value etc.
8. Then he asked a riddle-given three opaque containers and you have 3 labels on them.1 has label
“mangoes” 2nd has label “Apple” and 3rd has label “Mango+Apple”. You are told that every label is
wrong. You can open any container from top and can see content inside it by not every item-means if
you open container having apple+mango in actual you may see only apple or mango or both.So which
box you will open to correct all the labels.You can open only 1 container from the top and see its
content.
9.Discussion related to my project-I have made a rail reservation system using HTML+php+CSS .So
he asked what is in your project so that visitors will visit your site instead of Indian Railways
site.Discussion related to it.
-I gave all the answers in this round :).
3. Given a number as input .Write a function which prints the number in string format .Ex-1234 will
be written as “one thousand two hundred thirty four”. I gave a hardcoded solution. He asked me if I
can reduce the program length to 1/3rd. I told him that I can use a function to reduce the solution
length. He didn’t try to find bug in my solution. So he was ok with the solution of mine.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-59-on-campus/
Amazon Interview Experience | Set 198
(On-Campus for Internship)
Hello friends, Amazon recently visited our campus hiring for SDE. They are usually the first or
second company to visit our campus, which gives little time for preparation. so better prepare
yourself in summer vacations (read g4g).
I had great fun preparing for the Amazon, and really enjoyed myself through the interview process.
The process spanned across two days. The interviewers were really nice and I really felt really
comfortable throughout the interview process.
Q2) Given a matrix of NxM, consisting of alphanumeric characters, print the matrix spirally.
http://www.geeksforgeeks.org/print-a-given-matrix-in-spiral-form/
After this round around 30 students were selected from 250 students.
Q3) We are given the preoder traversal of a BST, we need to create the BST using the given
traversal.
But we can’t use inorder traversal(i.e. sort the elements and use the array.)
and also we need to create the BST in single traversal of the preorder list.
Q4) We need to reverse a Linked List using single pointer. (in other words : recurrsively)
He asked me to write the code for reversal.
After this round some students were selected for second round of the interview process.
Luckily i was among them.
Q2) Given a sorted array, we need to find that element whose value is equal to that of its index value.
He asked me to do it in log(N) time complexity.
Q3) Given a tree, now the given tree is special as in this tree all node has only 1 pointer which points
to its parent.
Now, in this tree we are given any 2 nodes, and we need to find their lowest common ancestor(LCA).
Hint: This question is similar to intersection of 2 linked lists.
Thanks to geeksforgeeks
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-198-on-campus-for-internship/
Amazon Interview Experience | Set 199
(On-Campus for Internship)
Recently, Amazon visited our campus. Here is my Interview Experience:
Online Round: (Duration – 90 minutes)
20 MCQs and 2 coding questions. MCQs were on Algorithms, Time Complexity, Quantitative
Aptitude, Probability, Operating Systems, Graphs, Data Structures, Recursion outputs etc.
Coding Questions:
1. In one of Amazon fulfilment centres, there are a no. of empty boxes kept in increasing order in a
row. Kiva robots are designed to put a product in a box. The product size is given. Design a program
to find the best fit box for given product size. First line contains no. of empty boxes and next line
contains size of boxes with space. The next line contains size of given product. The output shows the
best fit box size and -1 otherwise.
2. Given a binary tree, find the longest path in the tree. If there are two longest paths print the
lexicographically first path.
EXAMPLE:
OUTPUT: D E B A F G
Example:
Input: 8 7 6 7 6 5 4 3 2 3 4 3 search element: 3
Output: 7
Example:
Input: madam Output: true
3. It was a scenario question based on facebook. I have to find all the mutual friends of my friends
and my friends of friends of friends. This list returned should be in a sorted order. To perform the
above action u are given a getfriend() function which will return the list of friends for that id.
Hint: use hashing
ROUND 4: (F2F)
1. It is a graph question. A 2D graph with x and y coordinates. Given millions of points in a graph,
find the k nearest point to the origin.
Hint: use heap ( I used a priority queue )
2. Given a binary tree, a node in the tree and a distance k. Print all the nodes at a distance k from the
given node in the tree.
Example:
Input:
given node – F
K=2
Output: A E J K L
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-199-on-campus-for-internship/
Adobe Interview Experience | Set 21 for
Software Engineer (Fresher)
Adobe Interview Experience for Software engineer (Testing profile, Fresher)
1st F2F:
Interviewer was so friendly that as i was a bit nervous in the starting he took me to the cafe, and had a
cup of tea with me and showed my his previous seat loactions when he joined Adobe. Then the
interview began, asked me in which language i am comfortable(tell only those you know coz they ask
only from them) . i told i can code in C, and clear with concepts of Java.
Questions:
How java is platform independent?
He told me that if he mails me an excel file and when i try to open it, it doesnt open. asked me all the
possible reason to it.? (gave me lot of time to think, basically he was checking how much i can think
on it)
He then told me that if he makes a new web browser and asks me to test it, what all thinks i would
test. (again gave me a lot of time to think and tell him as many as i can)
Then WAP to convery binary no to Decimal no.
Then WAP, given a file, find the line in the file which has maximum charactes and print it.
2nd F2F:
Started with my intro, as i had done internship in my final sem so i told this in my intro , so he asked
me to explain what all i did in the internship.
Asked me given an array , find the element before which all the elements are smaller than it, and after
which all are greater then it. Asked me approach, didnt want the code.
Final Director Round:
Started with my intro.
Discussed my final year project, asked me if it is live as i had made an e-commerce website. so i told
him the link , and then he asked me to prove that the website is made by me only, it is not someone
else website that i am showing so i showed him the admin panel and he believed it was made my me
only.
Then he asked few questions
What is virtual memory?
What is SaaS?
What is Memory Leakage?
What is cloud?
then he also gave me a testing related question. to which i had to think and give all the possible cases
i would test.
Basically think vast, think for all the possible cases, take your time, language is not a barrier, Hindi is
permitted.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-experience-set-21-for-software-engineer-fresher/
Epic Systems Interview Experience - Off
Campus
Applied for Epic Systems offshore(Madison, Wisconsin) in December 2014, got the call on 6th
January.
Applied through their career option on their website, IIIT tag will help you get the call.
At the allotted time, I logged in the link given by them and the initial setup took around 30-40 minutes.
This includes verifying the identity, verifying the surroundings where I am giving the exam, they
monitored me through the cam and I was not allowed to even change the tab.
It was somewhat comprehension paragraph kind of section. A new language was designed and rules
were written for this new language, according to these rules MCQ type of questions were asked.
14 questions
You will be given 2 minutes and 10 questions have to be answered. You have to do as much as you
can. These questions span from Normal Mathematics to Logical Reasoning. I did 6/10.
Part 4 : Coding Section(Untimed)
It comprises of 4 questions that need to be solved. These are standard programming questions with a
twist that there’s no Judge, i.e. there won’t be any test cases for you to test the validity of your
solution, you can’t compile/run your code and of course as I mentioned earlier you can’t use your
terminal(you have to code in their text area only, this is kind of annoying). But you can write pseudo
codes as well instead of actual codes. They will judge how well you can construct algorithms. They
don’t judge you on correctness of the program but how you divide and structure your code. Having
said that, your code needs to be genuine, i.e. plain structured code which is incorrect won’t let you
anywhere, so be judgemental about it. I remember ¾ questions that were asked to me, these were :
1. You will be given a string, containing both uppercase and lowercase alphabets(numbers are not
allowed). You have to print all permutations of string with the added constraint that you can’t
change the uppercase alphabets positions.
2. There is a n * n square board, there’s a new kind of game which is played on this board. there
are pieces on the board which can only move horizontal and vertical any number of squares until
it encounters an opponent piece, when it does so, it replaces the opponent piece at that position
and the turn alternates. The input will contain a n * n matrix with 1,2 and 0 in the cells. ‘1’
denotes your pieces, ‘2’ denotes opponent pieces, and ‘0’ denotes free space. One of your pieces
has fallen from the board and neither you nor your opponent remember its original position, so
you collectively decide that you can place it anywhere you want to, so its upto you to place it at
a position where you can maximize the number of opponent pieces you can cut. Output the x and
y coordinates of such position. If multiple positions exists, output anyone.
3. You have to print all possible combinations of phone numbers. The length of the number will be
given. Also 3 digits will be given, which can not be used. No two consecutive digits can be
same. A number containing 4 would always have 4 in the beginning.
1. Suppose all months have 30 days. There are 12 months in a year. February would have 31 days in a
Leap year. condition for leap year is defined as (year%40==0) is leap, (year%200==0) is not leap,
(year%1000==0) is leap. Given a date as MM/DD/YYYY, find the next Leap Day.
3. Given a number, get all possible substrings using the digits of this number and if the product of
digits in one subset is same with the another, then return false, else return true.
On the interview day(23rd February), they called at the precise time, so the interview started with
normal questions like How to get the nth node from the end in a Linked List, etc. They asked very
normal algorithmic questions. After these, he asked me one project to discuss. I discussed the Search
Engine. The discussion spanned from Algorithms used from first phase to the last phase and all the
technologies involved. Discussed about the future improvements for the project and in between he
kept asking questions related to the project.
PS : Before applying I would suggest you to read about Epic Systems work environment and the
technologies they use on quora, it will help you take decision in case you get selected.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/epic-systems-interview-experience-off-campus/
D E Shaw Interview Experience | Set 13
(On-Campus)
1st Round (On Paper)
(+ 4 mark for each correct and – 1 for wrong ans)
2. Given a 2-D matrix of 0,1 in such a way that each row has 1’s in beginning and then all 0’s.
1 1 1 1 0 0 0
1 1 0 0 0 0 0
1 1 1 1 1 0 0
1 1 1 0 0 0 0
He asked me to write a code to find the row with maximum number of 1’s.
3. Difference b/w TCP and UDP. Where is UDP used ?
4. Which is Layer-2 in OSI Model and it’s functionality.
5. What is the functioning of Switch.
6. Difference b/w port and socket.
7. Basics of Socket Programming.
8. Difference b/w process and thread. He gave a scenario and asked what to use process or thread in
that scenario.
9. Congestion Control in TCP.
10. Puzzle – 2 player game, each one can choose any value between 1-10. Value of each turn of both
players will be summed. When sum reaches 50 that player wins. He asked me to make a strategy for
player A to win.
11. Difference between const int *p and int const *p.
8 students were selected for final round of interview.
0 0 0 0 0 0 0 0
0 0 1 0 0 0 1 0
0 1 1 0 0 0 1 0
0 0 0 0 1 0 1 0
0 0 0 0 0 0 0 0
Write a code to count Number of islands. Islands can be of any random shape. Any two adjacent 1’s
(in any of 8 directions) are part of same island.
12. He asked my ranks on Codechef , Codeforces , Spoj etc.
GeeksforGeeks helped me a lot in my placement session. Practice all GeeksQuiz questions and read
all interview experiences on geeks at least once.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/d-e-shaw-interview-experience-set-13-on-campus/
Amazon Interview Experience | Set 200
Aptitude Round: (1:30 hours)
19 MCQs
Easy MCQs on trees, semaphores, deadlocks and algorithms. Few output questions on pointers.
2 Coding questions:
Interview:
Round 1:
Given a no, find next no greater than n and having same digits.I was supposed to write a working
code for this on paper.
There is a robot that is initially at origin. A robot have three operations, he can either turn left or
turn right, or he can move one unit ahead in the direction he is facing.
Given a string containing L (turn left), R (turn right), G (move one unit ahead).Find if the robot
again reaches the point he has been before (find a loop).
Example: LGRGRGG
Initial co-ordinate is (0, 0), it turns left and moves one unit, updated coordinates (-1,0).
Then turns right and moves one unit, updated coordinates (-1, 1).Then turns right and moves two
unit (two ‘G’s). Updated coordinates are (1, 1).
Round 2:
Given an 2-D array, implement an hash map which when given (key, value), insert and retrieve
value in O(1). Also implement one more functionality that gives me all the keys for
corresponding value in O(n).
Given a graph whose vertex can have only two value, either 0 or 1. Find no of distinct clustered
ones (island) in the graph. Write a working code for this on paper.
Black nodes – 1 marked vertices.
Ans = 2.
Round 3:
Output: 1 2 3 4 5 8
Given a table that has amount has its column and an integer n, write a query that give nth largest
amount value in the table.
What are the differences between child processes and threads? Explain virtual memory, paging
concept, page replacement algorithms. Design a data structure for working set algorithm.
Round 4:
Important tips:
Have a loud thinking, the interviewer helps you if you get struck.
Don’t do silly mistakes while writing code, take your time but have a neat, optimized code.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-200/
Amazon Interview Experience | Set 201
(On-Campus for SDE-1)
Aptitude Round: (1:30 hours)
20 MCQs
MCQs on processes, maths aptitude, and algorithms etc . Few output questions on pointers.
Given 2 strings, check if any one of them has any anagram of the other string, as a substring of it.
Graph question : ( not mentioned directly as graph, but was implied). basically Needed to find
the shortest path between two given vertices in the graph.
Interview:
Round 1:
Round 2:
Given an array of Integers, find the Maximum length subarray with sum equal to zero. Solved by
constructing Prefix sum array for the given array. In prefix sum array, any number repeating more
than once, implies subarray between those indices is 0, so store length of this subarray, check for
other repeated values too. ( careful coding required to eliminate bugs) Additionally had used a
HashMap(java) to do this solution time efficiently. {code it}
Return largest BST from a BT ( geeks question) {code it}
Round 3:
Tell me About your Internship project. ( It dealt with Performance bench-marking for embedded
Systems ( SoC) with respect to latency and bandwidth done at Samsung R&D B’lore).
Given a 2-D matrix of zeroes and ones, any row/column containing a single 1 is made
completely 1. ( available on geeks) I told him I know the space and time optimized solution to it
( as provided by geeks). Asked me to code it… had some bugs, took some time to debug a
particular corner case.{code it}
He Modified above question, providing conditions -> if there are no limitations on the space
used, and if accessing each cell has a cost attached to it, how would you do the same problem in
least cost.
Given a tree with three pointers in every node, left, right and next, connect all the nodes at the
same level in a spiral fashion. eg root’s next points to right child which in turn points to roots
left child which in turn points to level 2’s 1st left child … and so on… any node could have 0,1
or 2 children.( geeks)
Round 4:
Given the function : int func( int n) { if(n==1) return 1; return n* func(n-1)*func(n-2) + func(n-
1)*func(n-2) + func(n-1); } // What is its space complexity.
Given a in-coming stream of numbers ( either 0, 1 or 2), Design a Finite state machine which
tells me if the number formed by the input stream so far, is divisible by 3. eg stream state is
“012” return true, coz 12 is divisible by 3.. for “0111” return false… { Design the FSM }
Proposition logic question with 5 statements given, determine their truth. ( Solved using common
sense, but wanted me to prove it mathematically )
Given an int represented in Big Endian form, convert into into Little Endian, where the number
of bytes taken up by int is not provided. Ex: if int is of 4 bytes and input integer n= A B C D , =>
o/p = D C B A => n2 … where the alphabets represent a byte. return n2. Involved Bit
manipulation. { Code it}
The one thing you regret from the past 3 years in college.
Round 5:
Introduce yourself.
Given an n-ary tree, traverse it in level order, printing a particular element in each level( that
particular number is returned by function “func1(int level)”. Gave an O(N) time and O(N) space
complex solution, followed by an O(N) time and O(1) space complex solution. {code it}
Advantages/Disadvantages of a static variable inside a class in java.
Performance implications of the static variable inside a function in C.
Tips:
Have a loud thinking, the interviewer helps you if you get struck. Ask ALOT of questions. At
least he will know what you are thinking or where you are going wrong at.
Write neat code,”take your time …..as much as you like”.
Make sure the interviewer has approved the algorithm before you start coding. Discuss full
algorithm before you code. He may ask you to think in a more optimized manner.
Study “geeksforgeeks.org” well, especially the tree sections, and dont mug up the code, its no
use, you will not remember when needed, instead, understand why every minute detail of the
code. This will take u further.
Study basics of every computer related subject taught in class. No need to be experts, but having
an idea helps.
Mostly it is about data structures and algorithms. Make sure you are comfortable with them.
Side note: Help others and just do good. Neither hard work nor luck pays. Its all about your
destiny. Dont get worked up about these things. Life has more purpose.
“Karmaane vadhi karaste ma faleshu kadhachanam..” – Gita
above line means “Keep doing good deeds, dont expect rewards..”
Above line means, “When comes the help of Allah, Victory is near”
Best of luck
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-201-on-campus-for-sde-1/
D E Shaw Interview Experience | Set 14
(On-Campus)
Ist round consisted of 3 sections–>
Aptitude(30 mins)—> WAS A TOUGH NUT TO CRACK GIVEN THE TIME CONSTRAINTS.
Technical Aptitude(30 mins)
one coding question(20 mins).
Finally they selected 2 out of 3 and I was the one not selected.
Tips –
Only Hard work and Practice helps.Please be thorough with the OS,DBMS,N/W.
?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/d-e-shaw-interview-experience-set-14-on-campus/
General apti:
1) Egg-drop problem
Answer:14
3)There are 50 trucks each one with fuel capacity 50 kms.We can transfer fuel form one truck to
another truck.What is the maximum distance that a truck can travel?
4)There is a 4*4 matrix with all 0’s initially.If we flip any coin all the surrounding coins are also gets
flipped(not diagonal ones).Minimum operations needed so that all 0’s becomes 1’s.
Answer: 4
0000 0000 0000 0001 1111
0000 1000 1000 1011 1111
0000 1100 1110 1111 1111
0000 1000 1111 1111 1111
6) There are 2 points A and B in a river which is flowing at 5kmph.Distance between A and B is 300
kms.Two boats with speed 10 kmph and 15 kmph (in still water) start at A and B respectively.when
will the boats meet first time and second time?
7) A ball was dropped from a height of 8m.Each time ball bounces back half of the height from which
it is fallen.Find out the total distance traveled by the ball.
8) one question with tank filling with pipes a,b,c
9)In a chess tournament there are x men and 4 women.Each one plays match with every other
one.matches between only men exceeds matches with one mem and one women by 18.find out the
total number of matches played.
10)There are total 60 students in a class.3 subjects maths ,physics and chemistry are there.those who
studies maths also studies physics.Chemistry student donot studies maths.If there are 16 students who
studies both physics and chemistry ,what is the minimum and maximum no. of students whos tudies
only chemistry?
Technical apti:
3 questions on os
1) Increasing the RAM of a computer typically improves performance because:
(a) Virtual memory increases
(b) Larger RAMs are faster
(c) Fewer page faults occur
(d) Fewer segmentation faults occur
Answer (c)
2) Given 10 processes with their arrival time and burst time.What will be average waiting time if we
apply SJF scheduling?
3) There are 3 processes p1,p2,p3.There are 2 resources r1,r2.both r1,r2 has 3 instances.p1,p2,p3
needs [2,2] resources I.e, 2 instances of r1,2 instances of r2.
In which case deadlock is possible.
4 options are given.we have to check each option whether deadlock is possible or not.
4) Let S be a stack of size n >= 1. Starting with the empty stack, suppose we push the first n natural
numbers in sequence, and then perform n pop operations. Assume that Push and Pop operation take X
seconds each, and Y seconds elapse between the end of one such stack operation and the start of the
next operation. For m >= 1, define the stack-life of m as the time elapsed from the end of Push(m) to
the start of the pop operation that removes m from S. The average stack-life of an element of this stack
is (GATE CS 2003)
a) n(X+ Y)
b) 3Y + 2X
c) n(X + Y)-X
d) Y + 2X
Answer(c)
int f(int n)
{
if(n==0)
return 0;
if(n= =1)
return 1;
else
return f(sqrt(n)+n);
}
8)circular queue empty and full conditions if rear =0 and front=0 initially
9)
int f(int x)
{
if(x==0)
return 0;
int y = f(x—);
return y + f(x-2);
}
find o/p:
answer:infinite loop
11)Given head and tail pointers of linked list.which operation needs length of linked list
a)to insert node at beginning
b)to delete last node
c)to delete head
d)to insert node at last
b)atmost 1.5n-2
c)n^2
d)nlogn
coding question:
Given an array.divide the array into sets such that difference between sum of se
a={1,2,3,3,1,9}
I said watching cricket.So he asked me who is your favourite player and asked wh
He gave me 1 minute time and asked to tell which classes I will use and he said
He asked me to sort it.I told him to use bfs and get each value in a array and s
Later I told using binary search tree.He asked to write code for BST creation.
4)Given 299 numbers in range 200-500.no duplicates.Find the missing no.
Answer:using xor
http://www.geeksforgeeks.org/find-the-missing-number/
I told him sorting and traversing as one solution and other solution using hashi
He asked what if already elements are sorted. I told him a solution using binary
I said to write same function in every class and use virtual in base class and c
Animal *a;
a->f();
Interview 2:
1) Introduce yourself
2) He asked me which is my favourite subject among maths,physics and chemistry.
while I am solving using substitution he told me to draw y=x and y=1/x and add t
I asked whether there are any duplicates.He said no .Then I said a[i]=i;
5) http://www.geeksforgeeks.org/write-a-function-to-get-the-intersection-point-o
6) He asked whether I know sql
he asked about bode plot , nyquist plot and differentiator using opamp.
So i told that I am not interested in those subjects and asked him to give any
he said that's ok
Round 3:
There is an infinite stream of integers coming.How do you store them and search
he asked time complexity and what happens if the tree is skew tree
I said that both has it's advantages and disadvantages and explained him
He said we have traverse again list and asked me to still optimise it.
He told u r using hash instead of bst so y don't u use hash here also
He was satisfied with the solution and that's it from his part
Now 2nd interviewer asked another question.He said that it is a real life proble
When one process is writing into fileother processes are waiting to get access t
He asked me that how do you provide solution such that waiting time is minimised
I told him to divide the memory and give each part to each process.he said that
again 2 interviewers
1) Introduce yourself
2) Puzzle
http://www.cut-the-knot.org/impossible/brothers.shtml
I answered it after thinking 15 minutes and they have given one hint.
When I am thinking they asked me to speak out what am I thinking and what is my
3) find a pair of numbers in an array which will give given sum
http://www.geeksforgeeks.org/write-a-c-program-that-given-a-set-a-of-n-numbers-a
4) find the duplicate elements in array.
http://www.geeksforgeeks.org/count-frequencies-elements-array-o1-extra-space-tim
They are not looking for instance answers.They are seeing your way of thinking
They will give more time to think.so don't give up.
If you like GeeksforGeeks and would like to contribute, you can also write an ar
Source
http://www.geeksforgeeks.org/goldman-sachs-interview-experience-set-8-on-campus/
Amazon Interview Experience | Set 202
I had an interview with Amazon recently below are the questions asked.
Qualification round
1) Rotate/Shift the elements of a square array clockwise by one at a time. (Not by 90 degrees, but by
one element. Think of concentric circles)
Example:
12
34
Output:
31
42
2) Write a function that determines whether a two dimensional array contains duplicate values within
k indices of each other
The first line of input will be a number indicating how many rows are in the matrix. This will be
followed by lines of input one for each row of the matrix each row will contain the same number of
columns with each column separated by a space. Following the matrix will be a single line of input
containing a number indicating the k value.
Output: No
F2F Interview
5 rounds in total.
Each round was for 45 mins.
1st F2F
Tell me about yourself
Given three sorted arrays, how will you sort all the three arrays into one array, shortest time expected
2nd F2F
Design architecture that should handle millions of hits at given time, the response time of the system
should be the least. – ( Hash Map for data storage is something i came up with and that was accepted.
Couldnt come up with a solution for the entire problem.)
3rd F2F:
About project experience and how i handled it. Amazon leadership skills were mostly expected.
4th F2F:
Sum all the values of the nodes of a Binary tree that fall on the same column and print them.
The solution is to treat root as the center and any node that moves away from it (left/ right )one at a
step is treated as under same column
5th F2F:
Print the values of a binary tree that occurs on the same level.
-Level order traversing.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-202/
Microsoft Interview Experience | Set 60
(On-Campus for Internship)
Microsoft came to our campus. Branches eligible was CS and IT. There were a total of 4 rounds.
1st question:
You are given a matrix of dimensions m*n where each cell in the matrix can have values 0,1 or 2
which has the following meaning :
0:empty cell
So we have to determine what is the minimum time required so that all the oranges will be rotten.A
rotten orange at index [i,j] can rot other fresh orange at indexes [i+1,j] ,[i,j+1] ,[i-1,j] ,[i,j-1]. If it is
impossible to rot every orange then simply return -1;
2nd question:
You are provided with a binary tree and given two integers n and k.You have to determine sum of data
of all the nodes which are at a distance of k from the node which has data n.
I managed to solve question no. 2 completely .Both using BFS.Here is my way of how I did it:-
1. Use BFS directly to traverse the array once and can obtain the solution in O(n^2) only.
2. Form a graph out of the tree with the found node as the source point and then do BFS Sum to find
the required answer.
4. Given 1 billion numbers.Remove duplicates in O(n) and the range of numbers are till 10^5.(I used
A[abs(A[i])] method to change sign and remove.It impressed the interviewer a lot.)
5. Implement Dictionary(I asked about the basic layout and was told that lot of words have been
already entered each having its definition,synonyms and antonyms).(I started from vector > , then
HashMap, then Set > and then RB Tree approach too.)
6.I was asked to write the pseudo code for each of the above data structures and their complexities of
search,insertion and updation.
-I gave all the answers in this round .
2. Next I was asked that if I were placed at IDC or IT then which one I will prefer and why.It was
interactive session and finally I opted for MSIT mentioning him the reasons and he gave his final
feedback on me.
-I gave all the answers in this round .
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-60-on-campus-for-internship/
Flipkart Interview Experience | Set 33 (For
SDE-1)
Flipkart has done a drive in Delhi.
String e1 = "a>b=1";
String e2 = "a>b=2";
String e3 = "a>c>e=3";
String e4 = "a>c>f=4";
String e5 = "b>a=5";
String e6 = "a>b>c=5";
String e7 = "b=7";
String e8 = "a>b>c>d=99";
String e9 = "a>b=99";
‘b’: {
‘a’ : 5
Highlighted one are invalid because they come they ask for overwrite the data (a>b>c = 5; C has e
and f so we can overwrite.
Construct JSON
Print it
If you print in same as above (nice manner) +point
I solved this problem using Trie
One can see my implementation at here:
https://github.com/nitsgupta/practice/tree/master/JAVA/JsonBuilder
1. Do a level order traversal for a tree where order of printing is reversed on each level.
First i gave O(n2) solution they asked for less complexity solution. I then gave BFS solution by
keeping a FIFO queue.
2. You are given a file of parent child relations. Data is huge consist of millions of lines.
parent child
a -> b
c -> d
e -> f
3. You are given a 2*2 matrix which contains cost of visiting each cell. You have to find lowest cost
path from 0,0 to m,n where cost is minimum.
You can move only in down and right direction.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-experience-set-33-for-sde-1/
MAQ Software Interview Experience | Set 9
(On-Campus for SE-1)
First Round :
1) 30 Aptitiude questions.
2) 2-Coding questions
Second Round :
1) Given a table of employees containing employee_id, manager_id and employee_name, find the
topmost manager and second topmost manager.
4) Add 2 numbers a and b without using ‘+’ operator. I told him about half adder method, he asked to
think of some other method. Gave the solution of adding 1 ‘b’ times to ‘a’. (in binary).
6) 25 horses puzzle.
Third Round:
6) Why should not we use indexes? (Told about extra spaces) When do we use B-trees and hash-table
during indexing?
HR Round :
Q3-Family background?
A total of 5 students were offered the job. 5 students were offered the intern.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/maq-software-interview-experience-set-9-on-campus-for-se-1/
Amazon Interview Experience | Set 203
(On-Campus for SDE-1)
Hi everyone. Following is my experience of the recent Amazon recruit drive:
Given 2 strings, check if any one of them has any anagram of the other string, as a substring of it.
Graph question : ( not mentioned directly as graph, but was implied). basically Needed to find
the shortest path between two given vertices in the graph.
Interviews:
Round 1:
Round 2:
You have n slabs with two dimensions. Stack them to get max height. No rotation of dimensions
required. First he started with 2 dimensions, then 3, 4 and then for n dimensions.
Given a binary tree, a target node in the binary tree, and an integer value k, delete all the nodes
that are at distance k from the given target node. No parent pointers are available.
Round 3:
Round 4:
Round 5:
Given an array and a window k, print the minimum in every window of k. After suggesting a few
data structures like dequeue, heap, bst, he told me to code it using bst.
A file system is given. All the subdirectories in the root directory, the subdirectories within
subdirectories and so on is given. The input is some file or subdirectory paths for which we
need permission. Find the minimum permissions required to get all the permissions. No file for
which permission is not asked should be given permission to.
Tip:
The interviewers are really very helpful and they keep on giving hints if you are stuck. Just let
them continuously know your thought process. It is not necessary that you speak continuously but
let them know what you think in intervals.
They might ask you to think of better complexities and different data structures to solve the same
problem. But its not that if you straight away land up in an optimized solution its bad for you
because I was asked sometimes to compromise on the complexity but think of other data
structures to solve it.
While coding take your time. Make sure you cover the corner cases and if it is taking long, let
your interviewer know what you are doing currently. Test it before finally approving it. If it fails,
don’t worry, tell your interviewer about it and think of a fix or an alternative
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-203-recruit-drive/
Amazon Interview Experience | Set 204
(On-Campus for Internship)
Cut off: 75%. Around 140 students were short listed.
Round 2
The round began with my brief introduction and then there was a question on arrays.
I was given an array with all elements greater than or equal to zero
I was asked to to return the maximum product of two numbers possible
It was quite easy as we can find the maximum and the second maximum and their product will be the
answer but the interviewer wants me two to reduce the number of comparisons. Initially i did it in
O(n) and with 2*n comparisons
and finally came to a solution with 3n/2 comparisons by considering the numbers in pairs. The
interviewer was satisfied with my solution and i was asked to write a production level code for the
same.
5937
answer 9*7
Now she added one more constraint to it we are not allowed to change the structure of array and we
need to find the pair such that they are in increasing order
example
1978
answer 7 * 8
Initially I did it in O(n2) ie for each element i I found the maximum to its right and then compare the
maximum with the ith element then it can be the possible pair
and can contribute to the result
I came up with and (nlogn) solution using segment tree and sparse table
(Range maximum query) (Interviewer was impressed).
Finally I created a max stack from the right side and did it in O(n) with O(n) space but still she
wanted me to reduce the space to O(1)
It was already 1 hr and she gave me a hint that move from right side
and bingo i was able to answer her in just 5 minutes.
She was completely satisfied with my solution.
Round 2
The round again began with my brief introduction and then he asked me about my favorite subject.
He asked me to explain any data structure. I explained him Tries and segment tress. I even told him
about how tries can be used . I told him about auto complete features available, forward dns and there
working (He was impressed)
I explained him heaps priority queues and complexity of it operations and about Fibonacci heaps.
He asked me to illustrate some application of circular linked list and double linked list.
I told him double linked list can be used for LRU cache and using hashmap it can be done in O(1)
expected complexity per operation.
I was asked to code it.
For circular linked list I told him that it can be used for implementing a circular queue efficiently
since we need to maintain only one pointer ie. the rear for it.
Application BFS.
He then asked me to code and dry run a circular buffer and optimize it and compare it with standard
cyclic queue.
I used a counter variable for this purpose to use the buffer completely
and told him that the drawbacks can be when multiple processes try to access this shared variable
then there may be inconsistency hence traditional one was better.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-204-on-campus-for-internship/
Amazon Interview Experience | Set 205
(On-Campus for Internship)
Cut off: 75%. Around 140 students were short listed.
Round 1: 90 minutes
It comprised of 20 MCQs on aptitude, operating system, DBMS, data structures and algorithms on
Hackerrank.
2. Given a 2D array of 0s and 1s. Find largest square submatrix with all 1s. Although I made silly
mistakes initially, I arrived at efficient solution later.
He scanned my resume and then proceeded with a brief description of my project and its relevance.
2 coding questions
1. Maximum sum subarray
2. Maximum product subarray
covering all corner cases and proper working code
It moved on to detailed discussion on OS: thrashing, threads, processes, mutex semaphores etc. The
interviewer was nice and made me comfortable throughout the process.
Lastly, he asked if I had anything to ask him. I asked about the role of interns and latest projects going
on in the company.
Tips:
Be expressive during your interview.
Have a good resume (Aggregate+Projects+Coding skills)
Stay calm and confident
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-205-on-campus-for-internship/
Amazon Interview Experience | Set 206
(On-Campus for SDE-1)
Hi Everyone recently Amazon visited our campus for SDE-1 and internship and I got an offer for
internship as well as SDE-1. Here’s my experience.
Written Exam(1hr:30mints):
There were 22 questions asked in which 20 were of MCQ’s and 2 coding questions. Most of the
MCQ’s came from OS, Algorithm, C-o/p and aptitude (directly from previous year Computer science
GATE).
First coding question: Determine the diameter of a tree (Taking input was a bit difficult as we have to
take input in array of unknown size,sort it and create BST).
Second coding question: Given a string of words seperated by comma,we have to print pair of words
who are anagrams line by line(case-insensitive). If you don’t find any such pair then print -1.
Interview Rounds:
Round 1(1hr:15mints):
1. Started with Introduction then he jumped into project and discussed about 15 mints.
2. Given an array print elements according to frequency and if two elements have same frequency then
print it in decreasing order.
Gave solution using 2d matrix in O(n2). Then reduced the complexity by sing AVL tree in
O(nlogn).Later coded AVL tree solution on paper.
Round 2(1hr):
1. Started with project discussion of around 25 minutes.
2. Given an array of stock prices, find maximum loss in buying and selling stocks. I gave him appoach
first, then he asked me to code. Coded it.
3. Implement garbage collector in C without using free function.
4. What is virtual inheritance.
5. Explain how the file is stored in memory.
6. Explain UNIX I node Implementation.
7. Difference between process and threads.
8. How threads are executing parallely and how they share memory.
9. Asked algorithm to schedule kernal level threads(gang scheduling).
Round 3(1hr:30mints):
1. Started with Introduction
2. Detailed project discussion of around 45 minutes.
3. Given me the Resource allocation graph with set of processess and resources, ask me to tell him
the approach to execute all the process.
I told him to use topological sort suddenly he said very good and ask me to code. I coded it.
4. Explain the need of synchronization with the help of example.
I explained him with use of producer-consumer and printer spooler problem(also written code for
both).
5. basics of synchronization i.e code for wait and signal operation and how the semaphore maintains
their suspended list.
Round 4(1hr):
1. Given a integer number n, tell its binary representation is palindrome or not.
e.g 4=100 not palindrome
5=101 palindrome.
TC = O(n) and SC = O(1) was expected and I coded it.
2. He gave me a java code using lock on this keyword.Ask me is there any problem in the code using
lock keyword when multiple threads are running concurrently. I found the problem then he ask me to
resolve it and I resolved it.
3. What is virtual memory. Who implements it.
4. How virtual memory concept is implemented in system.
Tips:
1. Interviewer don’t expect you to give all correct answer though they want to see your approach first
and how you tackle a problem which you don’t know apriori.
2. Brush up OS fundamentals thoroughly and try to practice code on paper as much as you can.
3. Along with basic data structures also have some idea of advance data structures like
BBST,Trie,Graphs etc.
4. Think loud in front of interviewer and try to engage him all the time.
5. Listen his words carefully, probalbly they will have some hints to answer.
I would like to thanks geeksforgeeks team for providing such a great platform. You guys are doing
awesome job.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-206-on-campus-for-sde-1/
Microsoft Interview Experience | Set 61
(On-Campus for IDC)
Microsoft visited our campus recently.
It was an online round with 15 MCQ and time given was 30 min. The round was hosted on
cocubes.com Questions were mainly from C,C++,Java,OS.
This round was also hosted on cocubes.com and had two programming questions.
1. Given an array of size n and an integer k we need to return the sum of count of all distinct numbers
in a window of size k. The window slides forward.
Let k = 4.
2. Given a binary tree we need to make linked list out of the leaf nodes. Constraints were that it was
supposed to be done using O(1) extra space. Also we can use node->right pointer to connect the
linked list.
1. Given an infinite stream of binary digits (0,1) and an input number n, determine if at any point the
number is divisible by n.
I found the question actually tough… I first solved for some specific cases like n = 2 and n = 3. Then
by discussions with interviewers I was guided towards DFA Based Division.
http://www.geeksforgeeks.org/dfa-based-division/
Complete code was required in this round. To solve this one it took nearly 30 min with discussion.
2. Assume you are manufacturer of a pen, what all parameters will you check to test a pen.
3. Continuing above how will you test the address bar in a Browser.
Both these questions were open ended. He just wanted to see how many cases I can think of.
He then added further constraints such that if I want to print the matrix in a spiral way in clockwise
and anti-clockwise sense. Also he added the constraint that he can start at any corner of the matrix.
Detailed discussion on my approach was done. He was actually happy with the way I approached the
solution.
HR Round :
1. Normal HR questions.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-61-on-campus-for-idc/
Amazon Interview Experience | Set 207
(On-Campus for Internship)
Cut off: 75%. Around 140 students were short listed.
Round 1: 90 minutes
It comprised of 20 MCQs on aptitude, operating system, DBMS, data structures and algorithms on
Hackerrank.
Then he asked me to improve it. And then i gave him O(n) solution .
He said that i should cover all the edge cases .And left the room alone for 30 minutes. Then he came
back and he was satisfied with my solution .And immediately said that wait for the 3rd round
2. Given Two BinaryTrees , check if they are mirror of each other. (Told me to code it)
Lastly, he asked if I had anything to ask him. I asked about the role of data structures and algorithms in
the company work . He said they are used greatly that’s why we judge all of you on the basis of these
only.
Tips:
Be expressive during your interview.
Strong Data Structures And Algorithms
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-207-on-campus-for-internship/
Amazon Interview Experience | Set 208
(On-Campus for Internship)
Amazon visited our campus for hiring Software Developer interns for Summer 2016.
Cut-Off : 75%
140 students were shortlisted.
Round 2(F2F)
He asked about my favorite subjects and Data Structures that I have implemented. I named few Data
Structures including Segment Tree. Then he asked me about segment trees and how to solve some
simple problems based on segment trees, He asked only about approach didn’t asked me to code.
Then he asked me about
http://www.geeksforgeeks.org/connect-nodes-at-same-level/
I told him approach using level order traversal. Then he asked me to connect nodes on same level but
this time to their left sibling. After telling my approach he asked me to code and said that he want
code free of any errors. After I gave him my code he pointed out that there are some errors in code.
He asked me to find and correct them myself.
Then he asked another question:
http://www.geeksforgeeks.org/diameter-of-a-binary-tree/
After hearing my approach for this question he asked me to print leaves that correspond to diameter.
Round 3(F2F)
Only one question was asked in this round. She asked me to implement a data structure that can
perform
1) Insert (O(1))
2) Delete (O(1))
3) Count(O(1))
4) Get Element(O(1))
on integer inputs. Here Get Element returns any element present in DS.
I told her my approaches using array, single linked list with hashing and using two singly linked list
and hashing. I couldn’t reach exact solution but she was satisfied with my approach.
Solution to this problem was easy using doubly linked list and hashing.
TIPS:
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-208-on-campus-for-internship/
Microsoft Interview Experience | Set 62
(On-Campus for IDC)
Microsoft visited our Campus recently for IDC as well as IT Profiles.
Round 1 (MCQ):
It was an Online MCQ Round. There were 15 Questions in all. Time Duration was 30 Minutes. The
Questions were mainly focused on C, C++ and JAVA. Only 1 Aptitude Question was there. There
were different sets for different students.
Round 2 was held on the same day. It was Online Coding Round. There were 2 Problems.
1. Given a Binary Tree. Create a Linked List of all the Leaf Nodes of the Tree using the Right Pointer
of the Tree Node as the Next Pointer of the Linked List Node. Return the Head Pointer of the Linked
List. We were not supposed to use any extra memory.
2. Given an array of Numbers and an integer K. Find the total number of Distinct Elements in the
contiguous sub-arrays of size K each.
13 were shortlisted after this Round for the Interviews. While some 25-26 were shortlisted for an
additional GROUP FLY Round. I was selected directly for the Interviews.
The Interviewer was quite friendly. He tried to make the environment comfortable for me. This round
went on for around 1 hour and 40 minutes.
2. Given a Binary Tree. Find the maximum width of the Tree. I told him that I will use Level Order
Traversal approach, keeping the track of the level. He asked me to think of another approach. So I
told him that I will store the Tree Data in an Array and the Left View of the Tree in another Array.
After this, I will count the number of members between the two consecutive elements of the Left View
Array. Then he moved on to the next question.
Round 5 (Technical Interview 2):
I was called for the Second Interview after half an hour. The Interviewer was quite friendly again.
1. She asked me to explain my Project. We had a long discussion on the Project.
2. Given an n-digit Number and a number k. You have to remove ‘k’ digits from the Number and give
the shortest number from the remaining ‘n-k’ digits such that the sequence of digits remains same. For
example, if the number is 637824 and k = 3. So you have to remove 3 digits from the given number.
The number formed from the remaining digits should be the smallest possible and the sequence of
digits must not be changed. So the output should be 324. I gave her an approach. But it failed. Then I
used Dynamic Programming for this (Longest Bitonic Subsequence Concept).This Interview went on
for 2 Hours and 15 Minutes approx.
I was called within 2 minutes of my last interview for this Round. He asked me in which
Programming Language I am comfortable. I said C. So he asked me a very basic question on
Preprocessors. I told him the answer. But he told me that it is wrong. Basically, he was trying to
check my confidence. But I remained with my answer and explained him how I got it. He smiled.
Then he asked me a question to check my Problem Solving ability. Given a soft copy of a Dictionary.
You have to print all the unique subsets of the Anagrams together. Unique means that {eat, tea, ate}
should appear only once. I gave him many approaches but he wanted the approach from a layman
point of view. We discussed on this single question for 50-55 minutes. Then he gave me the statement
‘I am not very happy with your Problem Solving Ability’. But that was just to make me feel nervous.
Then he asked me the 3 Switch 3 Bulb Puzzle. I answered it. Then he asked me the Preferred Profile –
IT or IDC. We had a discussion on this.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-62-on-campus-for-idc/
Amazon Interview Experience | Set 209
(On-Campus)
Round 1:-
MCQ – Memory management , angle between hands of clock at a certain time , Inheritance etc
1) Given 2 Strings , check if any anagram of one string is a substring of the other string
I solved approximately 17 correct MCQ’s out of 20 and Both the Coding questions.
Round 2:-
first slight discussion on a project . I was discouraged to explain in detail and asked to give high
level discussion .
3 questions :-
1) if we throw light from the left of a tree , what nodes receive light .
2) extended first question and asked boundary traversal of a tree
3) asked to search an element in a sorted and rotated array
Round 3 :-
(45 min)
2 questions :-
1) Given an array of positive and negative integers we need to find the longest subarray where sum
=0
first gave o(n^3) then o(n^2) then finally o(n)time+o(n)space
2) given an array of size n-1 and given that there are numbers from 1-n with one missing ,
the missing number was to be found
Round 4:-
(1 hour 15 min)
4 questions :-
1) given a number line from -infinity to +infinity what are the mnimum number of hops required to
reach a number given the condition at step j I can take j steps forward and j steps backward
2)what datastructure to use to implement best fit algorithm , I gave a skip lists solution which i
thought was a strong solution
3)Traverse a binary tree in zig zag order – very common question
4) gven some values [M] [T] [R/W]
M- memory address
T- time slice
R/W- Read/ write
the number of conflicts were needed to be found out !
Only 2 tips :-
1) Geeks for Geeks is a MUST, so is GeeksQuiz
2) Speak as little as possible the interviewers would not be interested in answering your questions
with the time constraint that they have , Short discussions are acceptable but I was trying to ask too
many questions and telling them about stuff I knew without them asking .
Thank you Geeks for Geeks for making answering amazon questions easy !!
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-209-on-campus/
Amazon Interview Experience | Set 210
(On-Campus)
I am sharing here my experience in Amazon On Campus Interview. Amazon visited our campus for
SDE-1 positions.
There were 20 MCQs based on aptitude and technical questions. The quality of questions were good.
Two Coding questions were as follows:
array : 9 4 -2 -1 5 0 -5 -3 2
result: 9 -2 4 -1 5 -5 0 -3 2
24 candidates were shortlisted for the Interview round out of around 300 candidates.
Round 2 (F2F)
Asked questions like, Tell me about yourself, most challenging project, most risk taking step in any
project, any project in which you did something extra for your team even though it was not in
requirement.
1. Given a multilevel linked list with next and down pointer as shown in the image below:
Give the following output without using any extra space: 1->4->6->7->2->5->8->3
Solution: Make the next pointer of D to point to down pointer of A, followed by making next pointer
of 1 to point to down pointer of B. Similarly proceed until the two heads meet.
2. Connect nodes at same level using constant extra space (expected me to write a modular , clean
and production level code)
Round 3(F2F)
1. Given a string and a pattern, Replace all the continuous occurrence of pattern with a single X in the
string. With example it will be more clear
String: abababcdefababcdab
Pattern: ab
Result: XcdefXcdX
Initial 3 occurrence of ab is replaced by one X and then two occurrence of pattern is replaced by one
X and final one occurrence of pattern is replaced by one X
Coded it incorrectly in first attempt. The interviewer gave me another chance, coded it perfectly.
2. Print the left and right side view of the tree in a same function. (wrote a clean code with no
mistakes)
Round 4(F2F)
I initially suggested max heap based on frequency but was unable to find top K nodes in a max heap.
(*Trouble)
Later, i suggested to maintain a hash table with frequency count as the value and hashtag as key and to
implement a k-size Min-Heap to store the top K elements.(She was satisfied but not happy with the
time complexity)
2.(*Trouble) Because of my statement to find top k elements in a max-heap, i was asked to code for
finding Top K elements in a max heap with size N where (N>K). It seems to be trivial but it isn’t. I
tried my best and didnt gave up, the interviewer was happy with my energy and my never-give up
attitude :P.
Round 5(F2F)
Asked me about a project done as a team and what was my role in it. My most challenging project etc
Print: C-6 H-20 O-9 Cl-9 (Print the number of atoms of each element in a compound)
Solution: Gave a stack based approach where we need to push opening brackets and atoms and
multiply the frequency of each atom in stack with the value after closing bracket until we find a
opening bracket.
2. OOPs concept: Abstract class, Interface, Singleton class, code for constructor of singleton class.
Tips: Always practice on paper. Never give up in interviews. Pick up hints from interviewer. Be
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-210-on-campus/
Microsoft Interview Experience | Set 63
(For Internship)
This is my first time writing an article so here goes. Microsoft came to our campus yesterday. I sat for
both the IDC and IT process.
Round 1:
It was an MCQ round, 15-20 requestions. Mostly recursive questions, some aptitude and I/O.
Round 2:
Online coding i got two questions.
1. Window of k size in arr of size n, find all distinct element counts in those windows.
2. Connect all leaf nodes of a binary tree to make a LL. ( Don’t allocate any memory just set the right
child pointer as next node)
Round 3:
Group Fly round.
We got two questions:
1. Length of longest palindromic substring in a string. I got an O(n^2) solution. Mentor asked me to
optimize i tried but i couldn’t.
2. Merge two sorted arrays. Optimized from O(n) extra space to O(1) to no extra space.
Write all your approaches on the sheet even the pseudo code towards the end. Write comments.
Discuss with mentor. He should know who you are. Indent and write neatly.
Round 4:
Technical Interview.
OS questions.
1. Insert in a BST.
2. Find element in BST closest to k.
Some threading and java questions.
Be confident. Interviewer wasn’t responsive.
Round 5:
Technical Interview.
Basic DS questions, asked me what has been taught what has not been taught, what you know and
what not. I told him i have done heaps also so he asked me basics of heap.
Next question proper code he wanted for finding 2nd largest element in array was helpful and wanted
me to check edge cases and fix. I missed one and i thought i wouldn’t get through.
They understand your code easily so don’t think they will miss anything.
PLEASE INDENT. I wasn’t doing it initially so he was confused.
Asked about OOP and basics and stuff. I answered explained everything with examples. Run time
polymorphism, Inheritance, encapsulation and stuff.
Round 6:
HR Interview.
Best round ever. The person was really very very nice and frank. Loved every bit of interaction. Gave
puzzles like hour minute angle difference, some tricky ones like how many points lie west of north
pole (Answer is none) since there is nothing there.
Asked me to implement a scalable device which can incorporate additional shapes later on. The
device would output a shape on a matrix if input is shape name. He pushed me towards a hash table
approach with O(1) lookup and the table containing the coordinates for matrix traversal.
I want to thanks Geeksforgeeks for everything. Every minute of my last few weeks was just GFG. It
was an amazing feeling to get an internship.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-63-for-internship/
Adobe Interview Experience | Set 22 (On-
Campus)
Adobe Interview Experience (On-Campus)
Round 1:
========
1) Coding round: 3 questions, 90 mins:
a) Given k,n,m. where k is no. of coconuts you initially have. n is the some no. such that if you have
>=n coconuts, you becomes stressed otherwise you become normal. m is the no. of shops.You go from
1st shop to m-th shop without skipping any shop. At i-th shop, either you buy Si coconuts or sell Si
coconuts. If you are stressed then you must become normal at next shop. If you have less than Si
coconuts and you want to sell then you must sell all the coconuts you have. The task is to calculate
maximum possible changes of your mood from stressed to normal or vice-versa.
My solution: Used DP.
b) You have n nodes and m edges with their weights given. If no edge is given from node i to node j,
you should assume there an edge with weight=1. You have to calculate the min cost of path from node
1 to node n.
My solution: Could be done by Dijkstra, but Floyd Warshall was working for all test-cases hence
saved my time by using Floyd Warshall.
HR Round:
=========
Think of a real-life society problem and think of some innovative technology you can build to solve
that.
All interviewers were very-friendly. Hindi was permitted except HR Round. It was an enjoyable
experience.
Thanks Geeksforgeeks for Trees and Linked List.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-experience-set-22-on-campus/
Amazon Interview Experience | Set 211
(On-Campus for Internship)
Amazon visited our campus for hiring Software Developer interns for Summer 2016. All CS and IT
students were eligible.
Round 2(F2F)
Problem 1 Given a matrix containing 1’s and 0’s in sorted order(all 1’s should be continuous
followed by all 0’s), we need to find the row which has the maximum number of 1’s.
I started out with O(r*c), then optimized to O(rlogc) and finally O(r+c).
Problem 2
Given three points in space find if a triangle exists.
Problem 3
Given four points in space find if a square exists.
Problem 4 Given points in space, how will you determine whether the points given are in clockwise
order.
All the problems required full working code for the most optimized approach.
10 students were further shortlisted for the next round.
Round 3(F2F)
We initially discussed about my project including the future course that I would like to further steer
my project in.
Problem 1 Given a Binary Tree, find if it is a Binary Search Tree with constant space complexity.
Problem 2
Suppose there are n Petrol Stations in a circle. The difference in distance between two stations P1
and P2 is L1 and so on and so forth.
Now, given the fact that for every unit of petrol consumed you can only walk 1 unit distance and you
can move further only for positive difference between the reserve petrol and the distance that is to be
traversed. . Find out if there is a vertex starting from which you can come back to the same point
traversing the circle once.
Expected Complexity O(n) I started with O(n^2) and gradually optimized it to O(n)
TIPS:
1. Stay calm
2. Remain super confident throughout. That is the key.
3. Have faith in yourself
4. Your implementation skills must be real good.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-211-on-campus/
Flipkart Interview Experience | Set 34 (On-
Campus for SDE-1)
Flipkart recently visited my college for recruiting for SDE-1 profile. Here I am sharing my interview
experience.
2) Given an array of integers you to find the range l,r such that and operation of largest two element in
that range is maximum.
For example:
Input
616
Output
13
You have to print lexicographically smallest range.
2) There is a stream of integer coming. At any given point of time you have to tell median of numbers.
I give three solution to this problem using hashmap , sorting , and self balancing augmented binary
tree.Finally he got satisfied ?
3) He ask me binary index tree (Fenwick tree). Each and every concept of Fenwick tree.
4) The stock price of each day is given. You have to find the maximum profit you can make by buying
or selling this stocks. http://www.geeksforgeeks.org/stock-buy-sell/
2) You can use bfs or dfs to solve this question. He ask me to write the full code for this problem.
LRU implementation. Check my code on boundary conditions.
3) You have 100 documents each containing 100 words. You have to make disjoint set such that each
set contains same document. By same documents he means document containing same words but can
be in any order.
Firstly, I thought of trie. But he ask me to optimize my code. Then I use set and various different data
structures to solve this question.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-experience-set-34-on-campus-for-sde-1/
Oracle Interview Experience | Set 13 (On-
Campus)
Round-I: for 2 hours
This was an online round. The entire two hours duration was split into three sections and each section
had three sub sections:
Section-I: This section was computer programming, Data Structures, Operating Systems (Basics) and
Data Base Management System.
Section-III: This section was based on giving attention to details. To summarize this section, they give
a large amount of similar data and ask to find a certain data from the whole bunch. You need to search
through the document and search that data.
Each section was really tight and required a faster problem solving capacity. It was like Race against
Time.
Q1: Given a set of 5 words. Find the word in which if you pick any letter you could say how many
vowels are there in that word.
Q2: A scenario of Tic-Tac-To game. Question was, finally who would win the game?
Q4: It was also a puzzle. I don’t remember the question exactly. But it was a question on arrangement
of people.
Any Question Regarding Algorithms, start by giving brute force approach first. This will give an
indication to the interviewer that you are thinking. Keep asking questions to the interviewer so that
he/she will give a clue to proceed. Also this will indicate even if you don’t know an answer you are
willing to learn.
Round V: HR Round
This was just for 10-15minutes. The interviewer was very jovial. He started off by asking, how was
the day, had lunch etc and went to ask generic HR questions. Are you going for higher studies? What
do you want to become in your career, in other words what’s your career objective? Why do we have
to hire you? What do you know about Oracle? Why did you choose this university for your B-Tech?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/oracle-interview-set-13-on-campus/
Kronos Incorporated Interview | Set 1 (On-
Campus)
Round 1:
30 MCQs based on C++ and 30 MCQs based on aptitude.
Aptitude questions were based on Logical reasoning, Data Interpretation, Shape Manipulation and
general apti.
No negative marking.
16 candidates were shortlisted out of 120.
DBMS questions:
1. What are triggers?
2. Difference between DDL and DML?
3. Can any operation made by DDL be undone?
4. Difference between having and where clause.
5. What are subqueries?
6. What are types of views? Advantage of view over table.
Coding Questions:
1. Write a program for finding the middle of Linked list.
2. Write a program to compare two linked list.
Round 3: HR interview
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/kronos-incorporated-interview-set-1-on-campus/
Oracle Interview Experience | Set 14 (On-
Campus for Server Tech)
ROUND 1:
This was an online round.There were three sections :
1) Aptitude and logic
2) Data structures(mainly binary tree),OS,DBMS,OOPS.
3) Data analysis.
ROUND 2:
Online coding round:
2 codes:
code 1: given an array and a player.The player selects elements from array.If the player selects an
item with value i the he/she cannot select i+1 or i-1.Find the maximum sum of value the player can
select.
I/P : 4 1 2 8
O/P : 14
I/P : 9 7 4 5 6 1 2 3 8
O/P: 25
code 2: Find the number of palindromes that can be formed by jumbling the words of a given string.
I/P : abab
O/P : 2
I/P : none
O/P : 0
TECHNICAL ROUND 1:
1) tell me about yourself?
2) some questions on sorting algorithms? i.e, which sort is better and running times for each?
3) given a list of strings place all anagrams together.
4) Given two numbers represented by two lists, write a function that returns sum list. The sum list is
list representation of addition of two input numbers.
http://www.geeksforgeeks.org/add-two-numbers-represented-by-linked-lists/
5) What is virtual memory? Demand paging?and some basic questions on os.
6) Given a big file sort it? Big in the sense doesn’t fit into memory.
7) what is register storage class?
TECHNICAL ROUND 2:
1) Why is OOP better than procedural programming? adv and disadv of OOPS.
2) Puzzle: Pirate one: Ten pirates discover a chest containing 100 gold coins. They decide to sit down
and devise a distribution strategy. The pirates are ranked based on their experience (Pirate 1 to Pirate
10, where Pirate 10 is the most experienced). The most experienced pirate gets to propose a plan and
then all the pirates vote on it. If at least half of the pirates agree on the plan, the gold is split
according to the proposal. If not, the most experienced pirate is thrown off the ship and this process
continues with the remaining pirates until a proposal is accepted. The first priority of the pirates is to
stay alive and second to maximize the gold they get. Pirate 10 devises a plan which he knows will be
accepted for sure and will maximize his gold. What is his plan?
4) http://www.geeksforgeeks.org/a-linked-list-with-next-and-arbit-pointer/
TECHNICAL ROUND 3:
1) Design the snake and ladder game and finally if three players play it must give me the winner? i
was asked to write the code for it.(some optimisations then).
2) Gave me array : 9 16 7 8 25 95 23 11 and i was asked which sorting algo would be best to sort it
and asked me number of iterations it will take?
3) Asked me to explain merge sort and was asked to write complete working code for it.
HR INTERVIEW:
1) Tell me abt yourself?
2) how were the interviews?
3) how was 2nd round better than first?
4) asked me abt my internship.
5) asked me abt my family,hobbies and etc.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/oracle-interview-experience-set-14-on-campus-for-server-tech/
Amazon Interview Experience | Set 212
(On-Campus)
Online Coding Round
1) Given an array of numbers, Rearrange the numbers to make the even and odd numbers alternate. If
any one type is in excess, let it come in the end.
2) Given a binary tree, change the value of the node by the sum of the values of its children.
I completed both the programs, first one passed 7 test cases, second one passed all test cases. I was
shortlisted for the interviews
Asked what was my favorite project among the ones i have mentioned in my resume. Then he asked to
explain Project, and then he asked few questions regarding it.
He asked 2 questions. One was regarding linked lists. I forgot what those questions were.
Given a matrix. Each cell is either marked with a * or nothing. One cannot go into the cells that are
marked by a *. Given 2 points a and b in the matrix, Find out if point b is reachable from point a.
I gave a solution solution, but i had missed marking the cells visited. He pointed out that it will be an
infinite recursion. So i said i will mark it visited. He then told me to code it. I did. He was satisfied
with it.
Robot problem. Dynamic programming. I somehow solved it, he then asked for the code. I wrote it.
He tried to understand himself, but he wasn’t able to. So i made him understand, he was happy and
satisfied with it.
Questions on OOPs concept. Asked what a singleton class is. I answered, then he asked how can it be
implemented in C++. I was weak in the C++ language, so he gave hints. I tried but he was not
satisfied with my answer.
Then he asked to a question regarding trees. Given a binary tree, you have to connect all the nodes in
each level through extra pointers.
I gave an approach using queue. He then asked how to do with constant space. I tried, but i had
forgotten the algorithm. He tried giving hints, but i wasn’t able to solve.
He started off by asking how was the other interviews. Then he asked the typical “Tell me about
yourself”.
He asked me little about my favorite project. I selected the same one which i explained in the first
interview.
Next he asked, Given just a page of a Dictionary. It can be from anywhere, middle, end or start. The
dictionary is for a language that one doesn’t know. You have to find out the order of the alphabets,
which one comes before and which one comes after. I started with an approach using generic tree. He
asked me why can’t graph be used. I thought a little and agreed, and started using graph. I explained
him the inconsistencies that can occur. Later after few minutes of discussion, he told me, suppose he
gives me a graph with letters in place of nodes, and says to find out the order of the alphabets. How
would i go about doing it. I mentioned topological sort, but i said i don’t remember the algorithm
properly. He gave a little hint, that reminded me, and i solved it.
He gave a scenario. Suppose you type “www.amazon.com” and hit Enter. What goes on in the
background after that. I gave a detailed explanation with Network layers, routing, CDN, Content
Caching. I missed out NAT, so he asked me what it was and how it will be used.
Then he gave me a list of list. It had integers. Like the one shown in picture below (in Attachment).
He told me to print 1, 2, 3, 4… I did it using loops, But he wanted to optimize it, and said that i can
modify the list if i wished. So i thought a little and got the idea. He asked me to write the code. I
wrote, he saw and said there was a bug, but he had missed something, i explained him, so he was
satisfied with the code.
Only 7 people were there till the last round. The interviews were over by 10:40pm. They took 3
hours to come to the final list. They said that we all did very well. At 1:30 night they announced 3
names. I was not selected. All in all it was a good experience, but i was a little sad after the results
came out.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-212-on-campus/
Microsoft Interview Experience | Set 64
(For SDE-2)
First Round (F2F) 1 hour:
——————————————-
Write code for below 2 qns , not exact but concepts are 99% same.
http://www.geeksforgeeks.org/sort-an-array-of-0s-1s-and-2s/
http://www.geeksforgeeks.org/find-number-of-islands/
Then there was lots of related questions of hashing , what to do to make it scalable, Design the server
side.
But i didn’t had any WEB experience so i could not give proper answers for them how ever i tried
answering all questions and told them that these are my ideas how ever i don’t ave any web
experience so answers may be wrong .
Started with what are the things you will consider for scheduling a meeting with say 5 -6 persons .
Prioritize each of them . Then for each person you have these inputs .
based on that find out best possible time slots for scheduling a meeting .
other questions of why you want to join how u will cope up with the works which are different that
the work you are doing .
Fourth Round (F2F) Hiring Manager – 15-20 mins:
——————————————————————————
Questions on why you want to join how you will work then below question .
http://www.geeksforgeeks.org/largest-sum-contiguous-subarray/
I had justify lot of questions on why i want to change the domain after spending considerable amount
of time etc,..
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-64-for-sde-2/
Dell Interview Experience | Set 2 (On-
Campus for Dell International R&D)
The Interview Experience below is for Dell International mainly to Dell R&D division. The hire
process was mainly focussed on their Server and Storage systems requirement.
Hiring Procedure:
There was one written test, 1 to 3 technical interviews and a HR round.
Written test:
-It had basic questions of Quantitative Aptitude,Analytical Aptitude some of Operating
Systems,Computer Networks , Database and very few questions on current new technologies.
– there were 50 questions to be answered in 60 mins.
– Half the questions were from aptitude and other from the core Computer Science .
– Each section had a separate cut off.
– Guarantee yourself that you do well in this test as the calls to interview are based on these scores
and they call you according to the score you get . you score high marks you are called first to the
interview and preference in selection to you will be high.
Some people also had their 2nd technical also but i was taken to HR round.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/dell-interview-experience-set-2-on-campus-for-dell-international-rd/
3rd Round : HR
Basic HR questions sometimes puzzels may be asked .The main focus on your approach
to solve the question not on result. Good communication will be an advantage.
That’s it. Most difficult round in my opinion is Written round. Best of luck guys.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/exl-analytics-interview-experience-set-1-on-campus/
Round 1( Technical):
1.)I was straight away asked to write code for detecting loop in a linkedlist without any formal
introduction and all http://www.geeksforgeeks.org/write-a-c-function-to-detect-loop-in-a-linked-list/
.
After telling my approach he asked me to give a proof of it to which I got shattered but then he gave
me a hint and later discussing it we got to the proof but it wasn’t a full-valid proof. But later on it I
found http://math.stackexchange.com/questions/412876/proof-of-the-2-pointer-method-for-finding-a-
linked-list-loop
After it he asked me to detect starting point of the loop. Again which is geeksforgeeks. I wrote the full
code on a paper and understand him my approach which is very similar to geeksforgeeks one.
http://www.geeksforgeeks.org/detect-and-remove-loop-in-a-linked-list/
2.)He gave me another question from g4g which I haven’t read before
Sort one matrix based on another matrix. I gave him one brute force approach, then he asked me to
optimise it and then we discussed a bit an finally I came up with O(nlogn) approach. However this is
http://www.geeksforgeeks.org/sort-array-according-order-defined-another-array/
I was a bit hesitant after 1st round as I’ve mumbled upon the proof of detecting loop in linkedlist until
he gave me some hint. However, I was called after 2-3 long hours of waiting for my 2nd round of
interview.
Round 2(Technical):
He was a very senior guy and a very cool and calm personality. He entered the room and said sorry to
me for such a long wait and then started with formal introduction as to What you do in your present
company and why do you want to leave it at such an early stage.
1.)He asked me to check whether a given tree hold children sum property or not. Another g4g
question http://www.geeksforgeeks.org/check-for-children-sum-property-in-a-binary-tree/.
As soon as I heard the problem, I tld him my approach and coded it on a paper. He then to calrify if I
haven’t crammed it asked me to explain him the recursion and dry run it on different examples. I did
that explaining him completely the edge cases and every aspect of that recursion. He was impressed
Then he started telling about his experience of startups and that of Amazon
After that HR asked me to leave and said that you’ll be informed about the result and further rounds.I
got a call and was asked to come for Hiring manager Round
Then he jumped to my CV and asked me for each and every single detail written in my CV( so please
make your CV as small and as specific to your strong pints as you can). He asked my role in different
projects I have done and in the technical paper I have written along with others. he even asked my
college projects(even the 2nd sem project which I forgot to take off from my CV) to the depth and
asked for the specific details( He knew about everything regarding my projects ).
Then after this discussion I thought it would get over, but he has some other plans. He asked me to
give a solution to some coding problems:
1. Check how many Parenthesis are balanced in an array of parenthesis.This was easy but then he
asked me to scale it such that your array can’t reside it on one memory. To this I said do parallel
processing, he gave me freedom of number of clusters on which I can store and compute and then it
took some time to me to come up with scaled algorithm. That was quite interesting and energetic
enough. All my tiredness went off.
2. In a string detect the smallest window length with highest number of distinct characters. For eg.
A = “aabcbcdbca”, then ans would be 4 as of “dbca”
Finally I gave him some solution which was incomplete, he asked me to relook at my solution and I
found the mistake but didn’t asked me to code it.
I would like to thanks G4G to be such organized forum with the help of which, we can get what are
the current trends in interviews and also what they expect.
Don’t copy the solution from g4g but get the approach as that will help you to solve newer problems
;). In other words train your model rightly, Don’t overfit it, else your accuracy will be compromised
Thanks.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-213-off-campus-for-sde1/
Amazon Interview Experience | 214 (On-
Campus)
Amazon visited our campus for recruitment. Here is my experience.
First there was an online round on hackerrank and consisted of 20 mcqs and two coding questions.
Here are those two questions:
Ques 1: Given a singly linked list, write a function to put all the even numbers at the front and odd
numbers at the end of ll while maintaining the order of numbers. In place solution was expected.
Ques 2: Given a sequence of moves for a robot, check if the sequence is circular or not. A sequence
of moves is circular if first and last positions of robot are same. A move can be either R(Rotate
right), L(Rotate left), G(Go one unit).
Round 1: There was some discussion on my intership project. Then i was asked the following coding
questions:
Ques 1: Given an array, find a pair of elements which gives us the maximum sum.
Ques 2: Given an array of strings in sorted order, print all the same strings only once on the screen.
Ques 3: Given a binary search tree, find the kth smallest element int it.
Round 2:
Ques 1: Given an array, find the maximum length of subarray such that the average of that subarray is
the maximum of all subarrays.
Ques 2: Given the data value field of a node, print all the nodes at distance k from that node in a
binary tree.
Round 3:
Ques 1: Write a function which takes input as bank balance and returns a string equivalent of that
integer/float.
Ques 2: What happens after we type some web address in a browser and hit enter.
Round 4:
Ques 1: Given an integer and a mapping of Roman numerals [I:1, V:5, X:10,L:50] write a function to
convert any integer between 0 to 100 to Roman numerals. All the rules for conversion have to be
followed.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/amazon-interview-experience-214-on-campus/
Accolite Interview Experience | Set 4 (On-
Campus)
Round 1 (Written)
Around 140 students appeared for the offline test.
There were 20 MCQs that to be done in (30 minutes), questions were from OS,DBMS,Datastructures.
After that coding round was there (paper coding) in which 3 questions were given and we have to
attempt any 2 (1 hour)
1. Write your own sqrt() function. the function should return square root if it is a perfect square else
return floor(sqrt(x))
2. Given an array containg positive and negetive integers. you have to find the smallest missing
positive number. your code should run in O(n) time and O(1) space.
3. Given an array of strings, find whether the strings can be chained or not to form a circle. A string x
can be put before another string y if last character of x is same as first character of y.
2. Given a BST, you have to find the kth smallest element in it in O(n) time and O(1) space.
3. Suppose you have server where multiple requests are coming at time to,t1,t2…Now suppose a user
hits at any particular time t on the server then server should return the last request. you have to design
the datastructure for the same.
I suggested that we can use stack that will return the last request, he then asked me to do for last 10
requests then I suggested to use array of structures which will store request no. and timestamp along
with them.Now at any time t we can move 10 elements back but he said that suppose user hits
frequently then every time i will have to traverse back again and again so time complexity will be
much high, I agreed and suggested another solution similar to LRU implementation so that the requests
which are coming frequently can be processed faster. then he modified question that user wants
requests of last 1 minute and he gave a hint that is it necessary to store all requests can we not just
store requests of every 1 min only,then suddenly it clicked to me, I suggested to use deque for 60 secs
now suppose request arrives at 61st sec then we can just add that at rear and remove one from front
maintaining a window of 60 seconds.He was satisfied but he want that no deletion should be there so
I told him to use circular deque so that we can replace previous elements.He was completely
satisfied now with the approach.(About 35 min. discussion)
4. Given an array containing prices of a share of 30 days.A person has 1 share which he can buy and
sell any number of times, you have to find the maximum profit which can be earned.
I suggested one approach to create two auxiliary array MIN from left and MAX from right and
traverse both simultaneously if difference between MAX[i] and MIN[i] is greater than maxDiff then
update maxDIff and store current index and add to sum if index+1 is not equal to current iteration
index and finally return sum.He tried some test cases over my code and found that for some cases it
was giving wrong answer,then he asked me that how is my command over dynamic programming,I
told I know only the standard ones and no other experience,then he said this question is of DP but he
was happy to see my approach.(About 20-25 min.)
2. Given a BST, you have to find the kth largest element in it in O(n) time and O(1) space.
I suggested to declare a static variable count which will increment count if node visited in inorder
and if count becomes k, I will print that node’s data and return. Then she asked me how static works
and difference between global and static.
3. Given a mobile keypad of say nokia phone and a dictionary which has all the meaningful words
which can be formed, suppose now user types some number(input) then your program must suggest all
the meaningful words which are present in dictionary.Before implementing this she asked me the
datastructure to store the dictionary efficiently and then how will you use this datastructure to make
code.
At first, I suggested I will store dictionary in 2-D array and lexicograpphically sort it, now suppose
user types a number the string starting with that character is searched in the array. she said to reduce
complexity because dictionary may contain 1000s of words,then I suggested to use trie datastructure
to store and search the string, she was satisfied now and asked me to explain the concept.
4.Given preorder and postorder of a graph, how can you construct the graph.
As I heard this question, i was stuck for 2 minutes but then I said as far as graph is concerned I dont
know about it but a unique tree cannot be constructed with preorder and postorder so as graph,so
inorder is needed, she was happy and agreed on answer.
2. Design a BRTS traffic signalling system such that no two vehicle clashes. Note that BRTS bus will
follow the BRTS traffic lights B1,B2,B3,B4 in 4 directions and regular traffic will follow regular
traffic lights R1,R2,R3,R4 only. In input only maximum cycle time was given(time after which the
process repeates) check for all corner cases (traffic lights have two states only (RED and
GREEN)).you have to tell any one possible combination of traffic lights under maximum cycle time.
(About 1hr discussion).
3. Suppose a linked list is given but we dont know the count of nodes, you have to find the kth node
from last without counting the nodes.
4. Given an array of n integers such some elements are in the range 0 to n-1 and some out of range
may be negetive.You have to reaarange array such that all elements which are in range appear on their
index and rest appear in sorted manner for indexes not present.This should be done in O(n) time and
O(1) space.
Eg- suppose n=6 ,4 5 2 3 6 -3 output= -3,6,2,3,4,5
6. How can you sort the elements with the help of queue.
I suggested one O(n) time solution along with O(n) extra space.He asked to do in O(1) space so I
suggested deque, he seemed satisfied.
After this 2 were selected finally and unfortunately I was not amongst them as they might have thought
i was little stress out. At last I would suggest that your approach and concepts must be strong as they
always give questions with some variations.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/accolite-interview-experience-set-4-on-campus/
Amazon Interview Experience | 215 (On-
Campus for Internship)
Online Round(1:30 hrs)
20 MCQs based on OS, C, C++, 3 questions on aptitude & 1 question on DBMS.
Q1. Write a program to separate even nodes from odd nodes and odd nodes must come after even
nodes(in place).
Input: 17->15->8->9->2->4->6
Output: 8->2->4->6->17->15->9
Round 1:
Q1. Print a matrix spirally.
Round 2:
Q1. Given a sorted stream of 0’s and 1’s, find the first occurrence of 1.Write a full working code.
I firstly did it in O(n). Then he asked me to reduce the complexity.I reduced the complexity to O(log
n) by applying binary search.
Q2. What happens when you click a web address and how are web pages retrived.
Q3. He asked me about memory management in C and C++ and how new allocates memory to objects
and he asked me to overload new operator.
Q4. If you are given some functions and whenever you call that function,the timestamp is stored along
with function name.
eg: f1 1:20
f2 2:30
f1 3:10
Suggest an appropriate data structure and write a code to make following queries within two given
time stamps t1 &t2:
query 1: Return number of all the functions called between t1 & t2.
query 2: Return number of times a particular function is called between t1&t2.
Q6. Suggest some data structures to maintain relationship between various hierarchies in an
organization.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-215-on-campus-for-internship/
Flipkart Interview Experience| Set 35 (On-
Campus for SDE 1)
Recently flipkart visited our campus for hiring interns as well as SDEs
a. Given an array and an integer b, traverse the array and if the element in array is b , double b and
continue traversal. In the end return value of b.
Used ad-hoc approach . You just need to take care about the fact that ans can be long long.
b. Given k,n,m. where k is no. of coconuts you initially have. n is some no. such that if you have >=n
coconuts, you become stressed otherwise you are normal. m is the no. of shops.You go from 1st shop
to m-th shop without skipping any shop. At i-th shop, either you buy Si coconuts or sell Si coconuts. If
you are stressed then you must become normal at next shop. If you have less than Si coconuts and you
want to sell then you must sell all the coconuts you have. The task is to calculate maximum possible
changes of your mood from stressed to normal or vice-versa.
b. Given co-ordinates of flipkart fulfillment center and n sellers find the nearest k sellers.
I first suggested sorting. Then he asked me to think of any other approach. Told him to use heaps.
Discussed about its time complexity. He said complexity to build heap is nlogn but i stuck to my
answer that it is n. He then told me he was just checking my confidence
Interviewer was extremely polite and cordial.
I did well in these two rounds so I was not asked to give another technical round and was selected for
direct interview with hiring manager.
Some of the round 2 questions were on topics like matrix dp, trees, linked list, etc.
One of the best conversations I have ever had. Discussed about my projects, college life, what i did at
my internship , favorite subjects, worst subject, what is interesting about flipkart, role model, etc.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-experience-set-35-on-campus-for-sde-1/
Interview Experience with Swiggy
Swiggy is a fast growing startup, based out of Bangalore. I recently interviewed there for the post of
SDE-1 and would love to share my interview experience.
For violation of multiple validity conditions, print the condition coming first in the above order.
If the input is valid, print the tree in a serial representation. For eg: If input is (A,B), (B,C), (A,D),
(C,E) , output: (A(B(C(E)))(D))
1. Explain the code from the machine coding round. The guy made me run the code on an online
compiler to have a look at the errors, and then ran some test cases as well.
2. Detailed discussion about previous experience. Had to explain my work in the current company
end-to-end.
3. A question on arrays: Given an array, print all possible contiguous subsequences whose sum is
divisible by a given number x.
Had a nice little chat with the co-founder about the work, culture, their vision, etc. Seemed quite
impressive.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/interview-experience-with-swiggy/
Dell Interview Experience | Set 3 (On-
Campus for Dell International R&D)
Interview experience for Dell International (R&D) – On Campus Software Development Associate
Engineer (II)
Selection Procedure :
1 MCQ Test
2 Technical Rounds
1 HR Round
Written Test :
-50 MCQ to be solved in 75 min
-Difficulty level was similar to GATE questions
-Questions were from C/C++ programs, Networks, Operating System, DBMS, S/W Engg, General
Aptitude etc.
I would like to thank G4G for such great forum, surely G4G is the best source for preparation.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/dell-interview-experience-set-3-on-campus-for-dell-international-rd/
Drishti-Soft Solutions Interview | Set 2 (On-
Campus Written)
This test consisted of two sections MCQ and PROGRAMMING.
The section MCQ had 30 questions and was supposed to be solved in 30 minutes.It included only
quantitative aptitude questions.
The section PROGRAMMING had in total 4 questions was supposed to be solved in 2 hours and 30
minutes.
The PROGRAMMING sections had three sub sections: FRESH CODING, API CODING and
DEBUGGER.
1.The subsection FRESH CODING expects you to solve given problem and write you code.
SERIES ABCD…….XYZAAABACADAE……
AXAYAZBABBBCBDBE….BXBYBZCACBCCCD….CXCYCZ…. AND SO ON
Input(a) is from 0<=a<=9999; Output should be alphabet from the series ,corresponding to the input.
INPUT:a=30
OUTPUT:B
input: a = 27
output: A
2.The subsection API CODING expects you to understand the given code and complete it.
Program was :from the given subset, find out the two subsets whose sum of elements are equal.
e.g
subset:{4,2,1,1,5,3}
subset1:{4,2,1,1} and sum of elements is 8
subset2:{5,3} sum =8
3.The subsection DEBUGGER expects you to understand the given code and fix the bugs
Test was of three hours and was continuous.
HR explained about the online test and gave a pamplet that had the description of coding questions
Programming languages that could be used were C and JAVA
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/drishti-soft-solutions-interview-set-2-on-campus-written/
Adobe Interview Experience | Set 23 (1
Year Experienced)
I recently interviewed at Adobe, Noida office and got the offer. I had 1 year work experience.
It was a standard process comprising of an aptitude and technical test on hackerrank. Its the same
every time. You can have a look at the test in previous archives.
Screening
————–
-Aptitude Test
-Technical Test having 13 MCQs and 7 standard coding questions.
Round 1.
========
1. The interview started with my general introduction. The interviewer wanted to know if I had in
depth knowledge of what I am working on, so he asked all sorts of questions related to the
technologies and why they were used and not something else.
2. Questions Related to C, C++ – How are .h files loaded and linked with their .c files. I did not
know much about it as I had experience in Java and told him the equivalent answer in Java.
1->2->3->4->NULL
|
5->6
Gave an answer using difference in length of LLs and wrote the code which handled all the cases.
5. Then he discussed about Operating System Concepts, Virtual Memory, Paging, etc.
Note. Make sure you write code which handles all the test cases especially the boundary ones.
Round 2.
========
1. The interview started with my brief introduction. This time the interview was more interested
towards my hobbies and passions. He asked me what do you do to keep yourself updated with the
latest technology trends?
2. After that he asked me only one question related to geometry. The question was given an isosceles
right angled triangle. Find the radius of the smaller circle.
Round 3
========
1. The interviewer asked me what all had been asked to me till now. I confidently said that I liked that
goemetry was asked. I shouldn’t have said that…
The question was given a rectangle ABCD with length l and breadth b. Now it is folded along
diagonal BD. i.e. A is joined to C. Find the length of the line segment EF
Solved the question with his hints. Basically it involved some deductions related to imagination and
pythagoras theorem. Basically AE = EC and EF = EC. After that it is simple geometry question.
2. How do you heapify an array? What is the time complexity involded. Apparently he was interested
in the exact complexity. I told him that we always start heapifying from the last parent whose index in
the array is (n-1)/2.
He then asked me about how we heapify individual elements, etc. and how heap sort works.
Basically he wanted me to answer that we do not heapify elements from (n-1)/2 till n which
decreaes the time complexity from nlogn which I answered in the end.
3. int a = 8;
char *b = (int *) a;
After this question I told him that I am from Mechanical background and I did not know much about
computer architechture. He was a little shocked and skipped the OS questions. Lucky me!!!
5. Given an array of numbers all of which are repeated only one non repeated, find the non repeated
number.
6. Then he extended the previous question to find if two numbers are non repeated. He wanted the
XOR approach again.
7. Given two binary trees A and B. Check if B is a subtree of A. Solved using nomal tree traversal.
First gave the approach using Heap. Put all the elements of an array in a min heap and extract k
times. But he was interested in a better approach.
He told me there is a more optimized approach on the selection of pivot elements using order
statistics. I did not knew the order statistics method but he was quite satisfied with basic quick select
algorithm.
2. Given an array of size m out of which n indexes are allocated. How do you minimize the number of
comparisons when you search an element in this array?
I wrote basic linear search code. Then he asked me how do you minimize number of comparisons.
3. Given n points in a plane which form a polygon. Find if a random point exists inside that polygon
or not?
4. How would you find the volume of a lake. He was interested in my approach. I gave 2-3 methods,
one of which was quite funny on which he laughed at me.
In the end he asked me if I had any questions regarding the role and all.
I would like to take a moment and thank geeksforgeeks for helping me in my interview preparation.
Cheers to you guys!!!
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-experience-set-23-1-year-experienced/
Codenation Interview Experience | Set 2
(On-Campus for Internship)
I applied for two month long summer internship in codenation. It was an On-campus internship
recruitment.
It consisted of :
1. Coding Round: It had 3 questions to be done in 1:30 hrs,
1. You’re given a string that (may) be appended with a number at last. You need to find whether the
length of string excluding that number is equal to that number. For example : helloworld10 ,
answer is True as helloworld consist of 10 letters. Length of String less than 10,000. (All you
need to do was check the last 5 places.)
2. It was a simple dp with bitmasking question. N things to select for N people, you were given a
NxN matrix and cost at each element, you needed to find the one combination with max total
weight, such that each person gets exactly one thing.
3. It was a Bi-partite graph implementation question. Just to check whether the graph is bi-partitie
or not.It had a complex problem statement, but the problem eventually broke down to this.
Source
http://www.geeksforgeeks.org/codenation-interview-experience-set-2-on-campus-for-internship/
Drishti-Soft Solutions Interview | Set 3 (On-
Campus)
This test consisted of two sections MCQ and PROGRAMMING.
The section MCQ had 30 questions and was supposed to be solved in 30 minutes. It included only
quantitative aptitude questions.These MCQs were of medium level.
The section PROGRAMMING had in total 4 questions was supposed to be solved in 2 hours and 30
minutes.
Q2. Standard Josephus problem(i was using recursion in the code,but it resulted in run time error,So i
was forced to write the iterative version).
Q3.Debugging round-This section was tough and the given code was also long, than expected.A NxM
matrix(consisting of only 0 and 1) was given and a routine was written to find the number of
squares,whose all four boundary consisted of only 1’s.The sizes of squares .varied.Our job was to
modify the code slightly(not heavily) so that it gives the desired output.
Q4. API coding(Toughest of all) Few directory path (of linux) were given.We had to determine the
number of times we will use “mkdir” command to create a particular folder.Prototype of all functions
used, were given in the code.Using these functions we had to write the code.It was tough,as the whole
code was implemented using pointers and the given prototype was also long.
The only drawback was that C++ was not allowed,only C and Java.As C++ STL was not allowed,it
was quite tough to handle the code.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/drishti-soft-solutions-interview-set-3-on-campus/
Adobe Interview Experience | Set 24 (On-
Campus for MTS)
Adobe came for recruitment in my college. Here is my experience-
You are given the height of n towers and value k. You have to either increase or decrease the height of
every tower by k. You need to minimize the difference between the height of the longest and the
shortest tower and output this difference. I solved this in O(n2)
First interview:
1. You are given an array of characters which is basically a sentence. However there is no space
between different words and the first letter of every word is in uppercase. You need to put a single
space between these words and convert the uppercase letters to lowercase. There are some extra
spaces available in the array at the end.
I first told him an O(n2) approach but the interviewer asked me to optimise so I came up with an O(n)
time and O(1) space algo.
2. Find the intersection point of two linked lists. This is given on gfg.
3. Then he asked me some question on dynamic memory allocation which I don’t exactly remember.
Also asked about new, delete, malloc, free.
Second interview:
The interviewer asked me to introduce myself. After this there was long discussion on my internships
and the projects I had done. I had done a project on machine learning so a long discussion went in
this. Then some questions related to my CV. In the end he asked me a few questions on dynamic
memory allocation and pointers.
Third Interview:
This was a very long interview.
1. He asked me to implement a spell checker- first check if it is the correct word and then check
words which are similar to the given word. Eg how google shows in Did you mean!
2. What happens when you type a url in the browser? After this question there was a long discussion
on how a browser displays a web page(HTML, CSS etc).
Fourth interview- HR
There were some general HR questions like Why adobe, where do I see myself after x years, how
was the entire recruitment process, my strengths and resume related questions.
Thanks geeksforgeeks! J
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-experience-set-24-on-campus-for-mts/
Microsoft Interview Experience | Set 65
(On-Campus for Internship IT and IDC)
Microsoft visited our campus for hiring FTE’s and Interns. I had opted for both Microsoft IT and IDC.
The first couple of rounds were online rounds and were hosted on Cocubes.com
Round 1
It comprised of 15 MCQ Questions and time allotted was 30 mins. Every student had a unique set of
questions which comprised of C,C++ (I/O), Data Structures, Java, and Aptitude. The questions
required a decent amount of thinking.
2. Connect all leaf nodes of a binary tree to make a LL. (Without allocating any extra space for the
linked list).
Now, around 30 students were shortlisted for Microsoft IT and around 40 for IDC. There were
some people who got short listed for both. I was lucky enough to sit for both of them.
From here I will write the processes for IDC and IT separately.
FOR IT
Round 3(Group Fly Round)
Some people who had a high score in the 1st and 2nd rounds did not have to appear this round. They
were promoted for the next rounds.
There were two questions.
1. Given a string (Assume that its case insensitive and has no spaces), find the length of the largest
palindromic substring.
While the brute force solution would have O(n^2) complexity, with some thinking you can arrive
at a O(n^2) solution.
2. Given a string , return the length of the longest substring which comprises of consecutive
characters.
Ex: abcxy
Output:
3
abc
Discuss your approach with your mentors and be very clear about it. Write comments on the paper
code.
He first asked me to write a code to implement the “Evaluate Function” of Microsoft Excel. I gave
him the solution where we convert the expression from infix to postfix and then evaluate the postfix
expression. However, I was aware that this solution would not work for 2 digit number (or results).
So I suggested an improvement by taking input as a string and then converting the string into an
integer. The interviewer was satisfied with the logic.
He then asked me if I knew anything about encryption. Though I didn’t have a very clear idea but I
told him about some ciphers that can be used.
I had only one project on my resume. We had a 15 minute discussion of the challenges faced in making
it and how it could be further improved.
The interviewer was again very warm. Though my CGPA was high, it kept decreasing every semester.
He asked me the reason for this.
Then we discussed about my experience and work at one of the earlier places that I had interned. And
he asked a few other questions like “Why Microsoft? “ and “What I can do to improve Microsoft?”.
Just be honest and confident about what you speak. And this round should go smooth.
FOR IDC
It followed a very similar structure like the IT interviews. The interviews here focused more on
coding and databases. There were two Technical PI rounds instead of one after the group fly round.
There was a question on implementing a data structure to store a word along with all of its acronyms
from a dictionary such that we can search it efficiently.
Thanks to GeeksforGeeks for building such a repository. I have learned a lot from this forum in the
last one year. Awesome platform. And I would urge others who gain from this platform to contribute
their experiences as well.
Cheers.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-65-on-campus-for-internship-it-
and-idc/
Flipkart Interview Experience| Set 36 (On-
Campus for SDE 1)
Recently Flipkart visited our campus for hiring interns as well as SDE..
Q2(Simplest Greedy)
http://www.geeksforgeeks.org/greedy-algorithms-set-1-activity-selection-problem/
Q3(Dynamic Programming)
http://www.careercup.com/question?id=5734224617275392
Q2
http://www.careercup.com/question?id=5612093642375168
Q3
A dictionary with many given words…given a string with random missing spaces, find all the valid
possible correct outcomes of the string.
Solved using recursion…didn’t complicate too much..
next he added that the dictionary also contains the count of the number of times it has previously
occurred. I was asked based on that what parameter will i use to determine which of those possible
outcomes of string is most likely?
Eg >
d[]={ a=2 ; ab=4 ; c=3 ; bc=5} solve for string “abc”
Here 2 possibilities are
1. a…bc ::we have count for each “a” and “bc” as x=2 and y=5
OR
2. ab…c :: we have count for each “ab” and “c” as x=4 and y=3
Took a page out of my project, in FCM, we use distt formula between a point and cluster centers to
decide the membership function of the point being a part of the cluster..In this case i used distance
formula from center(sqrt(x^2 +y^2)) as the value to decide the better possibility of the string..The
farther from the center, the more likely it is….
Q2
http://www.geeksforgeeks.org/given-a-string-find-its-first-non-repeating-character/
I first gave a simple soln using a map pair but he asked me how would i store the map so that i
wouldn’t have to check which came first…So, i used a doubly linked list similar to the solution in the
given link…
I did well in both these round and was called for the HR round eventually.
HR Round
It was one of the best interview i have ever had. Discussed about my projects, college life, internship
, interests, strength, weakness and about what i consider a good life, a good job and how susceptible
will i be to change in role within the company etc..
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/flipkart-interview-experience-set-36-on-campus-for-sde-1/
Endurance International Group Interview
Experience (on-campus)
Endurance International Group came to our campus for full-time hires.
It was open to all the branches. Approximately, 450 people sat for the interview process.
Round 1 (MCQ):
Time: 45 minutes
Questions: 45 multiple choice questions
Format: we had to write down our answers on a piece of paper and then upload the answers on their
website
designed for the test.
The questions were from OS, DBMS, Networking, DS and algorithms, C/C++. The questions tested
basic concepts
of Computer Science and were not too difficult.
We could use our own laptop using any IDE of our choice. No internet access was provided.
We had to build a simple text processing tool using a language of our choice (C, C++, Java, Python
Ruby, PHP,etc). Documentations were provided for each one of the languages mentioned.
Amit,Shah,+9800123456
Pramit,Singh,+9801345678
Shalini,Shah,+9801341876
2. If “program_name input_file column_no pattern” is executed, print the strings from the given
column only if the pattern is
contained in them.
Amit
Pramit
Amit
4. Now, instead of input_file parameter, a directory name will be given. The program should process
all the files contained
in the directory as done in problem 1 to 3.
test/contacts.txt:
Amit,Shah,+9800123456
Pramit,Singh,+9801345678
Shalini,Shah,+9801341876
test/newcontacts.txt:
John,Doe,+9800123456
Aman,Verma,+9801345678
Shalu,Singh,+9801341876
Output:
test/contacts.txt
===================
Shalini
test/newcontacts.txt
====================
Shalu
5. Now, do 1-4 for all the files in the subdirectories given directory name as a parameter. If no
matches were found
in any given file, make sure not to print anything corresponding to that file.
test
subdir1
a.txt
b.txt
subdir2
c.txt
d.txt
output:
test/subdir1/a.txt
==================
some_string1
some_string2
test/subdir2/b.txt
==================
some_string1
some_string2
Round 3 (PI):
Round 4 (PI):
. What happens when I type in a URL on the browser address bar and hit “Enter” ? Describe the entire
process.
. How does a web server work?
. How does a web server know which resources to fetch based on the request?
. What is DNS? How does a OS know which DNS server to make a request to? Explain DNS
hierarchy.
. Explain root DNS server.
. I was asked to explain the projects. Again, we had a detailed discussion on them.
. Explain the email architecture. If an email is sent from a yahoo mail account to a gmail account, how
does the email
actually get sent?
. What is virtual memory? What is the need for it?
. How to know the memory usage in Linux?
. How to know the memory usages by various processes in Linux?
. What is a semaphore?
. What is race-condition?
. What is dead-lock?
. What is indexing in DBMS?
Round 5 (PI):
Thanks Geeksforgeeks.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/endurance-international-group-interview-experience-on-campus/
Accolite Interview Experience | Set 5 (On-
Campus)
Accolite Interview Experience (On-Campus)
Round 1 (Written)
Around 190 students appeared for the online test which consists of 30MCQ’s to be done in
30minutes, questions were basically from data structure, networking, dbms, and 2-3 questions of apti
also. You need to pass out the cutoff in this round, also remember negative marking was there.
Round 2 (Coding)
After that online coding round was there in which 2 questions were given in 1hour.
Two strings i.e. one parent and one child string, you have to find how many child subsequences
can occur in the parent string, there can be different combinations if a character repeats itself.
For ex:
Parent[]= ABABDCAD
Child[]= AD
Then your answer should be 5.
I applied modification of LCS here and coded it.
Given a 2D matrix, you have to find maximum elevation of water and no. of ways to achieve it.
Water can flow in all four directions only if value there is less than its own. Maximum value can
be found out by subtracting the last value where you stopped from the value from where you
started. Consider all elements of the given array and not a specific position.
I applied DFS.
Tell me about yourself. Meanwhile he(interviewer) looked into my resume and asked about my
projects.
I have done 3 projects so he started discussing first of them which was a TLB website,semester
based library system made in PHP, he asked me to explain the working with proper approach
and algo applied in the main module of allotment. It lasted about 25-35 minutes.
Then he asked me to implement APPENDIX of the book(thick one, cormen types ). He told me
take your time and think. I first came out with hashmap and told him the approach and
complexity, then he asked to optimize it, I told him that it can be done by dictionary based
method and so I told Trie data structure with full code and complexity and he was satisfied.
About 30 minutes discussion.
Now the easy one, Tell whether a string is a rotation of another string in O(n). I wrote the code.
One array based question was also there which I don’t remember.
They took 2 rounds of all 4 candidates, then selected 2 for the third round, I was being one.
I would suggest that your approach and concepts must be strong as they always give questions with
some variations and tell them your thinking process and interact with them and ask more and more
questions.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/accolite-interview-experience-set-5-on-campus/
Goldman Sachs Interview Experience | Set
9 (On-Campus for Internship)
Goldman Sachs Interview Experience (On-Campus for Internship)
Interview 1(FTF):
Q1. Describe a semaphore and explain its working. How would you use a semaphore to solve the
producer-consumer problem.A blank sheet was provided to write the pseudo-code.
Q2. Given a binary tree , check if the value at the node is less than the sum of the values of its left and
right child, if so replace the value at the node with the sum. Code was not necessary; he demanded
proper logic for solving it.
Q3. Given a binary tree, write the code to convert the tree into its mirror image. I wrote the code on a
piece of paper and then the interviewer asked some questions about the working of the code. The
interviewer seemed to be satisfied with my answers.
Example:
Interview 2(FTF):
First of all he asked about my background and then proceeded with the questions.
Q3. Find the total number of triangles in a hexagon with edges connecting each vertex to another.
At the end he asked what are my subjects of interest and if I have any questions to ask.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/goldman-sachs-interview-experience-set-9-on-campus-for-internship/
Amazon Interview Experience | 216 (On-
Campus for Internship)
Amazon came to out campus a week back and this was the procedure followed.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-216-on-campus-for-internship/
1. Given a string with no spaces and random characters, we have to find that a given word can be
form or not if we start removing one character at a time. If one character is removed then it’s all
existences in the string will be removed. Print ‘Yes’ if possible else ‘No’. E.g. finding “hacker”
in “bhbalcdkqegr” will print Yes. We also need to consider that “hacker” characters should
come in order, I missed this case.
2. Given an array of 0’s and 1’s. Need to tell minimum number of swaps required to take all 1’s to
one side. Only adjacent swap is allowed.
3. Don’t remember. Was related to DP.
Started with OS
Coding
Asked to write a code to do defragmentation. Basically I converted this problem to an array which
contains 0’s for free space and Non-Zero value for used space. Wrote a code of O(n) to shift all non-
zero numbers to one side.
Write code to make mirror of a binary tree in-place. I said I already know that but still asked to code
it.
Write a method which will return me an array of size n every time(every time new).
Questions on static variables, malloc, calloc, pointers and how they work.
Wrote code on his own laptop and asked to find mistakes (static variables and pointers related).
+more
Internship
Puzzles
Make a string tokenizer. A string with it’s length and token character will be given, now return a
2D array which contains sub-strings of that string separated by that character and stored at
different rows of array.
e.g “I am a CSE student” and character is space, so now return-
I
am
a
CSE
student
this should be in a 2D array but ‘NO EXTRA SPACE SHOULD BE USED’. Here you can’t use
a 2D array of 5×8(including ‘\0’). Hint: Use an array of pointers, each pointer in array will point
to variable length string.
Now write a method which will free the space used by above 2D array.
Which data structure you will use to store phone directory so that you can access a person’s
number in shortest time?
You are given a file which is a phone directory containing Name and phone number in each line
of file. Now give me an efficient algorithm to find a person’s number in shortest time. You can’t
use much space. You can jump to any line by use of seek. Hint: Do a pre-traversal of file.
I made a 2D array of 26×26 size with a-z and a-z perspective and stored the starting line number
of names starting with these characters in pre-traversal and then did binary search to search in
between. E.g searching “ram” will appear between “ra*” and “rb*”.
You are given two files A and B, and each contains a number in each line. Print A-B. Consider
number are sorted.
Write a method which returns hexadecimal representation of a given integer. Easy but same “No
space to waste” so size of returning array was main. Different in case of 32bit and 64bit
systems.
Questions on memory allocation and pointers.
Reverse words in a string. I Said I know this.
What will be the number of unique factors of (p^a)*(q^b) where p&q are different prime
numbers and a,b>0.
Write a method returning pivot position in quick sort where initially I will be taking first value
as pivot. I Said I know this.
I had not asked any questions in the PPT so he asked why I not asked any questions and I was present
or not.
Next he opened my answers of the online test and asked why my all test cases not passed in 1st
question(10/13 had passed) and why I didn’t attempted 3rd question.
*Can be the case that I missed many questions but these are the only one I remember.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-experience-set-25-on-campus-for-mts-1/
Amazon Interview Experience | 217 (On-
Campus)
Hi everyone …Following is my experience for the recent recruitment drive of Amazon in our college.
1) Given two string Str1 and Str2, Find whether any anagram of Str2 is a sub-string of string Str1
(Case Insensitive) then return True otherwise False.
For Ex:if Str1 = Amazon and Str2 = zmao, Output: True
2) Given n non-negative integers representing an elevation map where the width of each bar is 1,
compute how much water it is able to trap after raining
For example,
Given [0,1,0,2,1,0,1,3,2,1,2,1], return 6.
I did it in O(n2) and then interviewer ask to optimize it then I optimize the code but still it is O(n2)
but the interviewer was satisfied with the solution.
TIP: Interviewer should understand your code properly. So write code neat & clean.
1) Again the interviewer ask the same question: Find the next greater element in array. I told him that I
did it previous round then interviewer tell me that it is good u told me about this.
2) Given the mathematical expression. Check for balanced parentheses in an expression with
constraint of precedence like
[2*{3+4}] = True;
{2*[2+4]} = False;
1) Consider a row of n coins of values v1 . . . vn, where n is even. We play a game against an
opponent by alternating turns. In each turn, a player selectseither the first or last coin from the row,
removes it from the row permanently, and receives the value of the coin.
Determine that the user move first or second so that he will get the maximum possible amount of
money
I gave him the recursive approach for this then he ask for optimize code for this then I make DP for
this.
2) Consider a 2-D map with a horizontal river passing through its center. There are n cities on the
southern bank with x-coordinates a(1) … a(n) and n citieson the northern bank with x-coordinates
b(1) … b(n). You want to connect as many north-south pairs of cities as possible with bridges such
that no two bridgescross. When connecting cities, you can only connect city i on the northern bank to
city i on the southern bank.
I have no idea about this question I think 10 minute and told the interviewer that I’m unable to solve
this. But the interviewer asked for my approachthen I gave him brute force solution for this and
Interviewer asked for the code. Then he told me to optimize the code then I gave recursive approach
for butstill complexity is exponential and Interview asked me optimize this and again I think for half
an hour &arrive at solution that in DP with extra space. Buthe still wants better solution and gave me
five minute more. Then in the five minute one best solution strike in my mind and told to interviewer
and he ishappy with effort then he ask to code.
TIP: What I learned from this round is that Push yourself to the edge. Give something different or
better than geeks
1) Some project discussion in brief and some question on project like what is your role, what
difficulties you faced, and future scope.
2) Find minimum height of tree (I gave him two approach using 1) simple 2) using level order)
4) Given an input file with four billion non-negative integer. Provide an algorithm to generate an
integer which is not contained in the file. Assume you have 1 GB of memory available for this task.
Firstly I have no idea then interview is giving me hint and I give my approach using bit vector by
mapping all integer from this bit-vector.
1) He give me an API function that increment the counter when the client access this. And told that
two client simultaneously accessing this API function. Then they get ambiguous value of counter. Why
this is happening?
I give him Peterson solution and semaphore solution for the critical section problem.
3) One more DP Ques: Remove minimum elements from either side such that 2*min becomes more
than max.
I gave him geeks solution but he ask that Have u seen this problem before? I said yes then he ask to
code the recursive approach for this I write it
Correctly. And He was satisfied.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-217-on-campus/
Walmart Labs Interview Experience | Set 3
(On-Campus)
Walmart Labs Interview Experience – On campus
One coding question was – given arrival and departure time of guests in a party … find no of plates
or something .Similar to this http://www.geeksforgeeks.org/minimum-number-platforms-required-
railwaybus-station/ . (30 marks)
2nd (20 marks) adhoc dont remember
3rd (50 marks ) dont remember
IMP POINT – There was cutoff for both mcq and coding questions so u need to clear both of these
sectional cutoff .
1.Started off with discussion on my projects . He scanned my resume and asked questions based on
my projects . I had done web designing so he asked me to draw the schema of my database used and
asked abt the tables nd data in them .. why this .. why that .. .The interviewer kept on asking abt web
designing like scaling website , distibuted servers , and lot of other new questions . He wanted to
know how I would scale my website for millions of people . Since walmart is all abt a serving for a
lot of people so be prepared for such questions .
2. Hashing , probing , collision , hashing with chaining , cache memory with discussion , LRU cache
with written code(on paper) , Hashtable , Hashmap implementation with code (on paper) .
4. Google autosuggest .. Trie tree with code (on paper) , he asked me to further optimize then I told
ternary tree nd explained operations with an example .
1. Common HR questions why Walmart , strength , weakness , about urself apart from resume etc .
For walmart – Prepare what u have written in ur resume .. they really look deeply into resume . Keep
discussion going on with the Interviewer .
Thanks geeks4geeks
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/walmart-labs-interview-experience-set-3-on-campus/
Adobe Interview Experience | Set 26 (On-
Campus for MTS-1)
Adobe visited our campus for full time Member of Technical Staff-I (MTS-1)
Question 2) A CEO of a company wants to keep his employees happy. He can keep them happy if he
has enough cookies in the pantry that are required at any time.
The values at ith position indicates how much candies one person needs.
A value Ci<0 means the employee needs cookies otherwise he keeps those cookies back in pantry.
Input
-5 4 2 -1 -6 -1 0 5
Output
8 (it should have been 7 but 8 was given so had to print ans+1)
Question 3) you are given the heights of n towers and a value k. You can either decrease the value of a
tower by k or increase the value by k. You have to tell the minimum difference between the maximum
and minimum height tower.
Input
35
7 -7 4
Output
4
Round 2
24 students were shortlisted out of a potential 200 students.
I was asked 4 questions.
1) tell whether a string of parenthesis is valid or not.
2) you have an the heights of the bars given in an array first you have to tell the amount of rain water
trapped between the bars and then he extended the question to finding the block with maximum water
trapped.
3) print all the permutations of a string with and without repeating characters.
4) implement and tell the complexity of inserting a value in a vector in c++.
Round 3
This round was the toughest round.
First i was asked to design a spell checker. I used tries and implemented most of the functions.
Then i was asked a few OS questions like difference between process and a thread etc.
Then i was asked what happens when you type a URL in your web browser.
Then he asked me a question on finding an element in a 2D matrix which is sorted column and row
wise.
Finally he asked me to design a web browser and cover every aspect of it.
Round 4:
This round was based completely on my past internships and projects.
A few questions were which project or internship excited you the most.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-experience-set-26-on-campus-for-mts-1/
1) Given two string Str1 and Str2, Find whether any anagram of Str2 is a sub-string of string Str1
(Case Insensitive) then return True otherwise False.
Test case :if Str1 = Amazon and Str2 = omaz, Output: True
2) Given n non-negative integers representing buildings where the width of each bar is 1, compute
how much water it is able to trap after raining
For example,
Given [0,1,0,2,1,0,1,3,2,1,2,1], return 6.
3) Given a binary tree where each node contains three pointers left,right,succ, where succ pointer is
pointing to any of its successor node , the question is if any of succ pointer is pointing to its
predecessor node then make that pointer NULL.
4) Given an array that represents the runs scored by a batsman and we have given the total score ,now
we have to find out in how many ways can batsman score the run.
First I have given the recursive solution than interview asked me dp solution, I told him DP approach
he was satisfied.
5) Find Loop in a linked list and remove it.
6) You have 100 songs to play in a shuffling mode how will you play.
Interview want full working code for each question for last question he wanted only approach.
1) Given a source string and a destination string and a dictionary consisting of various words write a
program to find minimum length path to travel from source to destination. Rules for traversing:
1. You can only change one character at a time
2. Any resulting word has to be a valid word from dictionary
Example: Given source word CAT and destination word DOG , one of the valid sequence would be
CAT -> COT -> DOT -> DOG
Another valid sequence can be
CAT -> COT – > COG -> DOG
One character can change at one time and every resulting word has be a valid word from dictionary
I told him a approach using graph.
2) What is hashing.
1) A kind of celebrity problem you have n person where one of them is celebrity
condition are all non-celeb person knows celebrity and celebrity can know few other persons and all
non- celeb persons can know few of them among each other so you have to find celebrity.
2) Given a binary tree and two nodes print the path between the two nodes of binary tree.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-218-on-campus/
Interview Experience with Alcatel Lucent
(Bangalore) for Software Engineer
Round 1:
Interviewer was very cool guy, he started with general discussion about work and company. Later on
he started with Technical Skills.
1. Operator Program output (i.e. i++, –i, i,++i).
2. Strings equal method and “==” programs Output.
3. Single Design Pattern (Lazy and Eager Loading)
4. Consumer Producer Problem, Using Thread
5. Create a Java class which can validate HTML file.
6. Reverse Of Link list without using API
7. Stack implementation
8. Basic of serializations.
9. Sorting of IP address, using Java IP libraries.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/interview-experience-with-alcatel-lucent-bangalore-for-software-
engineer/
2)Given a Word
To find all the anagrams of the word in a given sentence .
3)Given a sentence . To increment the count for each character , if that character is coming in a word
(from the given sentence) more than once .
Eg:
Given sentence : mississippi River
result : the counter array
i=1;
p-1;
r=1;
s=1;
Round 3:(coding)
Was asked to code all questions from the previous round(r2)
Though got eliminated pretty early.. This was a great interview experience..
Thanks to geeksforgeeks..:)
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/charge-bee-interview-experience-on-campus/
First Round
There were total 15 MCQ questions based on c, c++ pointers java output and one was on resource
allocation graph. This round was on cocubes
Second Round
Around 60 people were selected and there were two coding questions
1. In a given array find i & j such that arr[j] > arr[i] and j-i is maximum
2. In a binary tree find product of all sum of values in a leaf node at same level
This round was again on cocubes
Third Round
Around 35 people were selected two questions were asked
1. In a BST two node values are swapped . Restore original BST
2. Given a sorted array find pairs such that their sum is closest to the given value
This one was on pen paper
Fourth Round
Around 20 people were selected for it
There was a single question it was expected to write code on a paper
Given a number find next bigger number by permuting its digits
After i solved this interviewer asked me to modify my algorithm for negative numbers
Final Round
There were 15 people
Interviewer questioned every one personally
Here are the few questions
1. Given a stream of running characters you have to identify anagrams and store only unique strings in
a file
2. Given inorder and preorder traversals construct BT
3. Link-list is given it contains red, blue and green balls only sort it in place
Then some general questions were asked. Interviewer asked us to ask him something about microsoft
and what will be work etc.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/microsoft-idc-interview-experience-set-66-on-campus-for-internship/
1) Allocate memory to a 2d array dynamically and return the pointer to that array..
2) Reverse all bytes of an integer
Example 1234 where 1,2,3,4 are bytes should be reversed as 4321
(Reversing the bytes )
3) Reverse all the words present in the sentence
4) Find the kth smallest element in a BST
5)Given a linked list reverse every k nodes of a linked list..
150 wrote this round and around 30 were shortlisted for the second round
After every hour looking at the progress few people were rejected straight away..
This unix file system question in round 2 is a traditional question asked in CommVault for Years now..
People aspiring for commvault do practice this question.
Round 3:
The 2 shortlisted students had a technical interview covering basics and finally they gave an intern for
one guy
This guy was later called to their office in banglore and had further rounds £(
Finally waz given a hard earned job offer..
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/commvault-systems-placement-experience-2/
Paypal Interview Experience | Set 1 (On-
Campus)
Recently PayPal visited our campus..
Round 1:
20 math apti 20 mins (moderate ones)
Round 2:
1) about myself
2) project 1 in and out
3) project 2 in and out
4) rotation of an array ( r1 ques )
He asked me why did i go for element by element rotation and
He asked me to state an improvised version of the same .
5) given a number find its roman eqivalent
6) Acid properties
7) Draw an entity relationship diagram for a student enrolement system.
Round 3:
1) how would you rate yourself in Dbms
2) Draw an entity relationship diagram for a airport management system.
3) Your strength and weakness
4) what is your biggest critics
5) toughest decision you have made in your life
6) how would you see yourself in five years
7) why should we hire you
After this round 5 were given full time job offers and 2 were given internships
I just thought the interview process could have been organised in a lot of ways..
Thanks gfg
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/paypal-interview-experience-set-1-on-campus/
Round 2 : an hour technical discussion regarding areas of interest and all fundamentals of electronics
like communication, wireless, circuits etc
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/rockwell-collins-campus-interview-experience/
2. Tees Mar Khan (problem name) :-given a matrix , you have to rob maximum value . you have to
start at topmost left corner and reach to last corner. you can move either right or down.if any house is
robbed then u can’t robbed next right or down house (i.e. adjacent house).you can rob diagonally
located house
3. The subsection DEBUGGER expects you to understand the given code and fix the bugs.the problem
is Sudoku Checker
4. API coding related with trie. u have to complete some functions .I don’t remember the question.
Test was of three hours.
2. Design round:-
It consists of a networking problem and u have to complete the problem with given constraints.
Basically u have to transfer a file from sender to receiver line by line using server as
intermediate.They have already implemented the
socket programming and we had to complete the sender and receiver code.
3. Debugging round:-
This round contained one question. You have to understand the problem and you have to debug it.The
problem is reverse DNS lookup.
After these two technical rounds, 11 students were shortlisted for next round. I was one of those lucky
ones.
Second last round started at 9.00 p.m. and ended at 10.10 p.m.
4. Project round:-
Discussions on college projects, about my internship which I had done in Mebelkart.com.Then he
gave me a case of online test website.
I have to design the DBMS structure .I designed the DBMS structure . Then he added some constraint
and I had to change the DBMS structure to satisfy the given
constraints.
Last round started at 10.20 p.m. and ended at 12.10 a.m.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/drishti-soft-solutions-interview-set-4-on-campus/
Drishti-Soft Solutions Interview | Set 5 (On-
Campus)
Drishti Soft Solutions Interview Experience (On Campus):
Round 1: (3 hours)
1st reflects the light in left if light coming from top and visa-versa.
2nd reflects the light in right if light coming from top and visa-versa.
3rd reflects the light in right if light coming from bottom and visa-versa.
4rd reflects the light in left if light coming from bottom and visa-versa.
5th blocks the light.
Input: Given matrix filled with 1, 2, 3, 4, 5(represents types of mirror) or 0 (represents dark area).
Also given initial direction of incoming light (top, bottom, left or right).
Example: 2 + 3 * 4 = 14
3) Bugger question: There was some logical error in the question given below just debug them.
http://www.geeksforgeeks.org/minimize-cash-flow-among-given-set-friends-borrowed-money/
All questions were to be attempted in C or JAVA. 21 were shortlisted from 200 students
http://www.geeksforgeeks.org/backttracking-set-2-rat-in-a-maze/
Tips: Take time and understand the code properly and cover all the test cases .Stick to the code and
don’t change the complete code.
This was the toughest round as it covered the practical implementation of concepts like packet data
transfer from networking part, cryptography techniques.
Problem Statement: There are two province Jaipur and Mewad both are communicating by
messenger. The province Jabalpur is server which alters the message between the two provinces.
We were given code of connection between sender and server and server and receiver. Firstly we
were asked to understand and explain the given code .I told my approach and he seemed satisfied
with it at once. Then I was asked to implement it and write a client program that checks the
correctness of the message (messages received were either not in order or there was duplicity).
This round lasted for about 3 hours. 6 among us were selected after this round.
First I was asked to explain my project. He went through it thoroughly. He also asked me to write a
module of my project and find BUG in it. I gave him many approaches and he seemed satisfied at last.
And he also switched in to the design round question in between and asked how you will
communicate if there is no server between sender and receiver. Again my approach seemed good to
him.
The round went for around 2 hours. Finally 4 students were shortlisted after this round.
As I entered he asked if I have any question related to the company, the work it does. Since I had
visited the company website before, I asked about the difference in the approaches for designing
different product.
The he asked me about educational and family background, strengths and weaknesses.
Luckily there was no language barrier which helped me a lot. Most of my conversation went around
in Hindi.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/drishti-soft-solutions-interview-set-5-on-campus/
Amazon Interview Experience | 219 (On-
Campus)
Amazon came to our college. Here is my interview experience. There were total 5 rounds.
2) Given n non-negative integers representing buildings where the width of each bar is 1, compute
how much water it is able to trap after raining
For example,
Given [0,1,0,2,1,0,1,3,2,1,2,1], return 6.
3.A tree is stored in an array such that value stored at index I is parent of node I. Firstly gave an
nlog(n) approach as it came to mind first. He said to code it(coded it), then he insisted to optimize the
solution with worst case time complexity O(n), then we discuss the DP solution he agreed on the logic
and asked to code it (coded it).
3.Find lowest common ancestor in a binary search tree of nodes A and B. He asked if I have seen this
problem already I replied in affirmative, so he asked me to code it quickly, I coded it. But he asked
what if node A or B or both are not present, I said this code wont work but we can first check it both
nodes A and B present then we can use this code, he was convinced n moved to next code.
5.Find max distance between any two nodes of a binary tree with at most a single bent. We discussed
a lot over this question then he asked to code my approach which we discussed, while coding I found
it was the wrong one, I told him that this approach wont work. At last he said to leave this problem n
moved to next.(only questions I couldn’t solve)
7.find frequency of words in a paragraph I suggested at first a hash than trie n he was satisfied with
the answer.
2.) A service is requested by fixed number of customers (limited 5-10 ). If the service fails at time n.
Find frequency of requests made by each customer 10 minutes prior to failure of service. I suggested
a DS made up of queue and map.
3.)given a set of classes and their dependencies, return if this given set can be BUILD(compiled) with
or with out error.
class A:B C
class B:D
class C:E F
class D
class E:A
class F:G
class G:A
return error as classes A,C,E depends on each other.
I said questions same as find loop in a graph he agreed n asked to code.)coded it)
round 4(subject round)(2hrs)
1.)The answer sheets of previous interviews are passed on to next interview as my 3rd interviewer
did not had my answer sheet of 2nd interview he asked me about the questions asked to me in the last
interview.
2.)consider a service running on a server for a customer c1,but customer c1 times out after s sec for
what so ever be the reason so customer again fires the same request ,so server is running duplicate
query hence it gets overloaded, resolve this glitch. Some how I managed to give a solution which he
said is very similar to the solution he himself implemented to resolve this glitch.
3.)given a tree find sum of all the numbers formed by appending the data of nodes from root to leaf
node. In a single traversal of the tree.
Eg:
1
/ \
2 3
Return 12+13=25
I solved it using a reference variable to store final solution and an variable passed as value to store
up to current node*10,thus add data of current node to this variable to get number formed till this node
if current node is a leaf then add it to variable passed as reference.
4.)Any idea about scheduling algorithms and there types.
5.)Given a matrix of 0’s and 1’s,find the maximum size of the square formed by 0’s.
1111
1000
1001
0000
Return 2.
coded it by flipping all zeros to ones and ones to zeros than ques similar as given on GFG.
6.)what is mutex?
7.)given words of a lexicographical order of an alien language find order of characters in the
language.
I said I have seen this problem it is of topological sorting and he proceeded to next question.
9.) Find all possible interpretations of an array of digits. I proposed a solution I was asked to code it
I coded it but he pointed out an error for test case containing zeros like 10,20,2010,so I handled the
case of zero.
2.)I had one project on web crawler so I was asked what changes will you make to this project to
scale it.
3.)another project was an android game similar to duck shooting(video game) was asked to tell the
difference between the 2.
4.)I was asked to tell how to copy last 10 lines from a file, he kept on asking for other methods (I
answered around 10 different ways).
5.)add and subtract two numbers without using + or – operator.i was asked to code it.i used xor and
binary and to solve it, then he asked to prove this method works.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-219-on-campus/
Drishti-Soft Solutions Interview | Set 6 (On-
Campus)
DrishtiSoft came to our college. Here is my interview experience. There were total 5 rounds.
Round 1 (3 hours):
section 1:
30 Aptitude questions.
section 2:
2 coding problems:
1.Given mathematical expression in form of string.Evaluate this expression.
2. given five types of mirror having some reflecting edges and are placed in n*m matrix and a
direction from which light can incident on the matrix. you have to find the total cells which will be in
the dark.(hint: use dfs in all the directions).
1 debugging problem:
min cash flow problem from geeksforgeeks.
1 designing problem:
we were given a functionality to implement and some functions were already implemented.
we have to read the code and to complete the
2 functions.(problem at the first sight seems to be hard but give it a try as it was the simple
one).
Round 2 (1 hour) :
It was debugging round. we have to debug the rat maze problem of geeksforgeeks.
Round 3 (5 hour):
It was a Designing round.
In this they had made a server which manipulates the conversation between the sender and the
receiver. we have to make the code which can fix
this bug but we cant change anything in the server.
after fixing the bug we were asked about the networking concepts which can be applied to this
problem.
Round 4 (2 hour):
First they started the discussion about OS. all the concepts related to process synchronization,
critical section problem. Asked to write
the code about producer consumer problem. Concepts related to memory management .
After this they started discussion related to my projects.(whether they know about the project or
not they will come up with a question
which you haven’t thought while making your project so be well prepared with your project).
PS:If you want to clear Drishtisoft interview geeksforgeeks wont be enough as there were only two
questions asked from this.It is programming
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/drishti-soft-solutions-interview-set-6-on-campus/
Amazon Interview Experience | 220 (On-
Campus)
Amazon visits our campus for recruitment. Here I am sharing my experience of the whole process.
Round 1:
First there was an online round on hackerrank and consisted of 20 mcqs and two coding questions.
mcqs were mainly from c/c++ input/output DS, OS .Here are those two coding questions:
Ques1: An array containing heights of building was given. Its a rainy season. Calculate the amount of
water collected between all the buildings.
Input: 1 5 3 7 4 2
Output: 2
Ques2: Two strings are given check if anagram of one string is contained in other string.
Ques1: In a party of N people, only one person is known to everyone. Such a person may be
present in the party, if yes, (s)he doesn’t know anyone in the party. We can only ask questions like
“does A know B? “. Find the celebrity.
http://www.geeksforgeeks.org/the-celebrity-problem/
Twist: this time celebrity may or may not know some persons in the party. Suggested him O(n^2)
approach. Using stack we can minimize comparisons.
Ques2: Given an unsorted array that contains even number of occurrences for all numbers except two
numbers. Find the two numbers which have odd occurrences in O(n) time complexity and O(1) extra
space. Told him that I know its approach already. He asked me for the approach.
http://www.geeksforgeeks.org/find-the-two-numbers-with-odd-occurences-in-an-unsorted-array/
Ques3: An array of size n-1 is given contains numbers from 0 to n. Find the two missing numbers in
O(n) time and O(1) space. Suggested him method given in :
http://www.geeksforgeeks.org/find-the-smallest-positive-number-missing-from-an-unsorted-array/
He starts with my introduction and some questions on classification as in my machine learning project
I have made a classifier.
Ques 1: Find next Greater element for each element of the given array.
http://www.geeksforgeeks.org/next-greater-element/
Ques 2: Find if a binary tree is BST or not. Suggested method 3 given in this post.
http://www.geeksforgeeks.org/a-program-to-check-if-a-binary-tree-is-bst-or-not/
Ques 3: Given a matrix calculate minimum cost path to reach from top-left to bottom-right. Suggested
him the dp approach then he asked me if this will work with negative edges or not. I said yes it would
work.
He then twisted the question a bit…now one can move in either of the four direction left,top,right and
bottom and can contain negative edges. Suggested him recursive approach having exponential time
complexity. Asked me in which case it won’t work. After sometime told him if it contains negative
cycle. I think it can easily be done with graphs.
Ques 4: coins are lined up (eg. 100 200 50 2) Two players playing this game can pick a coin from
either of the left or right end. Player with maximum sum will win. Both players are optimally playing
the game. You have to tell that whatturn(1 or 2) should be chosen in order to win. Like in above
example if you play first then can select coin 2(you want to get that 200 coin to win).
He started will “tell me about yourself” and then he asked me about “Virtualization” one of my
project. A long discussion on the same. Questions like what happens if he wants to have a trace of his
previos work and other project related questions.
Ques 1: Sort a 2GB file line by line. Avoid use of extra space (or use minimum space).
Suggested him solution with trie but he said it would take space if there are no common prefixes.
Then i gave him a solution with hashing(store hash value per line and sort it) but he was not satisfied
with time complexity) then finally suggested counting sort. As we can have only 256 different
characters at max in any line. Time complexity was O(n*m) n no of lines and m no of characters per
line. Satisfied =D.
Ques 2: He gave me a small code to debug. Below code is having four bugs.
Unsigned inti;
For(i=100,i<=0,–i)
Printf(“%d\n”,i);
Ques 3: What happens when you hit your college url. Describe all steps. Then he asked some
questions on networks like http, tcp, port, switches etc.
Ques 4: Print all permutations of a string. Asked me for the approach and code it.
Long discussion on my summer internship project. Project was on “Machine Translation” (translation
of one language document into other language). Mine was converting English to Hindi. Asked me for
the approach and discussion on the same.
There are number of clients requesting pages of a service. Find number of pages requested by clients
in each 5 minutes. Gave a solution with queue using linked list and map.
Then a long discussion on my minor project which was on machine learning. The interviewer was
having deep knowledge on machine learning So he asked me a lot on the same. Then he asked me if I
have studied it as a subject. I said no. He said “that is what I wanted to know”. He was impressed
with my projects.
Hope this experience would help you to prepare for the company. GFG helped me a lot, a great site
with almost all stuff to prepare for the interview. Best of luck J keep coding J
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-220-on-campus/
Oracle Interview Experience | Set 15 (On-
Campus)
I find GeeksforGeeks very helpful! It helped me prepare for my Oracle interview, thanks to the
previous contributions by many.
Pattern:
1. Written round
2. Analytical reasoning round (Written)
3. Coding round (Written)
4. Technical interview I
5. Technical interview II
Written round:
Analytical reasoning:
4 questions – 30 minutes
Coding round:
1 question – 30 minutes
Students whose performance was top-notch in analytical were directly sent to the interview round. I
was promoted to the 4th round
Technical interview:
Interviewer went through my resume and asked about my projects right away
1. Did you face any challenges with your project? If yes, what was your approach to solve it?
2. How did you optimize your code?
3. Do you plan to extend your project?
4. What else are you planning to include in your project?
5. Why did you choose Java for your project?
6. What are the OOP concepts (explained in detail for about 7 minutes)
7. Write a program to check if a given string is palindrome (Had to do a dry run of the code and
explained its complexity)
8. Explain HashMap and HashTables
9. What are collection classes?
10. What is hashing? Explain various hashing techniques
11. What are collisions in data structures?
12. Explain various search techniques
13. What are the JavaScript concepts that are similar to Java?
14. What is Google Student Ambassador (GSA) Program all about? (I am currently the GSA of my
campus; explained about it for 5 mins)
15. What all did you do as a GSA?
16. What technologies were used in your events?
In between, I was asked to tell about myself and anything else I’d like to let them know, basically to
avoid the void while the interviewer was thinking of questions.
Interview II – HR + Tech.
– Panel of 2 members
– Went on for about 50 minutes
1. Tell me about yourself
2. At which level do you play badminton (I mentioned in my previous answer that I play badminton)
3. What is it that you like about yourself?
4. What don’t you like about yourself?
5. What don’t you like about others?
6. How good are you in programming on a scale of 1 to 10? (I told 7 to 7.5)
7. Write a program to reverse a string (Wrote and explained my code with a dry run)
8. Asked more about Google Student Club, Technical events we conducted
9. More questions about my marketing internship at Viber
10. What is Big Data- Hadoop? (It was in my resume as I had presented on the topic)
11. What’s your favorite subject? (Java)
12. What is multithreading in java?
13. (Other interviewer) What’s your favorite subject? (Data Structure and DBMS)
14. DS: Given that you are standing on a floor in a building having ‘n’ elevators, design a system such
that on pressing a button, the elevator on the nearest floor to that of yours arrives. Which data
structure is to be used and how is it implemented?
15. What is normalization in DBMS?
16. Does 4NF exist?
17. Difference between 3NF and BCNF?
18. How to convert 3NF to BCNF
19. Anything you would want to know from us?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/oracle-interview-experience-set-15-on-campus/
Amazon Interview Experience | Set 221
I gave my round 1 amazon. There were two coding questions.
1) Given an integer n in the input, find its next sparse binary numberA sparse binary number is a
number whose binary representation does not contain any consecutive 1s.
For eg.
72 is a sparse binary number, because its binary representation (01001000) does not contain any
consecutive 1s.
17 is a sparse binary number, because its binary representation (00010001) does not contain any
consecutive 1s.
Similarly,
12 is a non sparse binary number, because its binary representation (00001100) contains consecutive
1s.
43 is a non sparse binary number, because its binary representation (00101011) contains consecutive
1s.
Now, given an integer n in the input, find its next sparse binary number. n itself can be sparse or non
sparse.
Online mcq, there were around 20 and 13-14 were from geeksquiz.com
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-221/
Zoho Interview | Set 6 (On-Campus Drive)
Zoho visited our campus in the month of July.
First round: 15 apti and 15 c output questions. No negative marking and no multiple options. Believe
me, this is the only way to avoid people coming into the next rounds based on luck.
Q2. Given a string of integers find out all the possible words that can made out of it in continuous
order. Eg: 11112
ans: AAAAB
AKAB
AAKB
AAAL etc.
Q3: Find whether a given number is magic number or not. It is something which gives same digits
even after cubing it.
Q5: Given two numbers and an operation either + or – , perform the operation.
Now remove any zeros if present in the two numbers and perform an operation. See if the result
obtained is same or not after removing zero’s in the original result.
Q1: Given a matrix dimension find the shortest path between two points.
Q2: shortest path between two points and a monster is present. So we have to avoid the monster and
take a shortest path or die.
Q4: same as Q2 but trigger is present so we can take the trigger to shoot the monster anywhere in the
maze.
Q5: this is the tricky part. There are many holes in between. we should avoid them and take the
shortest path.
Fourth Round: Tech interview. Mostly who got selected to the interview got placed. Simple
questions, puzzles, oops concepts, some general os and other computer science related questions.
Fifth round: Tech interview. Questions on projects,internship and again simple questions on oops,
dbms etc.
Source
http://www.geeksforgeeks.org/zoho-interview-set-6-on-campus-drive/
Amazon Interview Experience | Set 222
Aptitude Round: (1:30 hours)
20 MCQs
MCQs on OS, maths aptitutude, and algorithms etc . Few output questions on pointers. Do have a look
at old GATE papers and you may get some seen questions
Given an array having positive and negative numbers. Rearrange the array in such a way that
positive and negative numbers are then alternate
Eg – Input : { -3, 1, 5 , 7, -4, -7, -6} Ouptut : {-3, 1, -4, 5, -7, 7, -6} (Question demand;ed that
order of the elements should not change)
A similar question is given in geeksforgeeks with O(1) space but that uses quick sort concept
which is not stable and hence order gets changed in many test cases.
I used simple approach of dividing array in two parts of positive and negative numbers and then
merging them one by one which worked.
Convert a tree into it’s sum tree
http://www.geeksforgeeks.org/convert-a-given-tree-to-sum-tree/
Interview:
Round 1:
Create links in an N-ary tree(N not fixed) into a tree where children of every node are having
next pointer connected to it’s siblings in a spiral fashion.
Also on level 1 right most node’s next pointer should point to level 2’s right most node and in
spiral way taking upwards root’s next should point to left most child.
I used two stacks to do the problem. The interviewer asked me to code it, I couldn’t complete
but she was convinced with my approach.
Round 2:
It had easy questions, maybe they wanted to check coding skills for known problems. And also
asked about projects.
Given two strings then check if they are anagrams or not. (Character set is not just 26 alphabets
it can special symbols like $ % ! )
Also if strings have spaces then also they are anagrams like “adf ds” & “addfs” are also
anagrams. I implemented it in Java using HashMap.
Given two sorted linked lists, merge them into one linked list (Both iterative and recursive code)
Round 3:
Tell me about your favorite subjects. I told Data structures & Algorithms , Number Theory &
Cryptography. He asked me about different attacks possible on a website page. And asked me
about what is man in the middle attack. Maybe he just wanted to check my knowledge on my
areas.
There is a society which has 8 parking slots and there are 7 cars. Each car is supposed to be
parked in some fixed position and one slot is needed to be left.
Example – Let { A ,” “, D, E, B, F, G, C} be the perfect arrangement. But society people never
follow the rule and park in any position. Your work is to design a strategy which arranges the
cars in perfect arrangement at the end of the day having minimum number of swaps. I was able to
solve only this one question in this round. I used to strategy that :
1. I’ll first find the empty slot and will check if there is some car should be placed in that place
properly and will swap the car.
2. In case the empty slot is at correct position then I’ll find an improperly placed car and place it
at empty slot and then will continue with step 1 iteratively till I get the perfect arrangement.
Round 4:
This was the round with main person who had come with Amazon team. He was taking interview
since morning and had seen me with my friends discussing about interviews conducted by him. It was
7:30 in evening when my interview was about to start so while going to room in lift he asked me that
if I know any of his questions. I honestly told that yeah I know about a few. He asked me about them
and their solutions. One was similar to question 2 of round 1. Another was arranging a list of lists. He
said that he will ask new questions now
Again a modification of binary search : Ex : {c,f,k,v} Now given an input for element we have
to print the element next to it in array (even if it is not present)
Input Output
a c
c f
j k
v c
Then he asked me something about my challenging projects. Some project where I had to do
submission in a fixed deadline. Also asked if I take part in online coding competitions.
Then he asked simple question of finding maximum sum subarray (Kadane’s algorithm). I did it very
quickly so he asked another question to find next greater permutation. I gave the algorithm and coded
it.
Final question he asked that like in github when we save a code it makes commit points. So if some
code has been saved multiple times and has many branches divided and then getting merged. We have
to find the least common parent of two given commit points.
It is similar to a linked list which is getting divided and then getting merged again number of times.
I have a table given for parents of a node in chronological order and we have direct access to parents
too.
Ex – In this case
Node – J I H L K G F D E C B A
Parent – I H G K G F D,E C C B A NULL
Given if I/P is (H, L) the output must be G. It seems similar to LCA concept of trees but it is a slight
modification of it. I told about concept of stack that I’ll search for given nodes and will then store in
two stacks and will pop till I get same value from stack. This popping I’ll do according to
information of table of node- parent.
I was not able to complete it but was able to show my approach and I handled the corner cases. He
was satisfied with it.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-222/
Morgan Stanley Interview | Set 16 (On-
Campus)
First round of the process was online test:
Total 19 questions on Hackerrank platform:
(i) 17 MCQ based on mostly basic data structures and algorithms, few on numerical ability, few on
verbal reasoning
(ii) 2 Coding questions
2) Given list of students with their names and marks, which sorting algorithm and data structure is
preferrable for sorting marks in descending order.
4) Design a database given following details: A company like Morgan Stanley has got many clients
like HDFC, and other companies. Each client company has got many employees. We need to design
databse to search efficiently the following details:
-> Print number of representatives for each company along with details of the company(like client ID,
and some other usual details) using sql query
My solutions:
1) Malloc just allocates memory and calloc also initializes it.
2) I designed it with sturcture(in C++) and wrote code for quicksort. Then I was asked about the
reason and time complexity for that along with details of random pivot.
4) Two tables: (i) Clients(ClientID, ClientName, ClientDetail) and (ii) Representatives(ID, Name,
ClientID), followed by SQL query to get details using inner join. Then I was asked about the reason to
choose inner join and not outer join. I gave reason that, there won’t be any client without
representative and and representative without company.
Interview process for some of my peers also includes the topics like : database design, sorting, data
structures for various applications like social media website, immutability in JAVA, OOP concepts
like virtual functions and destructors, inheritence, etc.
Group Activity:
We were divided into two groups of 4 and 5. We were provided two blank sheets, clay, lego toys. We
were supposed to represent one startup idea and build prototype for it. Design logo, name, and key
features and related stuff. Every member has to partiticipate in presentation. We were given total of
30 minutes followed by some questions like whom will choose as a team leader. Team leader was
asked to choose the one whom he will remove from the team and whom he will take from other team
with reason.
Interview 2(Technical):
1) URL shorterning algorithm for customized URL and random URL service like tinyurl.com provides
and some questions related to hashing for string as I described hashing for URL shorterning.
2) Data strcuture for snake & ladder game followed by code for finding minimum number of dice
rolling required to reach the finish of the game from starting location.
3) OS concepts of virtual memory and its applications. Algorithms for LRU and LFU techniques.
Interview 3(HR):
Normal HR questions followed by hobbies and sports I like, places I wandered, games I play, etc.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/morgan-stanley-interview-set-16-on-campus/
Fiberlink (maas360) Interview Experience |
Set 4 (Off-Campus)
I got a call from consultancy asking me, whether they can process my profile for the position of
Software Engineer with FiberLink. My profile got short-listed.
Round 1
– what is singleton?
– write a class for singleton
use case of singleton
– Given an array which contains many elements including repeating numbers.
You have to print repeating numbers
– how do you traverse array
– do you have any questions for me
Round 2
– what is your role in current company
– Describe your project architectural overview
– Please go through projects mentioned in your resume properly, they will go into very depth of the
project, and try to understand, what actually you have done in your work.
– What is exceptions?
– types of exceptions
– how do you release resources if exceptions does not occur.
– if forcefully system is set down, how do you release resources
I have given answer, by creating a clean up script which contains all resource releasing commands
and whenever we require to release resources , we run the clean up script by checking the process id,
whether its running in the system or not
– explain database
– In my resume I mentioned junit, so he asked me how do you test multi-threading using Junit
– Given a puzzle,
Given 10*10*10 grid, which is built by using 1*1*1 grid, if outer most boundary of 1*1*1 is broken
down, how many grid will be removed.
– Given a string like gggggaaannnnnnnwwww
o/p:n7g4w4a3
write program which will take above input and gives the mentioned output
Please note that in the output ‘g’ and ‘w’ has same frequency number but have to print in alphabetical
order.
why are you looking for change
Round 3
– Tell me something about yourself
– Tell me about your work and projects.Long discussions about the project.
HR Round
– how comfortable are you relocating
– basic questions/HR questions
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/fiberlink-maas360-interview-experience-set-4-off-campus/
Goldman Sachs Interview Experience | Set
10 (On-Campus)
Following are the details of my interview with Goldman Sachs.
Round 4: Technical
1. What is your strongest language? I said C++.
2. How is Dynamic polymorphism implemented in C++? (Virtual classes and functions- code was
asked)
3. Difference between pointers and reference variables?
4. Why do we need reference variables if we have pointers?
5. What are the areas you are interested in? I said Big Data Analytics.
6. Some follow-up questions on Big Data Analysis.
7. Discussion on projects.
8. Why do you want to join Goldman Sachs?
Round 5: Technical
1. What is multithreading? How is it implemented in Java?
2. What is a deadlock? Draw a deadlock scenario for 2 processes holding 2 different resources.
3. If we have a function- bool isDeadlock(Some Data Structure), what Data Structures should it
receive as parameters?
4. Given an int and a float of 32 bits each. Which one is greater?
5. What is a future contract? A case study on the same.
6. What is Diamond problem in C++? Explain and give solution. (Virtual base classes)
7. Why do you want to join Goldman Sachs?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/goldman-sachs-interview-experience-set-10-on-campus/
First: some people are standing in a queue and only even people are selected. Again out of these only
even people are selected.This happens until we are left with one.
Find out the position of that person in the original queue.
second: We have to find the longest possible interval that can be formed by combining certain
overlapping or constituent events from the given intervals.
people who solved one question were selected to the next round.
Second round:
1. find the area of largest possible rectangle from the given histogram.
Third Round: Technical Interview.The interviewer is my college pass out. He asked me about my
projects very briefly. Then he asked two questions.
1. Given a number give the count of all possible words that can be formed out of it taking the digits
continuously. time complexity O(n).
2.print all the pairs of numbers that sum up to K in a given BST. O(n)
Since I had some projects he asked me questions on cloud, and based on my answers the topic got
drifted towards distributed computing, etc.
Next round was HR interview.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-223-on-campus/
Goldman Sachs Interview Experience | Set
11 (On-Campus for Strats Division)
Goldman Sachs visited our campus for recruiting in the strats division.
Round 1: Pen and paper test which consisted of 3 sections and was to be done in 90 minutes.
First section: 5 questions on Data Analytics.
Second section: 10 questions on Higher level maths.
Third Section: 15 questions on Computer science from time complexity, Operating systems, Data
structure, file system etc.
+3 for correct and -1 for wrong answers.
At last only 1 student was selected from the 800 odd students who had applied for the company.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/goldman-sachs-interview-experience-set-11-on-campus-for-strats-
division/
Morgan Stanley Interview | Set 17 (On-
Campus)
Round 1: 1.5 hours
==================
This was a preliminary round held on Hackerrank. It included 20 MCQs for 50 marks
and 2 coding question for 75 marks each. We had 1.5 hours to solve all the questions.
The questions in this round were from a range of subjects – Data Structures, Computer Networks, OS
and a few Quantitative Aptitude questions. Some of them were related to finding no of articulation
points, scheduler vs dispatcher, class A,B… IP addresses, linkage, Interrupt handler, union
compatible tables etc
These are the coding questions:
1)There is network of servers which are connected by bidirectional cables.
And we have to find the shortest path between two servers.
Input format:
First line: N (number of servers) E (number of cables) L (Latency of each cable, all
cables are of same latency)
E lines each contain: S (source server) D (destination server) [there is a cable
between server S to server D]
E+1 line: K (Number of test cases)
K lines each contain: S(source server) D(destination server)
Output format:
For each of the k test cases find the shortest path between s and D.
Constraints :
1
2) Given that the numbers can only contain digits 0,1,2,3,4,5 find Nth such numb
Example input : 6
Output : 10
========================================
Technical Round 1: (Round 1) (45-60 mins)
========================================
The interviewer was pretty convivial. He started off with asking me about myself and then technical
questions followed.
Q.1 What are the technologies you have explored? What kind of problems you have solved with
them? (since I mentioned I like exploring new stuff)
Q.2 He skimmed through my resume and noticed that I had mentioned many languages but not C++ &
he inadvertently asked me "what are vtables". I had absolutely no idea and he said it was a very
obvious thing for a CS guy to know, for a CS guy. Later I realized vtables are used in c++ & the guy
was probably shake up my confidence :/
Q.3 Find a missing element in a sorted array of numbers from 1...N ( I have no idea why did he asked
this :p)
Q.4 REST vs SOAP (as I had good web dev experience)
Q.4 Some basic OOPs concept and how they are actually implemented in Java ie how JVM does
things at runtime (how runtime polymorphism actually works). I told him that I have never read
Language Specifications but also told him how I'd do it if I were to implement it. He seemed quite
satisfied.
Q.5 You're given a dictionary of words, ex {'My','name','is','XYZ'} and also a sentence like
XYZisMyname. You have to find whether this sentenance is only made up of words from the
dictionary. I explained him a TRIE based approach, he pointed some pitfalls and I later improved it.
Q.6 This was a tough one as it had appeared in Fourth Round of many candidates' experience that I
read on GfG. There is a big warehouse and there are many forklifts used to carry around things from
place to place. Now you're to design a COMPLETE system to manage them such that forklifts never
collide and they always find
optimal paths for their destination. You have to design the algorithms, data structures(to keep track of
coordinates, positions etc), classes etc. I put forth
many approaches but he wasn't satisfied with anyone of them and kept on guiding me to finally arrive
on a decent enough solution.
Q.7 Why Morgan Stanley? I gave him a staid and banal answer to which he facetiously replied that it
wasn't at all honest :p
For a first round,it was pretty tough one as I didn't get few questions but I think it was my approach
and strong grasp on basics that made the difference.
======================================
Group Activity: (Round 2) (30-45 mins)
======================================
We were divided in to two groups and were handed out a chart paper, lego blocks, clay. We were
given 30 mins and had to come up with a startup idea and its key features,
business model, logo, name, funding plan etc. Then midway through the round we were asked to
abandon our idea and pick a new one. So it was a pretty grilling and intensive round and at times it
felt like roadies interview but it was absolute fun!
=========================================
Technical Round 2: (Round 3) (60-80 mins)
=========================================
I shall say this was my best and worst round. Almost every interviewer had a speciality and this one
had OS. He asked me to introduce myslef and then asked me what
my favorite subject is. I mentioned "OS and DS" and this put a big smile on his face :/
Q.1 What is paging, page table, virtual memory, why it is needed, what can be the maximum size of
page table and the virtual address space.
Q.2 What are other things in OS that I like, I told him IPC, Threads etc and the next question
followed.
Q.3 This was a fantastic question and the way he built it - layer by layer was amazing! He asked me
about browsers(which one you use and why?) and the difference between them. Obviously he
was looking for an answer from OS perspective. So I told him how mozilla is very fast and how
pathetic chrome becomes after opening few tabs. Then he asked me about
the reasons. After getting a little guidance, I told him how mozilla uses threads and chrome uses
processes for every new tab that you open and then he asked me
how chrome shares cookies across tabs and thats when questions on IPC followed. I was then asked
about synchronization etc.
Q.4 Design a "playlist" feature (with all the classes and data structures) and how I would implement
it and which Data Structures I'd use.
He asked me to implement a "Shuffle" feature also, where every "next song" is played randomly
and you can also travel back and forth in the list(previous and next)
Precisely you should be able to -
(1) create a playlist
(2) add a song
(3) delete a song
(4) shuffle
(5) play previous or next song
Q.5 You have to design a football game where in teams, players etc will be the classes and he asked
me to list down all the entities involved and mention there
attributes. I told him how I'll create various classes and defined inheritance among them (like player-
>mid,def,attacker etc). Just when it seemed easy, he told me
how I'd design algorithm to pass the ball, score goal etc. So I told him how I'll rate players based on
their roles and how there skills will decide their movements,
passes, shots. How we can create a graph to find paths between players to ultimately reach the goal
and how opponents can be given high weights on the edges to favor a long pass
instead of short one with many opponents, how their ability will determine the feasibility of doing
something. The entire thing was fun and I wish we had more time
to discuss
I'd say I answered only 80% of the questions but I showed him that I was very well verse with
concepts. Be confident, its not necessary to answer all the questions
but very important to think & iteratively improve your approach.
===========================================================
Professional Fitness Round/Tech+HR: (Round 4) (45-60 mins)
===========================================================
This was a mix of HR and tech. I was basically asked the same old question "Why Morgan?", but this
time I gave him a very genuine answer and questions followed:
Q.1 Why Morgan?
Q.2 One instance where you helped people? (since I had mentioned it)
Q.3 Family, background etc
Q.4 What is AJAX and how would you use it with NodeJS (Since I had worked on NodeJS in my
previous intern).
Q.5 Implement a system where in you have to display stock prices in real time. I told him how I'd
design my front end and backend. I mentioned two approaches-a long polling
method and another using sockets. I told him how I'd maintain different versions of the stock table and
how the second approach will be benefecial. This is where my
intern helped as I had to build scalable backend to maintain millions of open connections and use
session-reuse etc. I gave him a rough architecture and explained
its working and he seemed quite impressed.
Q.6 What are my plans for higher studies?
Q.7 X = abcd, Y = a*b*c*d ( has to be 4 digit no)
Find a,b,c,d such that X+Y is minimum.
================================
HR Round: (Round 5) (15-20 mins)
================================
Q.1 Why Morgan? Why only Morgan and why not X,Y,Z?
Q.2 What do you dont like? How you deal with it?
Q.3 Do you plan to do MS?
Q.4 Any questions? - Yes, definitely :p
TIPS:
1. Morgan Stanley interviews are way different than others. Not only you have to be a good coder, but
you also need good communication skills, body language and confidence.
2. OS, CN, DBMS and DS are very very important! To make it through this grueling 5 Round process,
you need to have good understanding of them.
3. Talk about your projects as much as you can, time spent on talking about projects saves you from
some questions which you may not like!
4. Be loud and clear about your favorite subjects. Its highly probable you'll be asked questions on
them.
5. Ask for help whenever you're stuck on something.These folks are very friendly and they'll happily
guide you till CERTAIN POINT.
6. As you can see, a lots of problems involved picking up right data structures, algos to solve real life
problems. It only comes with practice and experience
Source
http://www.geeksforgeeks.org/morgan-stanley-interview-set-17-on-campus/
Post navigation
← Maximum Path Sum in a Binary Tree D E Shaw Interview Experience | Set 15 (On-Campus) →
Writing code in comment? Please use code.geeksforgeeks.org, generate link and share the link here.
D E Shaw Interview Experience | Set 15
(On-Campus)
Round 1: Written (pen & paper) :
Paper 1 : 20 Ques on Aptitude, hard to crack in time constraint (20 mints) – DIFFICULT to
MODERATE
Paper 2 : 20 Ques on Programming Language (C,C++,Java) and on core CS (OS, DBMS, CN, DSA)
(20 mints) – MODERATE to EASY
No coding round.
One should focus on number of correct ques rather than increasing overall attempt,
Shortlisted 14 students out of 100.
I thanks GeeksforGeeks team for providing wonderful platform to enhance one’s skill set.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/d-e-shaw-interview-experience-set-15-on-campus/
Zoho Interview | Set 7 (On-Campus Drive)
Here is my experience in zoho campus drive. It was a two day process
Day 1:
In aptitude all topics like time and work, ratio proportion, mixtures, work , boats and streams, number
sequences were touched. They were pretty easy.
When comes to C.. the questions were basically on finding the output of the given code.. u need to
have strong fundamentals on pointers, strings, preprocessor directives, enums, unions and structures.
Round 2:
Day 2:
Round 3:
We were asked to design a code (its almost a game without any graphics)
the question shall be divided into modules and each shall be verified for 7 to 8 test cases. when first
module is done only then u can get the second and important thing is all the modules are inter related.
Round 4:
the unsolved questions related to apti or program in previous rounds shall be asked along with some
puzzles, areas of interest, why zoho ?
once u clear third round there is a 75% probability that u are in.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/zoho-interview-set-7-on-campus-drive/
Microsoft IDC Interview Experience | Set
67 (On-Campus for Internship)
Microsoft had come to my campus for recruitment for both IT and IDC. Few selected students were
given a preference between them. IF they didn’t qualify in one, they could go to the Other. I had
chosen Microsoft IDC.
First Round:
It was conducted in cocubes.com. comprise of c,c++ and one java and one aptitude question.
around 200 people were shortlisted for second round.
Second Round:
Two questions were asked.
1) Given two arrays were digits of one array represent a number,maxmise the number by replacing it
with elements of second array.
eg:
arr={3,1,4,5,6}
rep={1,9,5,2,3}
after replacement
arr={9,4,4,5,6}
one digit of rep can be used to replace only once.
2)convert the leaves of a binary tree to a linklist using its right pointer.(in place)
I had solved both and was selecetd to the next round along with 29 others
Round three
Find all substrings of a given string.
space can also be part of the substring
1)http://www.geeksforgeeks.org/search-in-row-wise-and-column-wise-sorted-matrix/
i gave the answer but was asked to justify my approach and was also asked to code in another
approach.There were several questions asked to know the various approaches it can be done in.
Round 6
HR round. Normal HR question like why should Microsoft hire you? etc.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/microsoft-idc-interview-experience-set-67-on-campus-for-internship/
Bharti SoftBank (HIKe) | Set 7(For SDE)
First Round Written Test(75 minutes)
Source
http://www.geeksforgeeks.org/bharti-softbank-hike-set-7on-campus-for-sde/
UHG(United Health Group) Interview
Experience | Set 2 (On-Campus)
UnitedHealth Group visited our college this year for hiring full time software developers.
CGPA cut-off- 7.0/10
Hiring process:
1) Analytical aptitude (Written).
2) Technical aptitude (Written).
3) Coding question (included in Technical apti).
4) Technical interview 1 (F2F).
5) Technical interview 2 (F2F).
6) HR interview.
Analytical aptitude – 30 questions 45 minutes. Questions were a bit tricky and needed to be solved
fast. There was negative marking for wrong answers (+1 for correct and -0.5 for each wrong answer).
Technical aptitude – 20 MCQs+4 coding questions 45 minutes.
MCQs were based on DS, Networking and OS.
Coding questions–
1) Find the largest palindrome in a given string.
2) Implement queue using two stacks.
3) Find the middle element of the linked lists in a single pass (you can only traverse the list once).
4) N numbers ranging From 1 to N are given, there is exactly one number missing and exactly one is
repeated find the repeated and missing number.
29 applicants out of 77 got selected for the next round.
Technical interview 1 –
1) He asked me about my achievements, interests and hobbies.
2) Then he asked me to explain all the codes that I had written in technical round.
3) Thorough discussion on my project (I derived all the equations, graphs and diagrams), applications
of my project, my role if I was working in a team.
4) Later he gave me a numerical problem based on my project.
5) He asked me to design a modern car (its block diagram) with all the functions I could imagine,
after 20 minutes I had to explain its working and discussion on more advancement that I could’ve
used.
6) Do you have any question for me? (Always ask a question never miss this opportunity)
Technical interview 2–
Interviewer was very friendly this time.
1) Introduce yourself.
2) How would you solve a Sudoku? (He asked me to give an algorithm because I told him that I like
to solve the puzzles) I solved it using the concept of backtracking.
3) Design a future washing machine (Block diagram).
4) Write an algorithm for traffic light control (all the roads are two way roads).
5) Do you have any questions?
HR interview –
1) Tell me about your family background?
2) What are your strengths?
3) Give me an example where you used your strength to handle a tough situation.
4) Are you a team player?
5) What kind of roles you played each time when you worked in a team?
6) Discussion on an app which I developed.
7) Are you going to apply for any other company after getting this job ?
8) Location preference (I had two options Hyderabad and Bangalore )
Thanks geekteam .
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/uhgunited-health-group-interview-experience-set2-on-campus/
Amazon Interview Experience | Set 224
Here’s my interview experience:
Round 1: Technical
1) A bot has to go from point A to point B. Every time the bot moves, it can take either 1 or 2 or 3
steps. Find the total number of ways in which this can be done.
Input parameters – distance between A and B
Required output – number of ways
Had to write error free code with all edge cases covered. First gave a recursive solution and finally
came up with a dynamic programming solution
2) Implement least recently used cache. This question is there in geeks for geeks. Again had to write
error free code.
3) don’t remember the question. But I just had to come up with an algorithm. Code was not required.
I used sorting and hashing to solve this problem. Code was not required.
2) Given a string of binary digits (for example 010111101000), partition the string in such a way that
each segment is a power of 5. If it is possible to partition the string such that at the end there are no
digits remaining then return the total number of segments, -1 otherwise. Need to start with 5^1 and go
up to the max power of 5 that is less than the string.
Had to write proper code for this problem covering all edge cases.
3) Given n people and n+1 parking slots. Each person has a car and a parking slot allocated. One
night they all go to a party and get drunk. They end up parking their cars randomly. What’s the best
way to go back to the initial configuration (one where every car is in the right allocated slot). (N+1)th
parking slot can be used to swap the cars.
Only algorithm was needed for this problem.
Come up with a sorting algorithm with nlog(n) complexity.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-224/
MakeMyTrip Interview Experience | Set 6
(Online Coding)
Round-1: Online test
1) Given an array and 2 numbers l,r find the number of elements in the array in between l and r;
3) Let 1 represent ‘A’, 2 represents ‘B’, etc. Given a digit sequence, count the number of possible
decodings of the given digit sequence.
The interviewer was very friendly and was trying to find out how much u can think.
1) Given a rotated array around a pivot element find a number x in the array.(write code in log n
time).
2)Given 50 red and 50 blue balls, arrange them in 2 bags in such a way that the probability of taking
out a red ball in 1st attempt is strictly > 1/2.
4) The concept behind why a sewage lid on a road is round-shaped.Trying to find out how much u can
think. (because the lid wont go inside in any way as a circle is uniform 360 degree.Rest any shape can
go inside along the diagonal vertically).
6) A cake is on table.Another piece is cut from anywhere in the cake.Using a single cut divide the
cake into 2 parts.(cut along the line joining the mid-points of the cake and the piece.)
8) Measure 4 litres water using 2 containers of capacity 5 and 3 litres respectively.(infinite supply of
water).
3) Reverse a string wordwise. (Let the input string be “i like this program very much”. The function
should change the string to “much very program this like i”).
4) Calculate a^b in logn and find the total number of multiplications.(check binary representation of b
and count 1’s for the number of multiplications.)
Round-3: HR Round
Some general question on my background and the HR gave a presentation and she finally said SEE U
IN MAKEMYTRIP.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/makemytrip-interview-experience-set-6-online-coding/
OLA Interview Experience | Set 7 (For
SDE-1)
I was recently interviewed by OLA, I could not make it after the last round. All rounds I had were
telephonic, in the last round i was asked to code on collabedit.
Round 2 :
1. Given a matrix containing numbers. Find the 0’s and make all the rows and columns corresponding
to that index as 0.
2. Design a structure for a File Uploader service (eg. Dropbox , google drive) . It is a service where
multiple person can upload
data at same time and it also lists the top five uploaders (who uploaded maximum number of files).
3. Puzzle : There is a employer and a worker ,employer has gold bar of 7 units and he has to give
1unit each on a day for 7 days.
Employer has a magical knife which doen’t works once it performs two cuts(1 cut divides bar into
two parts) on bar.
How will you cut so that 1 unit on each day can be given to worker.
4. Print left view of binary tree.
Round 3 :
1. He discussed about what things they work on Ola. How these things are implemented. Like he
mentioned of bar code a product has and catlaog kind of thing.
2. I had to explain what project I am working on currently, what is the team size.
3. a)Since I had worked on Sql and databases, so he asked me what data structure will i use to
implemet a database.
–I gave hashmap as a soln (key is our primary key and other fields we can store in object which will
be value for hashmap)
b)Now, If in case you want to find all names starting with particular word (eg. ram….).How will you
do that.
— gave trie structure as soln.
c)Now you need to find students whose marks are between a range i.e. between two numbers. How
will you do, what data structure will you take in this case.
— a simple slon was that, take binary search tree and do inorder traversal of that (I coulnd’t answer
this, not clicked me)
4. Do you want to ask anything.
Round 4 :
1. Server receives a ping every 30 secs. The ping is load avg on the machine at that time. Find 90%
percentile of the load average on the machine
at any time instant.
2. Find missing number in an AP.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/ola-interview-experience-set-7-for-sde-1/
Tech 1
1. https://en.wikipedia.org/wiki/Bridge_and_torch_problem.
2. One very easy dp problem only memoization was required.
3. OOPs basics , inheritance , base and derive class pointers .
4. Run time polymorphism with an example
5. http://www.geeksforgeeks.org/array-rotation/
6. http://www.geeksforgeeks.org/write-a-c-function-to-detect-loop-in-a-linked-list/
7. Schema was given, I had to design a class diagram or ER diagram then had to perform queries
accordingly.
8. Asked me about all the joins in sql.
HR(45 minutes)
1. Proper HR questions.
2. Asked me about my Summer Intern project
3. http://puzzles.nigelcoldwell.co.uk/thirtynine.htm
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/grofers-interview-experience-for-sde/
2. FIRST INTERVIEW:
DESIGN PROBLEM: TO DESIGN A SYSTEM WHICH WILL TRACK THE STOCK PRICES
EVERYDAY AND GIVE NOTIFICATION TO THE USER TO BUY OR SELL HIS SHARES TO
EARN HIGH PROFIT
WHY TEAM WORK IS NECESSARY ? GIVE ANY EXAMPLE OF YOUR TEAM WORK
PUZZLE: DOOR 1 HAVING HAPPINESS BUT DOOR 2 NOT . PERSON 1 WILL ALWAYS SPEAK
TRUTH AND PERSON 2 IS A LIAR. YOU HAVE TO ASK 1 SAME QUESTION TO BOTH THE
PERSONS TO FIND OUT WHICH DOOR IS HAVING HAPPINESS
3. SECOND INTERVIEW:
WHAT IS INTERFACE?
TELL ME ABOUT DIFFERENT JOINS IN SQL
4. THIRD INTERVIEW:
HAVE YOU APPLIED FOR THE INTERNSHIP IN GOLDMAN SACHS IN YOUR THIRD YEAR ?
( I SAID YES BUT HAD NOT CLEARED THE FIRST ROUND ITSELF )
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/goldman-sachs-interview-experience-set-12-on-campus/
Interview with WOW Labz for MEAN Stack
Developer
Interview was for position of MEAN Stack Developer.
First Round
5 Questions. Relatively Easy ones just required use of if and for.
Ex
Input [‘sat’,’cat’,’rat’,’tap,’stt’]
‘sat’
‘stt’
Output 1
Questions on MEAN
Ques 1 : What apps have you created in Node and How ? How much Angular did you use?
Ques 2 : Explain session and cookie in your code.
Ques 3: How does session remember details of every member that logs in. Like thousand people open
flipkart. Now what they choose, what they see is being stored. and also there cart. On code level how
will you achieve it?
Ques 4 : What are callbacks ? Why callbacks came into existence?
Ques 5 : Scope of variable in javascript.
Ques 6 : Classes in Javascript.
Ques 7 : Which driver you use to interact with mongo from Nodejs.
Round 3 :
HR Round with Product manager.
General questions about current and expected pay.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/interview-with-wow-labz-for-mean-stack-developer/
Test is divided into three sections ( each section has its own cut off)
a) English: Paragraph Formation (Re-arrangement), Idioms & Phrases, Selecting Words, Completing
Statements, Comprehension(Time taking).
b) Reasoning: Figure matrix, Pattern Completion, Sitting Arrangement, Venn diagram, Data
Sufficiency.
c) Aptitude: Time & Work, Problems on Trains, Height & Distance, Ratio Proportion, Alligation or
mixture, Percentage, Logarithm, Permutation & Combination, Probability, Data Interpretation (Most
Important Topic)
{ To counter the DI problems, Read Directions carefully, Don’t get confused in ‘change in the value
of variable’ and ‘percentage change in the variable’, both are different. Use approximate values
during calculations.}
————————————————————————————–
3rd round(final round) : HR + Technical )
(F2F interview with the VP)
Source
http://www.geeksforgeeks.org/exl-analytics-interview-experience-set-2-on-campus/
Goldman Sachs Interview Experience | Set
13 (On-Campus for Internship)
Online Round (Aptitude+Coding) : (2:00 hrs)
Students of all branches were allowed to appear in the online round.
15 MCQs only on aptitude for the first half an hour and 15 MCQs on basis of C,C++,OS for the
second half an hour and followed by a coding question to be solved in the next one hour.There was no
negative marking. The aptitude questions were really good given the time limit. The test was
conducted on Hacker Rank. Compilers for coding were not allowed.
The MCQs section carried 60 marks and 40 marks for one coding question.
Coding Question : Given a set of n integers, divide the set in two subsets such that the difference of
the sum of two subsets is as minimum as possible.Return the minimum difference.
Interview 1(FTF):
First of all he asked about my background and projects then proceeded with the questions.
Q1.Coding Question of first Round.
Q2. There is a stream of Integers coming in. You have to store all elements.What Data Structure you
would use such that insert,delete and access should be optimal.
Q5. N ants sitting at the corners of a polygon.Each ant randomly picks a direction and start to move
along the edge of the polygon .What is the probability that none of the ants collide.
Interview 2(FTF):
Q1. How many cricket bats in your city? if you have last 10 years data of average number of bats
which sold by each shop,number of shops then how would you calculate average number of bats
which sold by each shop in next year ?
Q2. You have a long text and n pattern.Which data structure would you use to store text and pattern
such that you can get the repetition of every pattern in text at a time.Don’t use string matching
algorithm for each pattern.
Q3. An array of N integers in range [a,b].Five number are missing in array of given range.Find five
missing numbers.
Q4. Suppose that you are standing in a hallway next to 3 light switches, which are all off. There is
another room down the hallway, where there are 3 incandescent light bulbs – each light bulb is
operated by one of the switches in the hallway. Because the light bulbs are in another room, you can
not see them since you are standing in the hallway.
How would you figure out which switch operates which light bulb, if you can only go the room with
the light bulbs one time, and only one time?
At the end he asked what are my subjects of interest and if I have any questions to ask.
Interview 3(FTF):
Q1. Tell me about yourself.
Q2. What is your strengths and weaknesses.How do you plan to overcome your weaknesses?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/goldman-sachs-interview-experience-set-13-on-campus/
Paypal Interview Experience | Set 2 (On-
Campus for Full Time)
Paypal visited our campus in the mid of August.Students of only CS and IT were asked to attend.
This round contained two sections.First section had 20 Aptitude questions and the second section had
a classical Dynamic programming problem and our Greedy approach was also passed for the given
test cases.
I felt aptitude questions little bit difficult and it consumed much time.Einstein puzzles ,data
interpretation questions,C fundamentals and some logical reasoning questions were found in the first
section.
Questions from the first round was discussed initially.Followed by a long discussion on my internship
experience and my Big Data project was discussed.
Some graph questions like detecting a cycle in a directed cyclic graph was also discussed.Some
design questions were also asked.Interviewers were very cordial and helpful.
This round contained lot of questions only on my resume and about the company.
Again I was asked about my experience in first round.
Some questions about my other activities also asked.
This round contained basic HR questions to check the professional fitness.Some questions about my
background and my hobbies.
Overall really loved the entire interview experience, it was really great.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/paypal-interview-experience-set-2-on-campus-for-full-time/
PayPal interview experience | Set 3 (On-
Campus for Internship)
Around 400 students from our university were eligible to attend the interview process conducted by
PayPal Pvt. Ltd., The selection criteria was based on the CGPA till 4th semester. Luckily I was one
among them!
MCQs were mainly from C/C++ input/output, Math Aps, Verbal and Quans. Coding Question: Simple
Currency denomination Problem.
Find the least number of coins required that can make any desired amount. The coins can only be
pennies(1), nickels(5), dimes(10) and quarters(25).
Sample Input 1: 30
Sample Output 1: 2 (one quarter and one nickel)
The interviewers (Two of them were present) asked me to introduce myself. They glanced my resume
and started shooting out the questions!
Single source shortest Path (Was not asked to code. Just explain the algorithm with an example)
What are threads? Does the threads share same address space? Why? Few more questions i don’t
remember them..
Around 5 of the students were selected for next round. Luckily I was one of them
Round 3: HR F2F
This round was my favorite one and was not asked too much technical. Some basic questions like
Why PayPal?
What is the most challenging thing you have come across?
Unique features about PayPal.
What is the reach of PayPal in your locality
All thanks to G4G which is the most excellent site that i have come across for interview preparation
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/paypal-interview-experience-set-3-on-campus-for-internship/
1. General Questions about the key roles which I am playing currently like leading tech team in the
current startup i am working for, advising startups and advising students on programming.
2. How I built the Bi-directional syncing architecture in my current startup, then he put some
constraints to improve it to make scalable and reliable.
3. How I build the Muliti-tenant server architecture in current working startup.
4. We discussed on haproxy,Master-Slave configuration,Replication and redundancy.
5. Basic Questions on Rails architecture and REST .
6. Basic Algo Questions :
a.Implement queue using two stacks ,in the most optimized way possible.
b.Remove duplicates from linked list .
7. Basic questions from Ruby about block , proc and lambda.
Finally, CTO entered the conference room and asked me about my expectation, since I hadn’t
prepared my mind to go and crack the interview, so I roughly gave them one BIG number, next day I
got a call from HR saying that they are ready to hire me for the same.
BOOM!
First Round :
Second Round :
Third Round :
1. Closures in javascript.
2. Basic Jquery questions.
3. Single and Multi-column index in mysql
4. How prototype works in javascript.
5. Active Record and Action controller in Rails.
6. Discussion on my college project Search Engine.
7. The Interviewer also told me about work culture at ibibo office .
Fourth Round :
Build a Rails app for authentication of users which consumes Rest api and oauth2 implementation.
There were some other constraints also in terms of UI like page should refresh and UI should be
attractive etc.
After being interviewed and getting feedbacks from HR of both the companies, I was bit confused
whether I should go for these companies or I should work for growing startup , So I had a talk with
my founder over drinks that I really wanted to groom myself as an entrepreneur , but if i join any of
them , I will grow as a developer.
So my founder gave me an opportunity to groom as co-founder and lead in tech, Operations and
represent the company to investors for fund raising.
So I recommend all the students that you should invest early stage of your career working amongst
passionate people in a small companies where you will be have more responsibilities and you will
be able to prove yourself that will help you in grooming more compare to other big tech companies.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks
Source
http://www.geeksforgeeks.org/why-i-didnt-go-for-lucrative-offers-of-ibibozoomcar-and-decided-to-
go-for-an-entrepreneurial-journey-in-the-current-startup-i-am-working-for/
National Instruments Interview Experience
| Set 3 (On-Campus)
Round 1: Written Test
Duration: 75 minutes
Around 250 students attended the written test. There were 9 descriptive questions; we have to write
the answer on sheet. No negative marking.
3 C language questions: All are finding the output of given code; 1 array based question, 1 linked list
and 1 recurrence function.
1 Network question: Finding the number of bytes transferred from source machine to destination
machine having 2 intermediate routers which are having different maximum segment size (MSS).A
detailed explanation was given how to do fragmentation if MSS is lesser than the size of receiving
packet.
2 Recurrence questions: For the given picture, we need to formulate the recurrence equation, and
solve it for given input n.
1 Computer architecture question: Count the number of clock cycles required to execute the given
instructions with and without reordering. Here also, a detailed procedure was given how to count
number of cycles if instruction is dependent of previous instruction and so on.
1 Probability question.
1 Aptitude question: Based on the area of square and circle, we need to find the probability.
All the questions were very easy. Try to score more in this round.
53 students cleared the first round.
Duration: 3 hours
Sample input 1:
11
22
34
Output 1:
0
There is no intersection between the pairs (1,1) and (2,2) and (3,4)
Sample input 2:
13
22
34
Output 2:
1
Here, the line between (1,3) will cross the line (2,2), So output is 1 in this case.
Sample input 3:
11
22
33
13
Output 3:
3
Here the line between (1,3) will cross the lines (1,1), (2,2) and (3,3). So the number of intersecting
points is 3.
Question 2:
Count the number of redundant parenthesis in a given expression.
Sample input 1:
(A+B)
Output 1:
0
Sample input 2:
((A+B))
Output 2:
1
Sample input 3:
(A)+(B)
Output 3:
2
Question 3:
Given a set of words, count minimum number of steps required to convert one word into another
word satisfying the following conditions,
1. At any time, we are allowed only to change or insert or remove a single character in the word.
2. The resultant word obtained in step 1 should also be present in the given set of words.
Return -1 if not possible to convert.
Sample input 1:
pit, kate, pat, kit, kat, kite
Convert pit into kite
Output 1:
2
Solution: pit→kit→kite
Another possible solution: pit → pat →kat→kate→ kite, this yields number of steps as 4 which is not
better than the previous solution as we need minimum steps.
Sample input 2:
pit, kate, pat, kit
Convert pit into kate
Output 1:
-1
Solution: Not possible.
Hint: Construct a graph having each word as a node and draw an edge iff those two words is
derivable from each other satisfying the above two conditions. Now, apply shortest path algorithm to
find the minimum length to reach from a given word to another word.
6 people cleared this round.
How I solved the coding questions in previous round and logic behind that questions. As I didn’t
solve the third question by using graph approach, I struggled a lot to derive the logic. The
interviewer helped much to derive the logic and he gave enough time to think. We spend more
than 45 minutes in the third question of previous round as he asked each and every step of the
logic starting from construction of graph to BFS algorithm to find the minimum step to reach the
destination word.
Given an array of n integers (n is relatively too high), find k largest elements (k
Given a valid binary expression tree, evaluate it and return the result. I am asked to code the
logic. I solved this question by using recursive approach. Complexity was also asked for my
approach.
Project details.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/national-instruments-interview-experience-set-3-on-campus/
Amazon Interview Experience |Set 225 (For
1 Year Experienced)
I recently had interviews with Amazon.com, Bangalore.
Here’s my interview experience
Written round:
1) Insert a number at its correct position in a sorted circular linked list.
For eg:
a) Insert 25 in 10->20->30->40->50->10-----
o/p : 10->20->25->30->40->50->10----
b) Insert 60 in 10->20->30->40->50->10-----
o/p : 10->20->25->30->40->50->60->10-----
1) Given an array indicating stock prices on each day for a n days. At any given day,you could:
a) Buy only one stock.
b) Sell any number of stock(s) from what you have bought.
c) Do nothing.
Find the maximum possible profit that you could achieve by doing transactions given the price array
for n days.
2) Given a m*n matrix with LEDs, having each cell representing the state of the LED as either
ON(1)or OFF(0). Given a cell position, state of all the adjacent (in all 8 direction) cells sharing the
same state as the given cell toggles and the effect cascades. Represent the final state of the matrix.
3) Given a deck of n cards, in each iteration the top card is removed and pushed to the end and the
second card is removed from the deck. For eg: In 1st iteration, 1st card will added to the end and 2nd
card will be removed, again 3rd card will be added to the end and 4th card will be removed and so
on. Find the last card which will be remained.
2) Given a paragraph and two words A and B, find the minimum distance between a occurrence of A
and B.
3) Given two valid three letter dictionary words, find the minimum number of steps required to
transform first word to second word. Following are the transformation rules –
a) You can, in a single step, change a single letter in the word.
b) Each transition should result in a valid word. Assume you have been provided a helper function
boolean isValid (String word) which tells you if a word is valid or not.
c) This must be done with minimum transitions.
Example: Transform CAT to TOY. One of the several possible transformations is CAT -> CAR ->
TAR -> TOR -> TOY
4) Sort a linked list which is in alternating ascending and descending orders.
For eg :
10->60->30->40->50->20 to 10->20->30->40->50->60
5) Find the next greater element for each element of an unsorted array.
This round was taken by two guys from different teams and both of them were bar raisers of their
respective teams. I was asked to use the whiteboard in this round.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-225-for-1-year-experienced/
VMware Interview Experience | Set3 (On-
Campus for Full Time and Internship
Offers)
Recently VMware visited our campus for full time and intern positions. There was a CGPA cut off of
7/10 for attending VMware’s hiring process.
After this, I was asked a few questions on Networks – explain the sequence of actions which take
place when a user types a URL in the browser and hits enter (I was asked to show a flow using 2
protocol stacks on both the client and server sides), what is a socket and what does it contain and
what is a gateway router. For my last question on Networks, he asked me to tell the packet contents of
a response packet arriving at the gateway router of a given network. I was expected to write the
source and destination IP and MAC addresses.
I was asked to write solution code for 2 problems – (a) Given a log file containing INFO, WARNING
and DEBUG statements, separate the specific log statements into specific files (E.g., all INFO
statements into the INFO file and so on) and delete the original file.
(b) Given multiple occurrences of characters in a string, output the character followed by its
frequency. E.g., if input is ‘aaaaabbbbc’, output should be ‘a4b3c1’.
Since I’d worked on OpenStack projects, I was asked a few questions on OpenStack as to what
OpenStack is, if OpenStack is a competitor or compliment for VMware and why?
(b) Given a configuration file having key-value pairs, write a function to accept filename, key and
value as parameters and go to that particular file and either update/add the new key–value pair
The interviewer also asked if I’d worked with Eclipse and vCenter Server.
Round 4: HR Interview
Standard HR questions were asked –
(a) About family background
(b) How have the last 3 years been in college?
(c) What do you expect from VMware?
(d) Where do you see yourself in 2 years?
(e) Would you prefer a Dev/QE role and why?
A big thank you to GeeksforGeeks for providing such invaluable material for preparation.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/vmware-interview-experience-set3-on-campus-for-full-time-and-
internship-offers/
Accolite Interview Experience | Set 6 (On-
Campus)
Round 1(Written):
There was a technical online test in the first round. 20 questions were to be done in 30
minutes.Questions were basically from data structures, DBMS, operating systems. There was a
negative marking of 0.5. After this, 10 students were shortlisted.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/accolite-interview-experience-set-6-on-campus/
MakeMyTrip Interview Experience | Set 7
(On-Campus)
Recently makemytrip visited our Campus and I got selected in recruitment drive.The placement drive
consisted of 4 rounds.
It was an online test of 60 minutes consisting of 20 aptitude question and 3 coding question. Platform
used for the test was of makemytrip and slightly difficult to understand.
Question1: Calculate the power of a ^ b mod c using logn approach.The thing that was to be taken
care of was that you did not needed to return or print your answer but you had to store it in their
predefined global variable. You could easily find the solution on geeksforgeeks site.
Question2: Given a sentence you were supposed to calculate the count of Capital , small letter and
number.Question seemed to be quite easy but the pick was that you needed to store the answer in
char* output variable in the form of c1:c2:c3 where c1 represent count of capital letter c2 represent
count of small letter and c3 represent count of number.
(Hint use sprintf to store your answer in formatted way in the variable
sprintf(output,”%d:%d:%d”,c1,c2,c3);
)
Out of 110 students 30 students got selected for Personal Interview round.
Question2: You have been given a matrix of character and a dictionary.You need to find the valid
words that you can obtain from it and print it.
(Hint:I used dfs to find the valid sequence and assumed that all words are stored in a hashmap)
After these He asked 6 puzzles to be solved in a given time.
Puzzle 1 : 1.5 hen give 1.5 egg in 1.5 day. How many hens are required to have 4 dozen of egg in 6
days.
Puzzle 2: 2 ropes and take 1hr to burn. Calculate 45 min
Puzzle 3:10 jar with 10gm marble in each jar.One jar contain 9gm marbles only.Find the defective jar
in one turn.
Puzzle4:150 person are standing in a queue in sorted order.A blind person comes
and wants to be at right position in queue.So he asks any person whether he can stand in front of
him.He will reply in Yes or No . You have to find the right place after 2Yes.
Give a strategy to find the correct place.
(Hint:This puzzle can be reduced to egg drop puzzle)
Puzzle 5:25 horse having race find top 3
Puzzle 6:A person is riding a car and he sees a milestone A. After 1hr he sees milestone B which has
digits reversed of A.After one hour more he finds a milestone C which contains all the digits of A and
B . Given that A < B < C find the speed of car.
HR round:
He asked me about my family background,what I do ,hobbies.What I know about makemytrip.What
location I would prefer , whether I am satisfied with package or not,Working environment etc,
It lasted for half hour.
Tip:(Be expressive,Think out loud,Be confident. They need to know your approach not the solution)
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/makemytrip-interview-experience-set-7-on-campus/
Adobe Interview Experience | Set 27 (On-
Campus for Internship)
Round 1: Online Round 60 min.
2: Given a BST output the rank of the an element in that tree in less than O(n) time.
Rank of an element is the index of element when all the elements of the tree are in sorted order. eg 4 5
6 7 8 ; rank of 5 is 1, rank of 4 is 0;
Imagine that self driving technology has been achieved. Describe the ecosystem surrounding such a
world and what technological break-through do you think that would have evolved by that time.
Around 15 students were shortlisted based on the Cumulative of score in first round and C.G.P.A
Interviewer : A recursive function has no termination condition. What will happen when it runs.
Me: Stack overflow.
Interviewer: What other courses have you done,.. Have you done OS?
Me: yes.
Further he asked .. Given an array of 1000 elements.Elements are multiplied in a for loop from 1 to
thousand.
Time of execution is x milliseconds. How will you reduce x?
I thought a few mins .. didn’t make out anything… then he gave a hint: During the time program was
running, CPU performance was 50%.
Then I said use threads or fork to multiply first half in one thread and other half in another thread.
Multiply the results from both the threads.
Interviewer: There is box and in that box there are real numbers ranging from 1 to 10. What is the
probability of getting 2 out of that box.
Ans: Firstly I answered 1/10 .. then he repeated the question … then I answered 0.
Interviewer: Does that mean we can’t ever get 2 when I take a number out of that box.
Me: I said no, we can get but its probability is tending to zero.. very low probability.
Interviewer: You have got 1 last minute. How will you explain Internet in 1 minute.
I explained a bit then he asked Is there a central authority which runs Internet?
I sain no.
End of Interview.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-experience-set-27-on-campus-for-internship/
Grofers Interview Experience | Set 2 (On-
Campus)
Grofes came to our campus for software engineer profile full time hires. only CS and IT branches
were eligible. There was 1 online round and 2 PI rounds.
Round 1 (MCQ)
There was an online round of 2 hours which consisted of 25 English aptitude questions and 20
numerical reasoning questions and 25 technical MCQs and two coding questions which were :-
1. Given a matrix , print the no. of rows and columns of the matrix.
2. Given a string and find the reverse of the string without using any library functions.
1st PI
2nd PI
1. The horse puzzle and the ring puzzle.
2. why do u want to join Grofers
3. what do u know about grofers
4. find the sum of digits of a number
5. how would u find the intersection point of 2 linked list
6. Given a string , delete the occurrences of a given character in the string.
Thanks GeeksforGeeks!!
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/grofers-interview-experience-set-2-on-campus/
Round 1:
It was a 1 hour duration paper consisting of questions from C/Computer Networks/Operating
System/Puzzles. Most of the C questions were regarding the Output of given code.
Puzzles
1: (x-a)*(x-b)......(x-z) = ?
ans: 0 as (x-x) is one of the terms
2: abc
+abc
+abc
= ccc (ans: a=1, b=8, c=5)
Round 4 (HR)
It was just to get to know you. In case you have any other offers. How soon can you join? Why didn’t
you join the other company from which you had offer?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/barracuda-networks-interview-experience/
Location: Bangalore.
Round 1: Online Round 75min.
20 Aptitude Questions,
22 Technical Questions and
8 OOPS Questions(CPP or Java).
NO CODING QUESTIONS.
He started off, with few questions about my background then followed series of questions.
*)First up, he asked me my favorite subject I said Data Structures, Algorithms. He asked me whether I
knew OS,
I said scheduling algorithms, he then asked different scheduling algorithms and which is best
scheduling algorithms(among those I mentioned) and then he gave me a scenario of single core
processor, and asked to explain scheduling on those processors.
Next up,
*)What is meant by file system, explain linux file system, why is it in tree like structure.
*) He then asked me which operating system have I worked on, I said windows primarily and ubuntu
14.04 on virtual box(VMware), he then asked me how virtual OS works on Parent OS, what kind of
communication takes place bw them, how are packets from internet passed to virtual OS browsers
etc( just a discussion, he was much interested in my approach).
*)And few questions on Interrupts, what are kernel and user Interrupts, different kinds of interrupt
levels etc.
*)Difference bw pen-drive and hard-disk in terms of memory access and kinds of memory they
use(flash memory,concept of magnetic tape),how does system identify them.
The interviewer was very friendly and helpful, and we spoke in native language(Kannada)?.
Round 4: HR round:
He asked me about my family background, why computer science? and few other normal HR
questions.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/hp-rd-interview-experience-on-campus-full-time/
Intuit Interview | Set 8 (On-Campus)
Intuit came to our college campus for placements. Shortlisted 13 students after written and then
selected 4 students for Full Time Job.
There were 3 coding questions and 21 (apti+puzzles) to be done in 90 minutes. Apti n puzzle
questions were 5 marks each and coding questions were 100 marks each.
Eg. : 1 2
1 3
2 4
The LHS no represents the parent and RHS no represents the child. A no ‘k’ is also given as input.
We have to find no of pairs which satisfy these 2 conditions:
a) the product of both the vertices(nodes) should be less than k.
b) the RHS node should be ancestor of LHS.
Hint: Done using graph.
3) No of elements are given which are already popped into the stack along with their reacting time.
An order is given as input in which these element will reacts. We had to push these elements in
another stack according to the order given. Also had to return the max reacting time. The tricky part
was how to access any random element from the stack)
(Could be done using 2 arrays, one storing elements and other storing their reacting times.)
Round 1
1) Tell me About yourself
2) Tell me about your project – In detail 15 min discussion on project
3) A binary tree question with code:
There is a root folder which has some directories in it, these directories have more directories and
files in them (arbitrary number). We know the size of the files, we have to find the sum of all the
directories. (if one directory has 2 files of 10mb and 2mb and a directory of size 50mb in it then size
of directory is (50+10+2 = 62mb).
4) A puzzle:
3 closed boxes are there. One has orange written on top, other has apple and other has
(apple+orange) written. Boxes contain anything other than what is written on top.
i.e Box with apple written can have either ‘oranges’ or ‘apples+oranges’ written on it.
We had to find the minimum no of picks in which we can tell which box contains what.
Round 2
1) A (MxM) matrix is given. We have to rotate it by x.
– Put all the elements in an array of size MxM and to rotate it by 1, shift last element to the top and
again push it in the matrix.
2) There is a string eg “101102103105” given we have to find the missing number in it. First we have
to find how many digit number is it forming. In the above example, its 101 102 103 105.. so the
missing no was 104.
They were only checking how you proceed with it. There was no right or wrong answer.
3) A matrix is given containing 0’s and 1’ only. We had to find no of islands.
( a island is a ‘1’ which is surrounded by 0 on all its eight sides)
4) Tell me about yourself. A simple HR question. What will you do if in your team your best friend
and another member are not going along.
In all these questions they were judging how you think, checking your thought process.
Round 3
This was the most grilling round which continued for one n half hour.
1) Tell me about Yourself
2) Discussion about project.
3) A binary tree question.
A root has ‘m’ no of children and each child can have any arbitrary no of children. We are just given a
function to create this tree. It has two parameters. Address of the parent node and the value to be
inserted. No of children can extend to millions as well.
Hint: Use linked list
4) In LINUX, There are two processes P1 and P2. Process P2 is a virus. Can it access P1? Yes/No.If
yes how, if no why.
(I told about segmentation fault, privacy options in LINUX, access rights, memory protection by
memory management unit in linux, core dump and boundary around allocated memory of a process but
he was looking for something else I guess).
5) There are commands
Fopen(…..)
Fclose(…..)
They are executed again and again. What will happen when no file exists and when file exists. How
will OS react. Will os communicate and will there be any system call if no file exists.
6) A function is given
Void memLeak(int bytes) { ……….. }
We have to write the code to leak memory of ‘bytes’ size.
then discussion on memory structure. Where will bytes variable be stored. Role of heap and stack in
memory allocation.
7) Garbage collector in java. Can we implement it in C/C++ other than free/delete. If yes, How.
8) Reverse a string.
9) Some easy question on multitasking.
Round 4
This round was additional which covered only my project related questions.
1) Tell me about yourself.
2) Android- Activity, Fragment, Intent, Listener. Explain them.
3) Java+SQL
An e-commerce wishes to extract top 100 products which were sold in last 10 hours. Give a query
for that. Now store the retrieved data in Java. (result set is used for that.) He asked me to explain the
data structure of result set. And once the data is retrieved, how to display it sorted on basis of
different criterias like cost, model etc.
4) A puzzle: 3 Ant Problem. Then extended for a n-equal sided polygon.
Overall it was a great interview experience. People were very friendly and it as a great learning
opportunity.
I would like to Thank Geeksforgeeks for all the help and guidance.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/intuit-interview-set-8-on-campus/
Sigmoid On-Campus Hiring
This test consisted of only one section i.e. PROGRAMMING, conducted on Hackerrank.
Details:
1. Find the difference between maximum and minimum element such that the maximum element is
always at higher index than the smaller element.(easy)
2. LEGO BLOCKS -(Dynamic programming)..Given an area of NxM ,you have optimally fill that
area with given tiles(dimension of tiles were given).(not so standard question,if you have solved this
before,then it was easy else quite difficult in the first go).
3. Given a number N.Toggle all its bits, and the number then generated was to represented in decimal
format.Like 4=100 after toggling 011,so ans is 3.(easy)
4. Given a preorder traversal of a binary tree,you have to determine whether a BST is possible for
that traversal or not.(moderate)
5. Given an array of elements,you have determine the number of pairs(a,b) such that |a-b|=K.(easy)
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/sigmoid-on-campus-hiring/
3 coding questions.
2 interviewers were there and the interview went on for about 30 minutes. Questions they asked
were-
-designing a stack which performs the getmin() function in O(1) time without using any extra space
-finding the median of two sorted arrays of same size
-how did you solve the submatrix problem of Round 1
the interview went for about 30 minutes. The questions asked were-
-your strengths
-a puzzle: if a rectangular paper is given, how many ways are there to divide it equally in 2 parts
-another puzzle: if a rectangular section is cut from the rectangle, how many ways are there to divide
it equally in 2 parts such that section gets divided equally too.
-another puzzle: if 9 identical items are given of which 1 is heavy, how many minimum numbers of
comparisons you need to find the
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/factset-interview-experience-on-campus/
IBM -ISDL Interview Experience
I recently had interviews with IBM INDIA-ISDL, Bangalore. Here is my Interview Experience.
[ Number series questions were easy. Aptitude was tricky some of them were lengthy too.There was
no negative marking ]
Round 4: HR Round
Tell me something about yourself?
What all programming languages you know ?
– Will you adjust or feel comfortable if you’ll be given Bangalore as a job-location ?
– What are your short and long term goals ?
Strengths and weakness ?
Did you attend Pre-placement talk?
What is one thing you liked about the pre-placement talk?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/ibm-isdl-interview-experience/
OATS Systems Interview Experience | Set
1 (On-Campus)
There were three rounds.
Round 1.
It was a written round, questions were from algorithms and DBMS
1) Find two rectangles overlap
2)Find the k-th non-repeating character in a string
3)Find the row and column index in a two dimensional array in an optimal manner.
4)FInd the set difference with the two arrays.
5)Question related to cursor- DBMS question
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/oats-systems-interview-experience-set-1-on-campus/
Coding Questions:
1. Find ‘x’ in the equation. The input is in the form of a string. Equation consisted of addition operator
only and 2 integers and a variable ‘x’.
Sample Input Case: x+3=5 output=2
Decoding the string into 2 numbers and an unknown variable took a lot of time.
2. Given two numbers x and y find x^y in log y time.
3. Find the next palindromic number greater than the current number.
Had solved all 3 questions and around 15 questions in aptitude. Was shortlisted for the next round.
2. Coding question :
Full codes to be written
a> Given an array comprising of only 1’s and 0’s , find the maximum length along with the starting
index
and ending index which consisted equal number of 1’s and 0’s. I could not do it, the interviewer gave
me another question:
Given an array comprising of any number ( both positive and negative), find the maximum length
along
with starting and ending index which had sum equal to 0. I was able to do this one.
The interviewer told me to solve the previous question now. I told him that replace all the 0’s with
-1’s
and the question becomes entirely the same.
3. Puzzles:
1. There are 3 switches outside a room. Inside the room there is only 1 bulb. You could go inside the
room only once, how will you know with which bulb the switch is associated with.
2. There are 100 coins in a table. 20 coins are heads and others are tails (facing upwards). Find the
optimal cut(2 piles) such that both have equal number of heads facing up.Technical Interview 2 ( 1 hr
)
Technical Interview 2 ( 1 hr )
Coding Questions:
1. Cloning Linked List with every node comprising of next and (random pointer to any other node).
2. Detect Loop in a Linked List and remove it.
3. In-place reversing of a string.
Questions about abstract data type, abstract keyword, difference between C++ and Java, garbage
collection in Java and OOPS concepts were asked.
HR Round ( 20 mins )
Basic details, family background and why do you want to join this company? Where do you see
yourself
after 5 years and questions about weakness and strengths.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/makemytrip-interview-experience-set-8-on-campus/
Factset Interview Experience |Set2 (On-
Campus)
I find GeeksforGeeks very helpful! It helped me prepare for my FactSet interview. Here’s my
interview
experience for FactSet which came to my college for recruitment.
Eg: 2 3 7
1 7 8 ans is 7.
6 9 7
-Given an array and a number k, find all pairs of numbers in array whose sum is least near to k.
-How to find intersecting point of two linked lists. (most efficient way).
-Design Database schema for supermarket (Reliance Fresh) taking care of all the factors about details
of
discounts and offers to customers.
-puzzle as follows:
__ __ __ __ __ __ __ __ __ __
0123456789
Fill numbers in the above blank from 0-9 such that number X coming over any number Y means Y
should
be in X blanks. For eg: if 2 comes over 0 means 0 should be present in 2 blanks.
Round 3 (technical interview + HR):
2 interviewers and 60 minute duration. It was mixture of both technical and HR round.
-Given a matrix of characters and a string, find the first index of string in matrix. String can be
horizontally,vertically, diagonally present in any direction.
d t o j w
ans: (0,2)
c x g p q
-Questions on hashing and combining it with networks. How to implement it and its uses in various
fields.
-Brief discussion of project done in internship and questions over it.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/factset-interview-experience-set2on-campus/
Visa Interview Experience |Set 8 (On-
Campus)
ROUND 1
It started with my introduction to which I introduced myself followed by I started mentioning about
the projects I did.
I mentioned my one of the projects on Android based on database.
He asked me to draw the design (Class Diagram) for the same.
Given water bottle ,design its software.
I started with test cases followed by feasibility,requirement analysis,coding,testing.He confused me in
a couple of Use cases but I had mentioned enough of them.
He then drew 8*8 chessboard and asked me as to how would I place 8-queens in them(Famous N-
queen problem)
I explained him my backtracking concept.
He was happy with the solution.
I started placing the queens manually (code was not required)
Round 2
Interviewer was not interested in Data Structures ans asked for my area of Interest except Data
Structures and Algorithms(very common for CSE students)
I mentioned Web Development And Android Development.
He started asking questions on what security issues I faced in Web Development.
I told him about the time when I started it all with a login panel and how It got attacked by SQL
Injection.
He asked me the difference between Encoding,Encryption,Hashing
Types of Encryption?
I started with Encryption Techniques like DES,AES
He gave me a hint by saying symmetric.
I then told him the other one Asymmetric(quite trivial).I explained both encryption to him by famous
Alice Bob example and public Key Private Key thing.
I told me the explain difference between GET and POST..i did that
Why GET preferred over POST?
I told him that GET was vulnerable to data leaking as variable and value was present in the URL.
He was explecting the following answer.Due to limitation in size of URL we cannot use GET to pass
large number of values..which POST does easily
Why would I like to join VISA than greatly growing startup like Flipkart?
I stuck with visa and mentioned some of their points from PPT like the patents theie employees filed
and innovation related things
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/visa-interview-experience-set-8on-campus/
Amazon Interview Experience |Set 226
(On-Campus for SDE-1)
Amazon interview experience for SDE-1
1. given a dictionary of words – {“sam”, “samsung”, “sung”…. }. check if a given string eg.
“sungsamsungsam” can be made from the words in the dictionary.
2. magic number is a number formed by adding one or more powers of 5 .find Kth magic number. 5,
25, 25+5=30, 125, 125+5=130, 125+25=150, 125+25+5=155,….
1st interview–
0. introduce yourself
2. go from 0,0 to m,n in a 2d matrix. find the maximum possible sum of your path. you can only move
down or right.
3. given an array of integers. form pairs such that each pair’s sum is divisible by k. return 1 if this can
be done, else 0.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-226-on-campus/
Flipkart Interview Experience| Set 37 (On-
Campus for SDE 1)
coding round 1–(1 hr) – hackrrank
1. given a string of any length, check if first half of the string (n/2+1 in case of odd length) is an
anagram of the second half of the string or not.
2.in a 2d matrix, some cells are obstacles and others are clear. find number of paths from 0,0 to m,n.
(0 paths if 0,0 is obstacle, wasn’t specified but was the 6th test case).
1. given n cities’ populations. you have to divide k hospitals in these cities such that the population
load for the hospital with maximum load is minimum eg 2 cities – 20000,50000 and k=6 . so hospital
in 1st=2, in 2nd=4 and answer is 12,500, the maximum load on any hospital.
–add populations to priority queue, assume giving one hospital to each city in starting. pop from
queue, give this city one more hospital, add (population)/(no. of hospitals to queue), do this till you
have hospitals left, then return top of priority queue.
2. simple bfs question with surprisingly complex language.. couldn’t figure out the question..
something about rods fused together being seperated where cost of each seperation is sqrt(no. o
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/flipkart-interview-experience-set-37-on-campus-for-sde-1/
Amazon Interview Experience | Set 227
(On-Campus for Internship and Full-Time)
This year our college kicked off placement season with the Amazon. We got the job description(JD)
before the placement process. We got good news that Amazon have increased total CTC. With this
good news it also added tension and pressure.
Program 1: Anagram
Two words are said to be anagram when one word can be converted into another word by
shuffling/rearranging characters. Given a set of words find the number of anagram for each word in
given set of words.
Both the program were easy. I solved program 2 correctly in O(n) and second program in O(n^2).
Result was on next day so all of us were in tension. I could sleep only 3 hours :p.
Interview Round 1:
Question 1: First question in first round of interview was how to insert node in binary search tree
using recursion and without recursion. He asked me to write the code of both.
Question 2: Given a binary tree how to find the least common ancestor of two nodes in the tree.
Question 3: Given a binary search tree find the least common ancestor of the two nodes in tree. He
asked me to write the code of this program as well.
Time: 45 mins.
Interview Round 2:
Question 1: He asked me to tell about my self. During introduction I mentioned about my previous
company’s project. He asked next question about that project. I had worked on that project almost 2
years so I could explain him that project in detail. He asked to write the code for the Wait And Signal
method of the counting semaphore.
Question 2: Given an array with -ve as well as +ve elements find max continues sum.
This question was easy.
Question 3: Given a singly circular link list containing both +ve as well as -ve numbers find max
continues sum. I explained him O(n^2) algorithm but he was asking O(n). I was not getting answer of
this question. I worked on this for 4 to 5 mins but I was not getting perfect answer so he gave hint by
drawing all elements on the circle. As soon as I saw circle I got answer, I told to break the ring from
most -ve number and then use normal algorithm which was in 1st question. He was not sure about this
algorithm he tried to break this by using 4 to 5 example but he could not. He was happy after this
answer because might be he had another solution in his mind.
Question 4: Given prices of stocks per day find maximum profit you can earn by buying and selling
shares. You can make only one transaction.
This question is easy and from geeksforgeeks.
Question 5: Given prices of stocks per day find maximum profit u can earn by buying and selling
shares. You can make multiple transactions. He asked me to write the code of this program.
Interview Round 3:
Question 1: He saw my resume and asked me which project I find most difficult. I told same office
project. He asked me which part of that project I find most difficult. I told part related to the
scheduling. He asked me basic questions related the scheduling and synchronisation.
Question 3: Explain the LRU cache technique and how to implement it. I gave various approaches
like array, queue , stack, Link list. finally He agreed on Link List with hashing approach. All other
approaches were O(n^2) solution but Link List with hashing approach is O(n). He was happy with
that answer.
Link-List with Hashing approach:
Size of LinkList will be size of cache. Data in list represent page number of cache. Before running
algorithm we will build Hash Table. Key of HashTable will be page Number and value will be
address of the node in link list which contains key. One pointer to Link List represent the most
recently used page(Front of Link List) and one pointer will point to least recently used page(End of
Link List). When new page come then we will get node containing page number directly from hash
table in O(1). After getting that node move that node to the front of link list which represent most
recently used page. If the new page not present in the Hash Table then update the value in page
pointed by least recently used pointed and move that page to front. and also update key in the hash
table.
Here we are building hash only one time and not modifying its values after that.
Time: 50 mins
Interview Round 4:
Question 1: He asked about projects. I explained him my project in details which took around 10-12
mins. During explanation he was asking like why u have used this approach why not other and like
that.
Question 2: Given n Runways and m Planes. How you will efficiently design this scheduling problem
so that there should not be collision. I explained this by giving view of CPU scheduling problem and
semaphore.
Use priority based Scheduling where priority can be departure time and emergency. Each plane use
runways as below:
Plane Pi:
Wait(S)
Take off(M.E.)
Signal(S)
S=n
Question 3: This was easy question. Given matrix which is sorted, row wise as well as column wise
like below:
01 04 07 09
11 23 45 46
51 56 59 63
70 73 75 79
and key. Find the position of key in given matrix efficiently. I explained the solution which is in O(log
m)+O(log n). He asked me write the code this problem.
Question 4: He asked very basic questions of database. After that he asked me what is eventual
consistency. I didn’t knew answer of this so I told that I don’t know, He again asked that do u know
about NoSQL I said no.
Time: 45 mins
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-227-on-campus-for-internship-and-
full-time/
Microsoft IDC Interview Experience | Set
68 (For SDE)
Hi, Following is my interview experience for SDE position in Bing Team.
– Online Round :
Total questions 2.
1. The question was big, like a story but it ultimately boils down to Longest Common Subsequence.
2. Don’t remember the question but it was a mix of level order traversal + searching.
1. Given a binary tree, connect all node in the same level. Node structure is : left, right, data, next.
Each level next should point to the next right node in the level. For last node in each level, next
should be NULL
Then, the question was extended : Toggle the linking every K level. Means, you will be
given a tree root node and a number K. For first K level, you should link to next right node.
Next K you should link to next left and so on.
2. Given a city containing n people, a mayor candidate is one who does not like anybody but
everybody else likes him. You are given a function Likes(x,y), where x and y are people in the
city.
Likes(x,y) = 1 if x likes y, O otherwise.
Question was to find the mayor candidate. O(n) solution was required.
3. Some discussion on app based taxi booking services, overall idea about how they are
implemented, how it can be improved. Just general idea.
– Onsite : Round 2 :
– Onsite : Round 3:
1. Discussion about previous work. Challenges faced.
2. Given a 2 D array of size mxn (say) and a location (i,j), write a function TraverseSpiral(arr,m,n,
i, j) which will traverse the array spirally starting from location and moving clockwise.
Working code with edge cases checked required.
Test cases for the same
3. Stream of words are coming : ate, geek, tea, for, sam, eat. Build a data structure to store these
such that, if a query was made to search a word: sat tea, it should return all the anagrams : tea,
ate, eat present in the store. Long discussion on possible approaches.
1. Long discussion about dissertation, previous work. With stress given to contribution and
challenges faced and how did I decided to resolve them
2. Why do I want to leave present company?
3. Some discussion about UI, what are the things to keep in mind while designing a mobile APP
like amazon or flipkart. Which is better among them. What would you Iike to do to make them
more user friendly.
4. Some discussion about multi thread system and synchronisation among them. Various approaches
and their trade-off discussed.
5. High level discussion on how India Railway reservation system works catering to millions of
request at a time.
6. Any questions from my side – I asked various aspects of work being done in Bing team. I
emphasised on scenarios where a bing search gives more relevant results than a google search.
Overall, it was a great experience. Great food and snacks throughout the day. The interviewers were
friendly, giving hints and all. I would also like to thank geeksforgeeks for being there always. I have
been greatly benefited hence I am taking time in sharing a detailed and thorough description of the
process from my perspective.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-idc-interview-experience-set-68-off-campus-for-sde/
Walmart labs interview | Set 4 (For Senior
Software Engineer)
I was interviewed for Senior Software Engineer position in Walmart (6-8 years of experience,even
people with 4yrs exp were also shortlisted)
2) Magnificent Fountains
https://www.hackerearth.com/problem/algorithm/magnificent-fountains/
Eg: Range ( 21 -40) –>Prime numbers are 23,29,31,37,39 ( 2 occurs 2 times, 3 occurs 4 times, 1 and
7 occur 1 time and 9 occurs 2 times ->Answer is 3)
========================================================
2) Find the number of possibilities to move from one point to another point in a chess board kind of
sqaure box.
The interview process was quite long as the panel count was very less.( 9am to 7pm)
Tips:
1)Compared to Amazon,Flipkart and many hot startups Walmart is easy to crack
2)Be prepared with basics of JAVA
3)Be good at BackTracking,Greedy algorithms and Dynamic Programming.
4)They stress more on solution than optimization.
All the best for people who gonna attend the drive.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/walmart-labs-interview-set-3-for-senior-software-engineer/
Mahindra Comviva Interview Experience |
Set 1 (On-Campus)
Recently Mahindra comviva visited our campus for its placement drive.
Round1: Online Aptitude (Quantitative Ability based questions/Technical including C, OS, DBMS,
OOPS concepts/English included antonyms, synonyms and Comprehension) round taken by AMCAT.
UNIX/LINUX + DS + OOPS
1. Do you know about Linux/Unix. I said yes. So he said write 10-unix commands.
7. Data structure: Then he gave me a LL based question to delete/remove a node from the middle of a
singly Linked List.
Java:
Implement exception-handling
C++:
What is Polymorphism.(I answered in the most typical way i.e. by explaining that poly-morphism is
composed of 2 words… bla bla blah!! )
What is static Binding (I explained him binding first then nailed the question.)
DBMS:
(ii)After getting answers to the above questions he then said let’s see the DBMS part.
So he asked me to create a table by giving the description of the table like
(iii) What is RDBMS (he meant difference bet DBMS & RDBMS)
(iv)Give an example of the two (I gave DBMS as FOXPRO and RDBMS as ORACLE)
Then he asked me to create a table (he meant to modify a pre-existing table) to add the
primary key attribute to a column.
Then he sat next to me and then he asked me to design the “IRCTC’s” website.
Implement “Insert.php”
Implement “Valiate.php”
And write 20 unix commands… all in 10 minutes (+2 MINUTES WHEN HE SAW ME STILL
BUSY).
Round 4: HR round:
This round had only a couple of questions as:
Tell me why do you want to join the IT sector and what do you want?
What is your family background?
Tips:
Apti:
Practice questions from Indiabix, RS agrawal,etc.
Interviews:
Keep patience in yourself and answer only as much it is asked for (keeping your answer short &
crisp)
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/mahindra-comviva-interview-experience-set-1-on-campus/
Salesforce Interview Experience | Set 1
(For SDE-1)
I have recently attended an interview with Salesforce Hyderabad, for SDE-I position. There are 5
rounds in total, all are technical.
I. Programming Round:
1. Find the diameter of a binary treeHere the diameter is maximum number of nodes possible in the
tree, formed by two leaf nodes.
It can pass through the root or need not be.
3. Given an array containing positive and negative numbers, find all the sub arrays in it, whose sum is
equal to zero.
Solution: Maintain hashmap and insert the sum till now for every element and its index position –>
HashMap
For each element, check the following 3 cases:
a) whether the element is “zero” ==> start and end indices both are “current index”
b) whether the sum is “zero” ==> start index is 0 and end index is “current index”
c) whether the sum is already present ==> start index is “map.get(sum)+1″, end index is “current
index”
1. Given a time in hours and minutes, find the angle between hours and minutes pointers in analog
clock.
2. Given two arrays of equal size. First Array represents in the arrival timings of trains and second
array represents the departure timings of the same trains.
Now with the above two arrays data, give the number of platforms required to accommodate the
trains.
3. Given an array containing integers, in which the elements are repeated multiple times.
Now sort the array wrt the frequency of numbers.
eg: i/p: 2, 4, 5, 2, 1, 9, 3, 2, 2, 5, 1, 5
o/p: 2, 2, 2, 2, 5, 5, 5, 1, 1, 4, 3, 9
Given a url containing the domain name and product it, like:www.amazon.in/pid=1234
By passing this url to utility functions, you can get all information about it.
getProductName(url) –> Gives you the product name
getProductPrice(url) –> Gives you the price of the product
getRelatedProducts(url) –> Other products related to the current product, in which also user might be
interested.
Now given a product url, print the information about it completely, including all its related products.
What is the data structure that you will consider to represent the above product data and write class
structure for the same.
A technical topic will be given and you have to speak on it in front of a group of 5-6 people.You will
be given 1 hour of time to prepare, a system with internet.
You can present the topic either on board or with ppt also.
The aim of this round is to check the candidates learning capability on a new topic, his presentation
skills.
Since I got mixed response for this round, they conducted another technical round.
V. Technical Round 3:
This way the least recently used is at the end of the list always.
2. Explain about HashMap internal implementation and write code for the same.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/salesforce-interview-experience-set-1-for-sde-1/
MakeMyTrip Interview Experience | Set 9
(Off-Campus for Sr. Android developer))
First round (Written) :
1. 4 Android questions:
a) What’s Recyclerview? Describe all components of Recyclerview with all callbacks and the
benefits of Recyclerview.
b) Difference between thread, async task and service (in tabular format).
c) Callbacks invoked during addition of a fragment to back stack and while popping back from back
stack.
d) Scenario in which only onDestroy is called for an activity without onPause() and onStop()
3. Given an array, find the maximum difference between two array elements A[m] and A[n], such that
n>m.
4. The relation between group of friends is transitive. So if student A is friends with student B, and B
is friends with C, A becomes friends with C. They form a circle of friends. Given a matrix N*N and
N students, each matrix entry indicating ‘Y’ or ‘N’ if they’re friends or if they’re not friends. We need
to determine the number of circles.
Eg – 6 students, A,B,C,D,E,F.
A is friends with B, B with C. D is friends with E. F is friends with none.
Output : 3 circles.
F2F Round 1:
Starting with Java basics :
1. Uses of final, string pool concept, serialization, synchronization (how it can be done)
2. How can you implement thread pool executor.
3. Is it possible to declare final variable in abstract class.
4. What is externalization.
Android :
Lots of basic questions:
You need to provide more area for checking/unchecking checkbox than the default area of checkbox.
How would you do it.
How would you implement zoom in zoom out functionality in Android.
How do you implement GCM push notifications.
What things would you do in each lifecycle method of activity?
What is IllegalStateException in Android? Any scenario when you encounter it and how to solve it?
Advantages and disadvantages of using fragment.
How would you implement swipe animation in Android.
How do you detect whether keyboard is open in an Android app.
And some more. But I don’t exactly remember.
DS:
Implement queue using 2 stacks.
After this, the interviewer seemed satisfied with my responses.
F2F Round 2 :
Android design questions:
1. You have a textview(3 lines) and a button below it. On clicking the button textview whole content
should show. (Content is very large but due to 3 lines initially its not shown completely). You need to
add animation while showing the full text of textview. How would you design this.
2. Some question related to showing images (for adult and child, like in flight booking system, we
have 2 buttons for adding and removing adults/child). When there is 1 adult and 1 child, it should
show as AC where A and C are icons for adult and child. On adding 1 more adult, it should show as
AAC instead of ACA. How would you design such a system.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/makemytrip-interview-experience-set-9-off-campus-for-sr-android-
developer/
Intuit Interview | Set 9 (On-Campus)
Intuit came for on-campus hiring for 2016 batch and internship offerings for 2017 batch in our college
last week.
1. A text string and a pattern string are given. If any part of the pattern string occurs in the text string
return true, else return false.
2. A stack of chemicals with their reacting times is given. A series of numbers indicating the addition
of these chemicals from the bottom of the stacks is given. We need to access these chemicals
according to the given series and find out the maximum reacting time at each addition (it is basically
the maximum of reacting times of all the chemicals added till each step). (Try creating a structure of
chemical name, reacting time, and a flag for popped node and create an array of this structure.)
3. The number of nodes n in a tree and a number k are given as input. These are followed by the n-1
edges of the tree with first node as the parent and second as the child. We need to provide a count of
pairs such that
The pair consists of a node and its ancestor.
The product of the pair of nodes is less than or equal to the number k.
At the end, I asked some questions about the kind of work they do and the technologies they use.
All-in-all it was a great experience, all the panels were very good and tested my knowledge in almost
all the domains (C/C++, Java, DBMS, Algorithms, Data Structure, Networking, Operating Systems)..
I would like to thank GeeksforGeeks for helping in my preparation. The interview experiences posted
here helped me. I hope my experience would also help someone in the future..:)
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/intuit-interview-set-9-on-campus/
Amazon Interview Experience | Set 228
(On-Campus for Internship)
Amazon came to our campus a week back and procedure was as follows:
Round-1-
20 easy MCQ
2 coding questions:
(a)- http://www.geeksforgeeks.org/find-next-greater-number-set-digits/ –>even brute force
solution is working.
(b)-Evaluation of post fix expression.-similar to this one http://geeksquiz.com/stack-set-4-
evaluation-postfix-expression.
Note – Only fight for solving atleast one coding question.If you have not done any coding question
then it doesn’t matter how many MCQ you have done you can not qualify for next round. I had started
with coding question and did 1 question and only 10 MCQ and qualified for next round.
21 candidates were shortlisted.
Note- Same questions were asked by the same interviewer to many candidates so it is advisable to
share questions with friends as they select you for next round only if you have done both of the
questions.
very tough question. In 1 hour with the hint of interviewer I was able to answer this.
3- Some basic C questions – What is difference b/w Malloc, Calloc. Scenario when to use which
one.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-228-on-campus-for-internship/
Amazon Interview Experience | Set 229
(On-Campus for SDE)
First Round: 20 MCQs, 2 Coding questions. Platform – HackerRank.
Coding Questions:
1. A magic number is one that can be represented as a sum of powers of 5. For example 30 = 5^2 +
5^1. Given n, return the nth magic number.
2. Given a set of words as dictionary, find out whether a given string can be formed using any
permutation of the words from the dictionary. The words given in the dictionary cannot be altered,
more specifically anagrams of the given words cannot be used to form the given string,
Technical Interview 1:
1. Given an array which is sorted row wise as well as column wise, how would you find a given
element?
3. Given an array, and a number K, find the largest of all consecutive windows of the size K. For
example, for the array [2 , 9, 3, 4, 1, 6] and K = 3,
Output: 9, 9, 4, 6.
4. Given an array, you can only ROTATE the array as many times you want. Return the maximum of
summation of (i*A[i]).
Technical Interview 2:
1. Implement a circular queue using an array of a fixed size. Handle all boundary cases. This question
was followed by some Operating system questions based on it.
2. Given an array, divide it into two subsets such that the difference between the sum of subsets is
minimized. Also, return the subsets.
3. Discussions on the same dictionary problem asked in the online coding round.
Technical Interview 3:
1. Given a threaded binary tree with all the threads pointing randomly anywhere, fix all the threads
without using any extra space.
1. Given a binary matrix (A matrix consisting of only 0’s and 1’s), where 1 represents land and 0
represents water, Find the number of islands.
2. Given a paragraph and a sentence, find the smallest sub-string in the paragraph which contains all
the words in the sentence, return the smallest starting index of the occurrence of such sub-string if
there exist more than one sub-strings of the same smallest length.
Project based questions were also asked in between all the interviews.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-229-on-campus-for-sde/
TinyOwl Technologies Interview
Experience | Set 1 (On-Campus)
Here is a brief description of my Interview Experience of TinyOwl Technologies
1) Given a set of strings, we have to determine whether the strings represent valid IPv4
addresses/IPv6 addresses or neither of the two. (Basically, it was a String manipulation question).
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/tinyowl-technologies-interview-experience-set-1-on-campus/
Category: Interview Experiences Tags: TinyOwl
Bidgely Interview experience | Set 1 (On-
Campus for Internship)
Interview was for both Banglore and US profile.
Round 2 (Skype)
Asked about projects in detail. Then following questions:
1- You are walking on a road. The probability that a person sitting there sees you in 20 min time is
0.9. What is the probability that he will see you in 5 min time.
2- Given thousands of points lying on a line with some error(some points do not lie on line) find
equation of line.
3-Two trains are are 100km apart and moving towards each other at a speed of 50 km/h. Now, from
train 1 a man starts running at speed of 100km/h, reaches train 2 and then again comes back and goes
again and continues till trains collide. Find the distance travelled by the man.
4- An extremely simple question – In least possible comparison, how to check whether a string is
palindrome.
Round 3 (Skype)-
only two questions were asked
1. Given 9 balls out of which 1 is lighter than other 8. Find out the minimum number of times you have
to use a weighing machine to detect the lighter ball.
After this round I was selected for US profile interview and 2 candidates were selected for
Bangalore (one for software engineering and one for Data science).
4-Given an integer n, print square of all integers from 1 to n (1^2,2^2,…,n^2). At architecture level
multiplication is an exorbitant process so do something else .
Then after this question he went through my CV and asked some questions about my academic
achievements for ex. I have secured international rank 1 in IOS(International Olympiad of Science),
so asked in which class, the organisation and some other relevant questions.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the
topic discussed above
Source
http://www.geeksforgeeks.org/bidgely-interview-experience-set-1-on-campus-for-internship/
Yatra.com Interview Experience | Set 6
There were total 4 rounds:
Round #1: This was written round 2 output and 2 coding questions.
coding question #1 : find 2 largest number in an array covering all edge cases
coding question #2 : Given 3 arrays which are sorted find the numbers which are common in 3 arrays
Round #2 : This was technical face to face round and questions asked were:
-> write a code to reverse a linked list
-> rotate a 2D-matrix by 90 degree without using extra space
-> given an array find two elements whose sum equal to zero
As they said to me after 1month that now they dont have any open position current for fresher but
since myy interview were really fine so they given me one chance for interview for position one
higher than i applied:
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/yatra-com-interview-experience-set-6/
Round – 2
1) Print path to a node from root in a binary tree.
– Easy question asked to write the code and checking if we cover the edge cases.
2) Find the median of continuous stream of numbers.
– More frequently asked in amazon interview questions
3) Delete a node in a linked when you have nothing other than the pointer to the node you want to
delete.
– Traversing to find the node we want to delete is not a viable approach, could get the idea of
copying from the next node and as we prev pointer to the node we want to delete it’s good.
– Edge case what if the node is last node of the linked list.
4) Data structure to pick to store the words of a dictionary.
– Hash maps are not the optimal solution as you end up allocating memory for each word.
– Tries are the best possible data structures to pick
5) How tries are better option than the Hash Maps for storing the words of a dictionary?
6) Load factor of hash map and how does it affect the performance of the hash map.
7) Asked questions on equals and hash code contract of the hash maps.
8) Times when you decide to pick a linked list or Array List.
– When you requirements is you perform more number of deletes and insertions rather than the search.
9) Asked the difference between concurrent hash maps and Collections.synchronized(hashmap)
– Fumbled a bit as i was not aware of the lock striping that happens in the conccurent hashmaps.
10) Explain on fail fast and fail safe iterators.
11) is static overriding allowed if not why ?
– Not possible as static methods are binded at compile time and nonstatic methods are binded at the
run time.
12) Asked about thread pools and why use them ?
Round – 3
1) Asked me to write the code for the deadlock creation
– Wrote 2 runnables where they call nested synchronized locks in the reverse order/
2) how to prevent dead locks ?
3) Asked some question related to threading
4) Given list of words of a dictionary {cat, rat, mat,map} given 2 words cap – map
you can change only one character at a time
eg: cap – cat – mat – map
“http://paste.ofcode.org/6Cb2DFbwHXB2nG3xJEze2n” – code logic i suggested.
5) Questions on sharing objects using serialaization.Also spoke of using gson to Json utility for
sharing objects across applications
Round – 4
1) Asked me to write code for the singleton pattern
– Wrote code for the doubly checked singleton pattern
2) Asked me if i know decorator pattern
– I said i had no idea of it.
3) Asked me on Robot capable of moving in different directions but it should have the capability to
make the steps back
– It didnt click stack is the data structure i should use, Interviewer gave the hint of stack.which is the
appropriate data structure to make the steps back.
4) Asked a small question on if there are other objects which cannot be serialized that we have to use
in our class which is expected to
be serializable how do we do it ?
Round – 5 (F2F)
1) Asked questions on Message queues, How did you perform request response implementation using
the message queues ?
2) What is JMS how is it different from other tool vendors like active mq and so on ?
3) Asked significance of queues and topics.
4) Given a list of users and their phone numbers each user can have multiple number of phone
numbers
How to get the m users having highest number of phone numbers
– Data storage structure suggested was HashMap>?
– Interviewer gave me hint that i can get the entry map as list with in the hashmap
– So i wrote a comparator to compare the sizes of the arraylist in the entry map object.
– Called collections.sort();
5) Asked to print the right side view of a binary tree.
– Suggested to do a breadth first traversal on binary tree using queue and pull the last element.
– He asked how will you find the last element of the queue ??
– He suggested how about using stack to perform the breadth first traversal of the binary tree.
6) Asked on how do you get the thread dumps
– said i use jstack command line tool to get the dumps.
Round -6 (F2F)
1) Robot is some where inside the rectangle,it can do only operations such as move
forward,backward,left and right.
Asked to find the area of the rectangle.
2) After that he said the rectangle inside is filled with the obstacles of arbitary size so now how to
find the area.
said assuming my rectangle can be broken into smallest units called pixels if i could what all pixels
robot can cover i can get the area.
But could not write the code on how to do it.
He said this is similar to breadth first search that we do on a graph connected by points.
But it didnot click.
3) Asked on how to make applications scalable using redis.
Source: http://pavanraj84.blogspot.in/2015/08/my-interview-questions-at-quickr.html
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/quikr-interview-experience-set-3/
Aspiring Minds Interview Experience | Set
1 (On Campus)
I was interviewed for the Product Engineer role on campus recently. The process consisted of
AMCAT test followed by 2 Tech Interviews and 1 HR round.
Round 1 – MCQs – Logical, Verbal, Computer Science ( OS, DBMS, Networks ) and 2 coding
questions.
Then around 15 students were shortlisted for the telephonic interviews and live coding (google docs)
Luckily, I was shortlisted after my tech rounds and did not go through the HR round.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/aspiring-minds-interview-experience-set-1-on-campus/
SAP Labs Interview Experience | Set 10
(For Developer Specialist, 4-6 yrs)
This was for a Developer Specialist (JAVA,JAVASCRIPT) position(4-6 yrs). It was a very long
process but was an awesome one!!!
After 3-4 hrs I got an update that I am through the telephonic screening and have to attend F2F.
After introduction,few questions were in JAVA then he started asking some coding questions.
Round 8 ( HR -telephonic)
1) What are your strengths and weakness?
2)Why SAP?
3)Notice period.
4)Expected Salary.
Tips:
1)Questions in this firm are not that difficult like Amazon and other firms but the subjects covered are
broader than what other companies ask.(Not limited to DS and Algo)
2) Even though you are proficient in many topics/technologies as mentioned in your resume, the
interviewer would give you an option to choose the topic of your choice.
3)No on is perfect !!! All the interviewers were very helpful and were giving tips/clues during the
problem solving.Please ask if you need more details about the question rather than keeping mum.Aall
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/sap-labs-interview-experience-set-10-for-developer-specialist-4-6-
yrs/
Goldman Sachs Interview Experience| Set
14 (1+ Years Experienced)
Goldman Sachs Interview questions – Onsite (Experience: 1+ years)
Technical rounds – 4
Managerial round – 1
Technical rounds
Round 1
Round 2
Round 4
1. Given a linked list, reverse the elements from the beginning in blocks of two. Given: 7 -> 4 -> 9 ->
2 -> Null. Output: 4 -> 7 -> 2 -> 9 -> Null.
2. Given a Rubik’s cube of size n (Made of n^3 smaller cubes). You remove all that are visible from
outside. How many cubes are left?
3. The 4 people, bridge and one torch puzzle.
4. Java generics syntax.
5. Implement multiple stacks in one array.
6. In an array of positive integers, find pythagorean triplets in O(n^2) runtime.
Managerial round
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/goldman-sachs-interview-experience-set-14-1-years-experienced/
enStage Bangalore Interview Experience
for Software Engineer position
Round 1: Engineer Manager
1. Asked About project (End to End)
2. I have used Multithreading in my applications, so asked why Multithreading?
3. Multithreaded program using Thread and Runnable.
4. Applications server and Web server Difference
5. Project Architect.
6. Class design for project module
7. How to create a good database design?
Round 2: (Director)
This Round Questions were asked on Project and Payment Gateways.
1. In this rounds mainly focus on project, and the technology used,.
2. Types of encryption technique
3. About payment Gateways authentication.
4. Roles and responsibilities
5. Why do I want to join?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/enstage-bangalore-interview-experience-for-software-engineer-
position/
1. More focus on real time server and client connections, how TCP and UDP works.
2. SQL functions , Trigger, Stored Procedure
3. Jdbc Vs Hibernate
4. Server and Client TCP/IP program
5. Puzzle related to link list.
6. About Project, how FTP works?
7. Spring MVC Annotations Tags name and Package name.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/verifone-interview-experience-set1for-software-engineer/
Introduce yourself.
Detailed discussion of my projects (make sure you are well versed with your projects)
1 puzzle on the 2 rope problem which burn in 60 minutes ,and you have calculate 45 minutes.
Then asked me my interests , I said Data Structures .
Asked me questions on HashTable , HashMap ,implementation of the same.
Find if 2 given nodes of a tree are siblings or not.
Given a linked list and only a pointer to the node delete the node.
Another puzzle question. There are 25 horses with a race track on which 5 horses can race at a time.
How many minimum races needed to find top 3 horses.
He saw my cv thoroughly and saw I knew php and hence database. So asked me to design a database
system for mobile shops in different cities with different branches in each city. Each branch selling
same mobile phone at different costs.
Then asked me to write a query to get the branch and city where the mobiles phone’s cheapest price is
available.
Given two array find which number is missing from the first and second one. (easiest question of all)
Saw I knew data structures so asked me to implement heap and asked why trees are used if we can
represent the tree in an array ( given that if a child is not present we mark that array element as 0)
Asked me how can we implement a search engine like Google with millions of pages to be searched.
I answered hash table as it’ll take O(1) time. Then I was asked what would be the time complexity if
we’ve clashing in the hash buckets. Asked me about best hash functions.
One aptitude question. Given 8 balls with one having more weight than other find it in minimum tries
(Common question) I answered. He said now let’s the change the question to “you don’t know if the
odd one out ball is lighter or heavier than others”, now how many tries are needed? (couldn’t solve
this one)
I would like to thank Geeksforgeeks for helping me in the preparation for my interviews.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/goldman-sachs-interview-experience-set-15-on-campus-for-
internship/
Walmart Labs Interview Experience | Set 5
(On-Campus)
Recently walmart labs came to our campus for campus recruitment. Here is my interview experience:
Q1. Given n strings consisting of ‘R’ and ‘B’. Two strings can be only combined if last character of
first string and first character of second string are same. Given n strings, you have to output the
maximum length possible by combining strings.
I/P
RBR
BBR
RRR
O/P
9
Q2. Find the maximum digit occurred in a range of prime numbers Eg: Range ( 21 -40) –>Prime
numbers are 23,29,31,37,39 ( 2 occurs 2 times, 3 occurs 4 times, 1 and 7 occur 1 time and 9 occurs 2
times ->Answer is 3)
Round 2 (Technical)
a. First there was a deep discussion on my project. Questions related to Scalability were asked. I was
asked to draw the schema of my database and make it more efficient, questions related to
normalization were also asked. Long Discussion on NoSQL.
b. Top view of Binary tree but i told the interviewer that i know the answer and he seemed impressed
with my honesty. Was asked to implement Hashmap in C and one question related to hashmap was
asked.
There are two hashmaps and we have to find common entries, deleted entries, inserted entries and
updated entries in an efficient way.
Round 3 (Technical)
a. All the questions which i attempted in my coding round were asked to explain.
b. This question was asked: http://www.geeksforgeeks.org/count-possible-paths-top-left-bottom-
right-nxm-matrix/
Round 4 (Technical)
A long discussion on my other projects and then he gave me design question in which he asked me to
design a data structure to represent the situation ( You really can’t prepare for these types of questions
but make sure that you know all the important data structures from linked list to Segmentation Tree)
Round 5 (HR)
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/walmart-labs-interview-experience-set-5-on-campus/
Informatica Interview Experience | Set 2
(On-Campus)
Here is my interview experience.
This round is to just check OOPS concepts. So in test they given only C++/Java. So i choose java for
my subjective round.
20 questions.
We had to write codes, algos, point out mistakes in given code etc.
Ex. Finding a magic index in sorted array.
1 question from big Integer in java.
Round 3:(Interview)
1. Discussion on projects.
Round 4:
1. HashMap implementation in java.
2. OOPS concepts.
3. Tree questions.
4. 1 question on Array. Find the indexes where left sum is equal to the right sum.
First i gave him O(n2) solution he asked me to improve this.
Then i gave him O(n) space with O(n) time solution. Again he asked me to improve this
At last i gave him O(n) solution after that he was impressed.
Round 5(MR):
1. Puzzles.
Round 7:(HR)
Basic HR questions, relocation questions etc.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/informatica-interview-experience-set-2-on-campus/
Moonfrog Labs Interview Experience
Moonfrog Labs Interview Experience
The interviewer was very friendly and helping. She started with my introduction and discussed a bit
about my current project.
Discussion on this went for long and I have to write the class diagram and definition for few functions
which I mentioned in my design.
Q1. Reverse a singly linked list (Both iterative and recursive approach).
Q3. Print nodes at a given distance K from the given node in a binary tree.
Q4. Given an array of integers, at each index I can take steps upto the value at that index. I have to
find the minimum number of hops required to traverse the complete array.
From index 0, I can take 1 or 2 steps. From index 1, I can take 1,2,3,4 or 5 steps and so on.
Q1. Two players are playing a game in which each have to pick 1, 2, 3 or 4 coins in each turn. There
are n coins in total. Design a strategy to win the game.
Q2. http://codeforces.com/problemset/problem/487/A
I did not receive the offer but it was a good experience. I would like to thank geeksforgeeks for
providing such an awesome platform for interview preparation.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/moonfrog-labs-interview-experience/
Directi Programming Questions
An article containing recent Directi programming round questions in my campus placements and also
those in my friends’ colleges.
1) You are given a string S. Each character of S is either ‘a’, or ‘b’. You wish to reverse exactly one
sub-string of S such that the new string is lexicographically smaller than all the other strings that you
can get by reversing exactly one sub-string.
For example, given ‘abab’, you may choose to reverse the substring ‘ab’ that starts from index 2 (0-
based). This gives you the string ‘abba’. But, if you choose the reverse the substring ‘ba’ starting from
index 1, you will get ‘aabb’. There is no way of getting a smaller string, hence reversing the substring
in the range [1, 2] is optimal.
Input
First line contains a number T, the number of test cases.
Each test case contains a single string S. The characters of the string will be from the set { a, b }.
Output
For each test case, print two numbers separated by comma; for example “x,y” (without the quotes and
without any additional whitespace). “x,y” describe the starting index (0-based) and ending index
respectively of the substring that must be reversed in order to acheive the smallest lexicographical
string. If there are multiple possible answers, print the one with the smallest ‘x’. If there are still
multiple answers possible, print the one with the smallest ‘y’.
Constraints
1 <= T <= 100
1 <= length of S <= 1000
Sample Input
5
abab
abba
bbaa
aaaa
babaabba
Sample Output
1,2
1,3
0,3
0,0
0,4
2) Given two strings I and F, where I is the initial state and F is the final state. Each state will contain
‘a’,’b’ and only one empty slot represented by ‘_’. Your task is to move from the initial state to final
state with minimum number of operation.
Allowed operations are
1. You can swap empty character with any adjacent character. (For example ‘aba_ab’ can be
converted into ‘ab_aab’ or ‘abaa_b’).
2. You can swap empty character with next to adjacent character only if adjacent character is different
from next to adjacent character. (For example ‘aba_ab’ can be converted into ‘a_abab’ or ‘ababa_’,
but ‘ab_aab’ cannot be converted to ‘abaa_b’, because ‘a’ cannot jump over ‘a’).
Input
The first line contains single integer T – the number of test cases (less than 25). T test cases follow.
Each test case contains two string I and F in two different lines, where I is the initial state and F is the
final state. I and F may be equal. Their length will always be equal. Their length will be at least 2.
Their length will never be more than 20.
Output
For each test case output a single line containing the minimum number of steps required to reach the
final state from the initial state. You can assume it is always possible to reach the final state from the
initial state. You can assume that no answer is more than 30.
Example
Input:
2
a_b
ab_
aba_a
_baaa
Output:
1
2
3) A probabilitic preorder traversal is generated for a binary search tree from the following pseudo-
code
function preorder(u) {
if u is null then return
print u.label
r = either 0 or 1 with 50% probability
if r == 0
preorder(u.left_child)
preorder(u.right_child)
if r == 1
preorder(u.right_child)
preorder(u.left_child)
}
Given the preorder traversals of a binary search tree you can always uniquely construct the binary
search tree. Since, the inorder traversal of a binary search tree is of course, the sorted list of labels.
Given one of the probabilistic preorder traversals of some binary search tree, print the number of
different probabilitic preorder traversals that the above algorithm might generate. See the explanation
section for clarity.
Input
The fist line in input is equal to N, the number of test cases. Then follows the description of N test
cases. The first line in each test case is the integer N, the number of nodes in the binary search tree.
On the next line there are N integers – a probabilistic preorder traversal of the binary search tree. All
the labels of the nodes in a test case will be distinct. The value of each label in a test case will be
between 1 and N, inclusive. You may assume that the input will be a valid probabilistic preorder
traversal of some binary search tree.
Output
For each test case, print a single number on a line by itself. This number should be the number of
different probabilistic preorder traversals that exist for the binary search tee – including the one given
in the test case. You may assume that the answer will always be less than or equal to 1,000,000,000.
In fact, it is easy to see that the answer can never be more than 2^30 (read to-the-power).
Constraints
1 < T <= 10000
1 <= N <= 30
Sample Input
3
3
213
3
123
5
24351
Sample Output
2
1
4
4) You are given a large array of 10,000,000 bits. Each bit is initially 0. You perform several
operations of the type “Flip all the bits between start_index and end_index, inclusive”. Given a
sequence of several such operations, perform all the operations on the array. Finally, split the array
into sets of 4 bits – first four, next four, then next four and so on. Each set can represent a hexadecimal
integer. There will be exactly 2,500,000 hexadecimal integers. Calculate the frequency of each of the
hexadecimal integers from ‘0’ to ‘f’ among the 2,500,000 integers, and print it. See Input / Output and
explanation of Sample Input / Output for clarity.
Input
The first line of input contains an integer T (1 ? T ? 10), the number of test cases. Then follows the
description of T test cases. You should assume that the array has exactly 10,000,000 bits and that the
bits are all unset at the start of each test case. The first line of each test case contains an integer N (1 ?
N ? 10,000), the number of operations performed. The next N lines contain two integers separated by
a space, the start_index and end_index for the respective operation. Note that the flip operation is
performed from start_index to end_index, inclusive. Also, the array is 1-indexed – meaning, the
smallest index is 1 and the largest index is 10,000,000.
Output
For each test case, output 16 integers on a single line, separated by single space characters. The first
integer should represent the number of times 0 occurs among the 2,500,000 hexadecimal integers
created according to the problem statement. The second integer should represent the number of times
1 occurs among the 2,500,000 hexadecimal integers created according to the problem statement, and
so on.
Constraints
1 <= start_index <= end_index
start_index <= end_index <= 10,000,000
Sample Input
2
2
14
9999997 10000000
2
36
58
Sample Output
2499998 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2
2499998 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0
5) You are given two strings, say A and B, of the same length, say N. You can swap A[i] and B[i] for
all i between 1 and N, inclusive. You cannot swap two characters within A, or within B. Also, you
can only swap a character in A with the character at the same index in B, and with no other character.
You can perform this operation zero or more times.
You wish to modify the strings through the operations in such a way that the number of unique
characters in the strings is small. In fact if n(A) is the number of unique characters in A and n(B) is
the number of unique characters in B; you wish to perform the operations such that max(n(A),n(B)) is
as small as possible.
Print the value of max(n(A),n(B)) after all the operations.
Input
The first line of input contains T, the number of test cases. Then follows the description of T test
cases. Each test case contains the number N on the first line. The next two lines of the test case
contain two N letter strings, A and B respectively. The letters are lowercase engilish letters.
Output
Print a single line for each test case. Print the value of max(n(A),n(B)) after all the operations are
performed such that the value is as small as possible.
Constraints
1 <= T <= 100
1 <= length(A) <= 16
length(B) = length(A)
Sample Input
3
7
directi
itcerid
5
ababa
babab
5
abaaa
baabb
Sample Output
4
1
2
6) Let’s define a string as an opening tag, where x is any small letter of the Latin alphabet.
Each opening tag matches a closing tag of the type , where x is the same letter.
Tags can be nested into each other i.e., one opening and closing tag pair can be located inside another
pair.
You are given a string. You have to verify if the given string is a valid xml or not.
Input
First line contain T number of test cases
For each test case:
Only one line containing xml tagged string S.
Output
Print in one line a string TRUE if s is a valid xml FALSE if it is not.
Constraints
0 < T <= 10
0 < length of S <= 10^5
Example
Input:
2
Output:
TRUE
FALSE
7) In this problem we consider two stairways, A and B, which are parallel to each other. Both
stairways, A and B, have N steps each where A[i], B[i] represent i-th step of A and B respectively.
Each step has some amount of penalty associated and if you use that step you will be penalized by the
same amount. After taking few steps you will accumulate penalty of all of the steps you visited.
You have a maximum jump length of K i.e., from A[i] you can jump forward to A[i+1] or A[i+2] …
or A[i+K] without using any steps in between.
You can also jump across the stairways with an extra penalty P for changing stairways. For example
from A[i] you can jump to B[i+1] or B[i+2] … or B[i+K] with an additional penalty P along with the
penalty of the step you visit. You can also jump from stairway B to stairway A and that too incurs an
additional penalty P along with the penalty of the step you visit.
Observe that from each step you can jump forward only. Your final penalty will be penalty of all the
steps you visited plus P times the number of times you crossed the stairways.
You can start from A[1] or B[1] and should reach A[N] or B[N] minimizing the penalty accumulated
on the way. Find the minimum penalty you will accumulate.
Input
The fist line in input is equal to T, the number of test cases. Then follows the description of T test
cases. The first line in each test case has three integers N, the number of steps in both stairways, K,
maximum jump length, P, penalty for crossing the stairs. On the second line of each test case there are
N integers where ith integer represents penalty of step A[i]. On the third line of each test there are N
integers where ith integer represents penalty of step B[i].
Output
For each test case, output a single line containing the minimum penalty you can accumulate on your
path starting from { A[1] or B[1] } and ending on { A[N] or B[N] }.
Constraints
1 <= T <= 10
1 <= K <= N
Output:
10
6
4
10
7
100
8) In this problem we consider a rooted tree Tr with root r (not necessarily a binary tree). A dfs –
depth first search – traversal of the tree Tr starting from root r , visits the nodes of Tr in a particular
order. Let us call that order as dfs ordering.
Observe that during a dfs traversal , from each node we have choices between which child to traverse
first.
These different choices lead to different dfs ordering. You have to find different ways a dfs can visit
the nodes i.e., number of different ordering of nodes possible by a dfs on Tr starting from root r.
Consider an example Tr with 3 nodes labelled 1, 2, 3 with 1 as root and with 2 and 3 as children of 1.
A dfs on this Tr can visit nodes in ordering (1, 2, 3) or (1, 3, 2). Hence there are 2 ways of dfs
ordering.
Constraints
1 <= T <= 100
1 <= N <= 1000
0 <= A[i] < i
Example
Input:
6
2
01
3
011
4
0111
3
012
4
0112
5
01122
Output:
1
2
6
1
2
4
9) Katrina is a super geek. She likes to optimize things. Suppose she is at position (0,0) of a two
dimensional grid containing ‘m’ rows and ‘n’ columns. She wants to reach the bottom right point of
this grid traveling through as minimum number of cells as possible.
Each cell of the grid contains a positive integer, the positive integer defines the number of cells
katrina can jump either in the right or the downward direction when she reaches that cell. She cannot
move left or up.
You need to find the optimal path for katrina so that starting from top left position in the grid she
reaches bottom right position in minimum number of hops.
Input
You are provided a template in which you have to implement one function minHops. The declaration
of minHops looks like
C / C++
int minHops(int matrix[64][64], int m, int n)
Java
statuc int minHops(int[][] matrix, int m, int n)
Output
The function should return the minimum number of cells that should be touched to reach from top left
corner of the grid to the bottom right corner (including touching both top left and the bottom right
cells). Return 0 in case no path exists.
Example
Suppose the grid looks like this
242
538
111
Example 2
5382
6421
There is no path from (0,0) to (1,3) , so the output for this case should be 0
Example 3
23214
32582
11221
10) Consider NewYork city which has grid like structure of houses. You are provided the city map in
the form of a matrix. Each cell represents a building. From each building you can go to adjacent four
buildings in four directions : east, west, north, south. Spiderman wants to rescue a victim which is on
some building. You will be provided with the location of victim and spiderman is situated at (1,1)
building. But, there is a condition that spiderman can not jump between buildings if the difference in
their heights is greater than some particular value. Find a way for spiderman to reach the victim by
crossing the minimum number of buildings.
Input
Input contains multiple test cases. First Line is a integer T, representing the number of test cases to
follow.
First line of each test case has 4 numbers – M, N, X, Y, D. Here MxN is the dimension of the city
grid. (X,Y) is location of victim.
This is followed by M lines. Each line consist of N space separated positive integers corresponding
to building heights. D is the maximum difference between heights of buildings that spiderman can
cross.
Output
One line for each test case containing a single integer, denoting the minimum number of buildings
spiderman needs to cross. Return -1 if its not not possible.
Constraints
Should contain all the constraints on the input data that you may have. Format it like:
1 <= T, M, N, X, Y <= 100
1 <= D <= 100000
Each building height will be less than 100000
Example
Input:
3
33332
123
694
785
33331
183
956
724
33331
167
258
349
Output:
3
-1
7
12) You are given a tree of N nodes. Each of the nodes will be numbered from 0 to N-1 and each
node i is associated with a value vi.
Assume the tree is rooted at node 0.
A node y is said to be descendant of node x if x occurs in the path from node 0 to node y. A subtree
rooted at node x is defined as set of all nodes which are descendants of x (including x).
A subtree is called univalued if the values of all the nodes in the subtree are equal.
Given the tree and values associated with nodes in the tree, you are required to find the number of
univalued subtrees in the tree.
Input
The first line contains an integer N which is the number of nodes in the tree. The next N lines contain
N integers representing the values associated with each node i.e ith line contains the value associated
with node i-1. The next N-1 lines give the information of edges in the tree. Each line contains two
space separated integers x and y denoting an edge between node x and node y.
Output
You have to print the number of univalued subtrees that are contained in the given tree.
Constraints
N<=30000
Example
Input:
5
0
0
1
1
1
01
02
23
24
Output:
4
12) Directi organizes FNCS (Friday Night Chill Session) every once in a while (lots of FUN!).
Directians comes and enjoy various events and then go out when they get tired and come back again
when they are refreshed. For convinience, in/out of any person is recoreded. At the end of the day,
The organizer wonders what the maximum number of persons was during the event. So he ask for your
help. He gives you the entry and exit time of each person like this:
The identity of the person does not matter. #1 and #4 may be the same person. In this case, maximum
number of persons present during the event at any time is 3.
Your task is to read the entries and compute the max number of persons present during the course of
event.
Input
Input contains multiple test cases. First Line is a integer T, representing the number of test cases to
follow. First line of each test case is a number N, number of entry-exit records. This is followed by N
lines. Each line consist of two space separated integers corresponding to entry time and exit time of a
person.
Output
One line for each test case containing a single integer, denoting the maximum number of persons
present at the party at any time.
Constraints
1 <= T <= 100
1 <= N <= 100
1 <= ENTRY_TIME < EXIT_TIME <= 10000000
The entry and exit time of the persons are guaranteed to be distinct
Example
Input:
1
6
78
49
69
8 17
2 14
2 10
Output:
5
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/directi-programming-questions/
Infosys Interview Experience Set (0n-
Campus for Specialist Programmer)
the first was a coding round on hacker rank ide, there was 2 questions to be answered in 90 minutes.
Question 1 : there are switches that can be controlled by a remote , n such switches are connected in
series and at the end of there is a bulb , the remote has a button that toggle the state of the switch (on
to off and vice versa) , but the remote only works in switches which have a electric connection to
them , A switch is connected when when all the previous switches are turned ON, and the bulb is on
when all the switches are ON , At first all the switches are off and only the first switch is connected ,
Question 2 : there are N employee sitting in consecutive cubicles , we have to send a few of them to
onsite , but each time we send one employee onsite , his cubicle becomes empty , now the other
employees from both side of that empty cubicle stops working until they are given a gift .
the gifts are given in both sides of the empty cubicle until we reach the end or found another cubicle ,
hint: we have to find the order in which we will sent the people on site , find the index that’s in the
middle or near about middle and send him out , keep doing the same for left and right sub array , there
are many other ways of doing this by using binary trees .
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/infosys-interview-experience-set-0n-campus-for-specialist-
programmer/
HP R&D Interview Experience | Set 2 (On-
Campus)
Round 1:
2) Technical : 22 questions in 30 Mins. Computer Science typical questions basics from CN,OS,DS
and Algorithms, DBMS .C /C++ output questions. Easy level.
3) OOP concept test: 8 questions in 15 minutes. Needs to choose either C++ or Java. Easy and typical
Indiabix and Geeksforgeeks are good source to revise.
Started with projects (Different than already discussed projects), some projects discussions for few
few minutes
and then he asked about UMLs. I said I am not very good at Software Engineering Concepts .
He then switched to OOPs ,asked which language I chose for test. C++ Classes, constructors and
typical C++ questions.
He made me write data structure program as classes and all ADT functions as member functions. He
then asked DBMS questions,given a relations, table decomposition, Normal forms etc.
All others ,except me, had two rounds of technical.No idea why.
Started discussion with projects (Different than already discussed projects), and rigorous discussion
on it.
Computer networking, All application layer protocols, and questions were more inclined towarsd
practical applications.
Web services,DNS,How a website request works, How to block website on computers(Linux and
Windows) etc. Prepare computer network with practical perspective,if you are doing it.
Then switched to Python as I mentioned it in resume.
long discussion on python. All fundamentals, programming tricks etc.Most were inclined towards
Lists and Dictionaries.
After waiting 2-3 hours, we were given an employment form to fill in. NOT OFFER letter,only
employment form. HR round was still pending.
More of a discussion round than QA round.All of below questions were more of discussion.
Why did you make this mistake twice, Master degree after bachelor degree?
What the most challenging situation you have been into?
Why engineering and that too, particular CSE?
Why HP R&D?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/hp-rd-interview-experience-set-2-on-campus/
Factset Interview Experience | Set 3 (On-
Campus)
Hello Everyone recently I had an interview with factset, it was overall a nice experience for me.
This was Pen and Paper coding round, 3 questions were asked and 90 min were there to solve them.
This was final HR round, interviewer was very nice he was listening my answers properly this was
the best HR I had faced.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/factset-interview-experience-set-3-on-campus/
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/oracle-interview-experience-set-16-on-campus-for-gbu-developer-
profile/
Calsoft Interview Experience | Set 1 (On-
Campus)
Interview Experience of Calsoft Pune:-
After that there was an online Exam that was pure coding exam. There were three questions :
It was 2 hours exam.
Questions were fairly easy
Q1: Two strings are given S1 and S2 , replace all character in S1 with ‘+’ those are not there in string
S2.
example S1 = MOHIT and S2 = ROHIT, answer = +OHIT.
Q2: An integer array is given, we have to tell in which case it lies, cases are:-
Case 1. array[5] = {4, 5, 6, 7, 8} ie series of natural number.
Case 2. array[5] = {2, 3, 5, 8, 13} ie fibonacci series.
case 3: array[5] = {9, 16, 25, 36, 49} ie square of natural number’s.
example: given input array[7] = {10, 11, 12, 13, 14, 15, 16}, ans = case 1.
given input array[5] = {1, 1, 2, 3, 5}, ans = case 2.
given input array[5] = {1, 4, 9, 16, 25}, ans = case 3.
Q3. Given an input array and a integer n, we have two tell in how many ways we can get number n by
summing the numbers of given array, we can use a number only once.
example: array[5] = {1,3,7,9,10,11} and n = 12 then
possible cases are 1+11, 9+3. so ans = 2.
They called me for PI, Some of the questions they asked were:-
First of all Interviewer saw my online exam’s code and ask me about toghness of paper.
Then we discussed about my Projects and and Internship for a while after that he asked me:-
What is difference between process and thread.
What happen when we type ‘www.google.com’.
What is Kernel.
What is dynamic memory and how to allocate it in C.
What is pass by reference and pass by value in C.
What is static and public variables and methods in java.
Is there any difference between Static and public Variables in java.
and some more…
In between he asked me some HR questions like what are your hobbies, did you go through our
website and what did u see there and some more.
Questions were straightforward and requires basic understanding of OS, Networking, C and JAVA.
After first interview they called me and said your first interview gone very well so no need of further
round but for some people they have taken HR round as well.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/calsoft-interview-experience-set-1-on-campus/
Oracle Interview Experience | Set 17 (On-
Campus)
———-
1st round
apti questions
coding questions
logical questions
analytical questions
————————–
2nd round on paper coding everyone got diff question. these questions i collected from my friends
1. sort the array such that even numbers in ascending order and odd numbers in descending order
2. n number of cards will be given out of 52 playing cards sort them according to colour and value
3. 4X4 matrix given which contains characters. one word will be given check all character of given
word are present in array or not
4. a long string of numbers will be given like 99100102103104016 find the missing number here 105
it can be of 1/2/3 or any length numbers ex 1234568 or 1112131416 or 9101113 or anything
others are also there
—————————
3rd round TR
2nd round is not a elimination round
total 60 people were selected for 3rd round
interviewers are friendly
my interview:
1. mine was sorting array problem (2nd 1st one) he asked me to explain my logic
2. told me to write test cases of all cases and to execute them
3. mine was O(n2). he told me to optimize
4 i used insertion i told him it will take less time in best case
5. then he told me to use merge sort. i didn’t got the idea how to implement merge sort with two
different logics he gave me idea then i understood and written the logic while writing i observed one
more error and i told him that and i corrected it. then he changed the logic i have to sort the array in
zig zag fashion. i did it (thanks to gfg http://geeksquiz.com/converting-an-array-of-integers-into-zig-
zag-fashion/
6. he read my complete resume each and every line in between he was asking simple questions about
my resume.
7. then he asked me “tell me about yourself that is not in resume”.
8. some management questions like i have convince my client to purchase a recently designed
product,
i am a shopkeeper in a footware shop i have to sell a shoe which is available in all other stores, but
he has to buy it in my shop only
9. puzzles: two ropes which burn in 1hr measure 45 mint… problem
12 balls, 11 are same weight one is faulty weight (we don’t know it is less or more) classical balance
given min number of turns needed
10. my project was on php and mysql so he asked so many questions about that he asked database
design of the project i explained him completely he was impressed
11. then he asked me questions in databases with increasing difficulty about 12-15 questions i
answered then he asked me some indexes in databases which i don’t know i told him the i don’t know
then he stopped asking about database
12. questions about java, c++,, php. all are difficult ones. i answered 85% of them
13. i written sql in resume so he started asking queries normal ones only
how to delete duplicate records
one coln contains IDs from 1 to n one is missing in between them how to find it using sql
view points what are they, why, how to create.. etc
given 4 tables with sample data asked me to select some rows from one table based on joint of
two tables which are results of one sub query with one condition. (it includes aliasing, join operation,
sorting, and mainly logic. i thought for about 5 mints then i got the logic)
14. its been more than 90 mints so he thought to stop the interview he skipped to basic questions about
me, my background, why oracle.. etc
and stopped the interview he told me that im selected for 4th round.
——————————————————————-
4th round
after 5 hrs after 3rd round i was called for 4th round
all are programming questions:
1. 4X4 matrix containing 1,0. 1-path 0- no path. starting point is given different exit points will be
given find the sortest path
3. agian about my 2nd round question and optimization techniques and another method to do it
4. coding round 2nd round 4 th question : input stream given find the missing number
99100102103104016 find the missing number here 10. i had already discussed it with my friend so i
explained the logic he said ok
5. 5 numbers 4 operators are given find the max value possible
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/oracle-interview-experience-set-17-on-campus/
Then after selection from written test,next round was Assignment round,we had to code in java or
C++.
1.Given is a (mxn) matrix with values comprising of 0 and 1. 1 defines a path while 0 is a
void. By traversing from top (0,0) (top-left) position using up, right, down and left
position, is it feasible to figure out if there is a valid path to the final (m-1, n-1) (bottomright)
position. You cannot step on an already traversed tile more than once. If there is a
valid path, can the same be printed?Print all possible
paths.
Input:
4,5
1,0,1,1,0
1,1,1,1,1
0,0,1,1,0
1,0,0,1,1
Output:
Yes
Interview Round:
Results of Assignment round were mailed to us and selected students were called for interview
round.
He started by discussing assigment question and variences of it,he asked approach to find the Shortest
path in Assignment question.
After this,he discussed on all my projects in detail which i had mentioned in my C.V.
Then he gave me DBMS questions to solve one by one:
1. Design a database schema to store Student marks for each test in the class per
term. The information also should store the Professor who is in-charge to
conduct that test. On this data, design a schema to secure data for view as
follows:
Professor can view data of all the students
Student can view data pertaining to himself.
Student can view Low, Average and High score of the class for each subject
without the name of the student to compare his score with.
3. He asked there is large document given with lakhs of sentences, write a query to display count of
corresponding each distinct word.(This was easy one).
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/numerify-interview-experience-set-1-on-campus/
Post navigation
← Oracle Interview Experience | Set 17 (On-Campus) Amazon Interview Experience | Set 230 (On-
Campus For SDE) →
Writing code in comment? Please use code.geeksforgeeks.org, generate link and share the link here.
Amazon Interview Experience | Set 230
(On-Campus For SDE)
Recently Amazon visited our campus and take three rounds for final selection.
Coding Questions:
2.A question involving optimization using modified binary search(I do not remember the entire
question).
A total of 10 students were selected after this round.The aptitude were simple but coding questions
were time-consuming.
Second Round(technical):
First question:
http://www.geeksforgeeks.org/write-a-c-program-to-print-all-permutations-of-a-given-string/
The interviewer asked me the approach only.
http://www.geeksforgeeks.org/print-a-given-matrix-in-spiral-form/
http://www.geeksforgeeks.org/print-left-view-binary-tree/
http://www.geeksforgeeks.org/print-right-view-binary-tree-2/
The interviewer asked me the approach but did not tell me to code.
It was an easy round and 5 students were selected for Third round.
Third Round(Technical):
First i told him in o(n) time complexity and o(n) space complexity approach but he wanted o(n) time
complexity with constant space complexity. I was unable to do it so he asked me second question.
http://www.geeksforgeeks.org/remove-spaces-from-a-given-string/
2.Write a program to find the element which is common in all the rows in a two-dimensional array. I
told him using binary search but he wanted more optimized approach but i was unable to do so.
I did not get selected but Overall it was a good interview experience.
I want to thank geeksforgeeks for such a good and amazing solutions to the back-breaking problems
which helped me in the interview .
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-230-on-campus-for-sde/
Salesfoce Interview Experience |Set 2 (On-
Campus For SDE )
Recently salesforce visited our campus and took the following rounds for the final selection.
Round 1:
Written aptitude round containing basic questions on C and C++ programming.The questions were
easy.
Around 10 students were selected for second round.
Round 2(Online coding atideone.com):
1.Write a program to find the number of valid parenthesis in a given expression.
For eg:
((()))) contains 3 valid parenthesis and hj()(i()) contain 2 valid parenthesis.
I solved it using stack.
2.Write a program to print the output solution for the rat so that he can reach his hole assuming that
there is a unique path possible.(1 represents that path is possible and 0 means that path is not
possible).
input :
(1,0,0,0)
(1,1,0,1)
(0,1,1,1)
(0,0,0,1)
Output:
(1,0,0,0)
(1,1,0,0)
(0,1,1,1)
(0,0,0,1)
It was a simple question and solved it using two nested for loops.
Around 6 students were selected after this round.
Round 3(Technical):
2.FInd the angle between hour and minute hand when time is 3:15 assuming an analog clock.
I was not selected after this round but i want to thanks geeksforgeeks for helping me in this interview.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/salesfoce-interview-experience-set-2-on-campus-for-sde/
Hiring Procedure:
Online Test:
—It was 90 minute test which included programming, little aptitude and Core subjects(Compiler
Design,Operating System,Computer Networks and DBMS).
—There were 3 programming questions where you need to write the code for the problem and
execute on their platform(HackerEarth). One of the problem was tough and the other two were on avg
level.One of the three was a Dynamic Programming question .But if you solve any two , i feel that you
will be called for next round (the number of test cases to execute were six for each problem).
Students who had solved one question also were called to interviews combining the score with
MCQs.
—There were 10 MCQs , which include questions on General Apti and core concept as mentioned
above. These were very basic GATE questions , if you know the concepts you can answer all of them.
—I was able to solve two programming questions and 8 MCQs(I think so :)).
Around 90 students have attended the test and around 22 were shortlisted for the Tech Interviews.
next question
2) Managing the seller ads on a social network , he had put many constraints like duration in which
ads should be displayed , fair distribution among all the seller ads, peak time display etc….I have
thought a solution told him , he was not satisfied and gave many extended solution but he was not
satisfied
But , he was happy that I didn’t give up at any moment or maybe he was using stress test on me .
5th Hr round:
— Traditional questions were asked .
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/walmart-labs-interview-experience-set-6-on-campus/
Infinera Interview Experience |Set 2 (For
Layer 3 Routing/Singnaling Developer)
I interviewed at Infinera for the post of Layer 3 Routing/Signaling Developer.
First there was a written round. Then we had three technical, one managerial and one HR rounds.
Interview questions were good, and the interviewers were very friendly and easy to move with.
Background: I had worked with timers, and IPv6. Hence most technical questions were relevant to my
resume. Almost all questions were very basic and easily answerable. Apart from resume, they
expected only multi-threading, socket programming and C++ knowledge.
ROUND 1: WRITTEN :
In the written round, there were 30 questions. The questions were grouped into easy and hard
sections. Easy section had one mark for each question. Hard section 3 marks for a question. No
negative marking.
1. What is the angle between the minute and hour hand when time is 03.15 ?
2. That poison in 1000 bottles and to be found in one hour problem from http://geeksquiz.com/puzzle-
19-poison-and-rat/
3. You have to measure from 1kg to 40kg. What is the least number of weights you should use?
4. A man climbs uphill in 12 hours from 06am to 06pm , in variable speed and resting at various
points. He rests for the night, and starts descending again in variable speeds and resting at various
points. He took 12 hours, same 06 am to 06pm of next day to get downhill.What is the probability that
he was at the same place at the same time of the day during his uphill and downhill travel?
Then we had questions related to vectors, copy constructors, exception handling and overloading in
C++. Most of the technical questions were
“Find the output of the following code snippet” format. Few that I remember are :
int i,j,k,c;
for(i = 1; i < 31; i++)
for(j = 1; j < 31; j++)
for(k = 1; k < 31; k++)
if((i+j+k) % 3 ==0)
c++;
printf("%d",c);
8.
int i = 7;
int *p = &i;
if (fork())
{ *p = *p + 10; printf("%d", i); }
else {wait(); printf("%d" , i); }
Then some networking related questions were there. They were all easy to answer. So, I remember
only these two.
Then First Technical Round started with Tell me about your self. It was a white board discussion.
Then the following questions :
2. Explain in detail how a packet from external, does ARP and reaches the relevant host.
5. What are the various scopes in IPv6 and explain where they are employed.
6. Write the TCP socket client server architecture and explain it. (I drew it)
7. What is little and big endian. Give examples of little and big endian machines. Why did all agree
on having big endian as network byte order?
Then I was asked to write a program to find the endianess of a machine. I told the logic. But the
interviewer gave me a paper and a pen and asked me to write a full program that will work if typed in
system.
Then he asked program to find the size of a structure without using sizeof () operator. Again had to
write full program for it. I wrote it as a function, interviewer said that he had expected it to be written
as a macro, but accepted my answer.
Then another program to implement my own version memcopy using void pointers. I made mistakes
by accessing void pointer directly. The interviewer was kind enough to guide me by pointing out my
mistakes.
Then Second Technical Round was there. Again started with my project experience. The interviewer
was very soft spoken and prompted whenever I was trying to bring out something. And also, he gave
enough time to think and answer.
10. What is the maximum number of timers that a process can have?
12. What is the use of a Rendez-vous point? What does is its function?
13. What are mutex and semaphores? What is the difference between them ?
Then Third Technical Round was very short and it was like rapid fire round to judge your technical
strength.
28. How does Valgrind work to find memory leaks? Tell with respect to internal working of Valgrind.
Finally he asked “Are you a hard worker?” I was really shocked with this question, as I had not
heard it before.
Then finally managerial round. It was also like an extension of technical round.
29. How does IPv6 resolve address? Is it resolved in kernel space or user space?
30. What is a routing table? What data structure will you use for it?
31. Tell me about your rapport with your TL. How do you interact with your tech lead?
32. What is your ambition? Where do you see yourself in 5,10,15 years?
33. You got into software as a fresher. What were your expectations vs reality? Are you disappointed
with anything?
34. How many lines of code have you written in your career so far?
37. Has any of your code/fix that you gave come back to you as faulty/with issues?
39. How long have you been looking for job change?
Those who attended with me also said they had questions from their resumes only and relevant to
their profiles. Some of their questions are :
1. How do you find and eliminate loops in linked lists?
7. Another program to print the sentence in reverse order with words intact, after removing spaces.
CONCLUSION:
Finally the interview process was over. It started at 10am and went on till 04 pm. All the
interviewers were very easy to move with and friendly. They provided tea/biscuits/water bottle
throughout the day and also gave us all lunch. They also provided paper and pen for the tests, but the
interviews were mainly whiteboard for me. The office was in MG road, and it was easy to find via
Google Maps itself.
In all rounds, I went ahead and asked the interviewer for feedback and about their expectations. They
were approachable and answered affably. I asked them questions, at the end of interview to interact
with them. I asked them if I had made any mistakes during the interview, and tried to learn from them.
Being my first ever interview, it was not like a very scary process for me.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/infinera-interview-experience-set-2-for-layer-3-routingsingnaling-
developer/
Thoughtworks Interview Experience | Set 1
(On-Campus)
Last week thoughtworks visited our campus there were three rounds.
ROUND 1:
Sol.)http://code.geeksforgeeks.org/7bdUSi
Sol.) http://code.geeksforgeeks.org/tF6llx
ROUND 2:
(Graphics doesn’t matter the code should be right. Languages : C, C++, JAVA)
Q1) Make a snake game.
Q2) Make a snake and ladder game.
ROUND 3:
Basic HR questions.
Yoo guys but I wasn’t eligible for interview(low percentage), but I collected these questions from my
friends who took part in interview process.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/thoughtworks-interview-experience-set-1-on-campus/
Merging two arrays,largest sum contiguous array,sql query to find nth maximum
tuple,polymorphism,lru cache,routing and finding whether the given two linked list intersect.
Interview 2: Was the easiest of the 3 interviews.Was asked to write sql queries for the given tables
which could be don using nested select,group by and limit.
Given a txt file containing strings write a program to copy the strings with more than 2 vowels to
another file.
Interview 3: Was asked about the dbms project that i had done(had to explain each and every details
about the project).He had the codes of the hackerrank round and discussed about it for 10 min or
so.Asked me a puzzle(there is an insect climbing a 35 inches wall.It drops 2 inches after climbing 3
inches.This takes a total time of 1min.After every drop it takes 1min rest.What is the total time taken
to climb the wall).I was supposed to do it without using pen and paper.Then he asked me common hr
questions like why visa,why should we hire you.
I want to thank geeksforgeeks for such a good and amazing solutions to the problems which helped me
in the interview .
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/visa-interview-experience-set-9-on-campus/
First round: MCQ round consists of 30 questions 30 minutes. Questions on C aptitude, four to five
general aptitude, two puzzle based aptitude questions. Around 120 wrote test, 10 were selected for
next round.
Second round: It took around 1 and half hour two people were there. All rounds were purely
technical. Questions are,
Tell me about yourself.
Finding pair in a given array such that sum is equal to given value. Then he modified for negative
numbers.
Check if a given tree is binary search tree or not with full code.
Third round: Only one question in this round. I have to design a dictionary of words such that if any
word is entered then it should give meaning for all anagrams for that word. We discussed for one
hour. First I told about using try data structure to make dictionary and generate all anagrams of that
word then searching each words. But he is not satisfied. Then I came up with some modification in
structure of try data structure still not satisfied. Then I come up with multilevel hashing Technique. He
somewhat satisfied.
Fourth round: It was final round and only two people were selected for this.
Puzzle: There will be 17 buckets and some 2197(don’t remember exact number) apples. You have to
put these apples in buckets such that if I ask any number of apples then just give any number of
buckets such that apples in those buckets should equal to that value. Hint, arranged as bits arranged in
binary representation of numbers.
Finding loop in a linked list. He first asked you already know this question I told yes sir. Then he
asked will it work if by changing fast pointer and slow pointer with difference of 3, 4, 5 nodes.
Addition of two linked lists with full code. Numbers are in reverse order and all border conditions
should be considered like, lengths are not equal. First he told to write for positive numbers I wrote
using recursion. Then he told to write negative numbers.
We both were told to wait outside. After few minutes they told only I am selected.
Thanks geeksforgeeks.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/accolite-interview-experience-set-7-on-campus/
Intuit Interview Experience | Set 10 (On-
Campus For Internship + FTE For Devops)
Intuit had visited our campus for recruting 2016 batch students for internship + FTE for Devops
profile. We had four rounds.
Round one :
Online exam on hacker earth platform.
20 MCQ questions 5 marks each.
3 coding questions 100 marks each.
MCQ questions were technical questions and logical questions. Technical questions were on cn,data
structures ,algorithms.
There were three coding questions.
1) A girl is standing on matrix of size m*n . She is standing at the position (1,1). There are cards on
which numbers are written . For example on top of card we have value A = 4 and on bottom B= 6.
Then the girl has to move to a point ((x+A),(y+B)) from her position (x,y).She is not supposed to
croos the boundaries of matrices . She throws away a card when she cant make further moves with it.
And pics up the next card. We are supposed to find out number of jumps she made untill all cards are
completed.
input:
1 :number of test cases
3 , 3 :size of matrix
2 :number of cards
(1,1) :values of A and B on card
(-4,1)
marks : 100
output:
single integer value giving number of jumps.
A matrix having numbers in a particular form was given . Analyzing those matrices we were
supposed to understand the trick of creating those matrices.The splendid matrices foe values on n =
1,2,3 is given below. Its a 2^n * 2^n matrix. Given value of n we should
generate 2^n * 2^n matrix.
n=1
1 2
3 4
n=2
1 2 5 6
3 4 7 8
9 10 13 14
11 12 15 16
n=3
1 2 5 6 17 18 21 22
3 4 7 8 19 20 23 24
9 10 13 14 25 26 29 30
11 12 15 16 27 28 31 32
33 34 37 38 49 50 53 54
35 36 39 40 51 52 55 56
41 42 45 46 57 58 61 62
43 44 47 48 59 60 63 64
3) Navi is a counter strike pro. He always say how good he is at counter strike. After being tired of
Navi, his friends decided to test his skills at shooting. They put M targets on a X-Y plane, each target
is denoted by (X, Y) where X is x-coordinate and Y is – y-coordinate. His friends also gave him N
locations on X-Y plane from where Navi can shoot the targets. Navi knows that he can shoot a target
if Manhattan distance between his location and target is ? D. If Navi can shoot more than half of the
targets (for odd values of M check only for the integral part of half of M, say M = 3, 3/2 = 1) only
then his friends believe that he is a pro at counter strike
otherwise he is not.
Input :
First line of input contains an integers T denoting the number of test cases. First line of each test case
consists of three
integers N, M and D separated by a space. Next N lines of each test case contains a pair of integers
denoting the X -co-ordinate
and Y – co-ordinate. Next M lines of each test case contains a pair of integers denoting X -co-
ordinate and Y – co-ordinate of
each of the target.
For each test case , Print “YES” if he is a pro else “NO” (without quotes) .
Based on the reults of round one 12 students were shortlisted for second round.
Round 2:
Technical round
2) Technical Interests,hobbies.
4) Scenarios were given and asked to give solutions for them . for e.g: It requiries 1 second to
retrieve 1 gb data from a database. Now you fill the databse with 10GB data . It takes 3 seconds.
What technology u will use to reduce that 3 to one second even to retrive 10GB data.
5) Questions relatd to skills u mention in the resume. I had mentioned about cisco packet tracer so
they asked questions related to that.
Round 3:
Technical round:
2) What is cloud ?
4) Bankers algorithm.
7) Quicksort algorithm
Round 4:
HR round:
Introduction to Devops.How they work and what they work on ? .They explained everything related to
Devops profile.
4) Since they came for Devops , they were testing trouble shooting capability of all students.
&nbap;&nbap;&nbap;&nbap;&nbap; a) If you search for bluetooth in google and it gives result for
television ,what will you do ?
&nbap;&nbap;&nbap;&nbap;&nbap; b) When you are trying to open a website and you get some
other unexpected website like a fake website ,what will you do?
&nbap;&nbap;&nbap;&nbap;&nbap; c) You are in your house connecting the speakers to the telivison
to watch a movie. But you find that you cant hear any sound. So how
will you find out the problem and rectify it?
6) How you will use the technologies you have studied untill now to help the devops team ?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/intuit-interview-experience-set-10-on-campus-for-internship-fte-for-
devops/
Adobe Interview Experience | Set 28 (For
MTS-2)
Written round:
3 hours of written test.
First technical and then aptitude.
1)
int* a = (int*)60;
int* b = (int*)40;
printf("%d", a-b);
4) Some assembly program was given, needed to tell what exactly the program was doing.
Round1: F2F
2) What data structure would you use to store a composite linked list?
Composite means that the data value in the individual nodes could vary among the primitive data
types.
I started with void* and an enum entry to specify the type to help during retrieval.
Then moved to using union. He looked happy with this.
5) What do I like about Adobe Photoshop from the technical point of view?
How would you load and display a 3 GB data file at runtime.
Round 2: F2F
So started comparing num1 and num2 also, if the number has even-digits, it would return early.
Also, if the number is a multiple of 10, can outrightly say it is not a palindrome.
Round 3: F2F
1) Code to check if a binary tree follows the below property.
Every node’s data = sum of left subtree + sum of right subtree.
3) Given an infinite stream of boolean digits, need to tell at runtime whether the number received so
far is a multiple of 3.
and so on.
Round 4:
1) Code for given a sorted but pivoted array, find the ceiling of a given number.
2) Discussion on projects.
Volatile keyword.
Discussion on use of extern and static.
If something has been written on the disk using big endian architecture and then read using little
endian architecture, how would happen?
Round 5:
2 questions asked here, i genuinely didn’t know the answer to.
I just tried attempting in all possible ways and analysing the pros and cons.
2) Say now, on a touchscreen display, you have those set of irregular pieces.
You touch at a point and swipe it, the corresponding piece should move in that direction. This game is
interactive and needs good time complexity.
3) Given a fairly large number, need to tell whether the number is part of fibonacci series or not.
You are not allowed to generate all the number in the fibonacci series.
I was not aware of the direct formula to check this at that point.
So tried the matrix multiplication method to calculate the nth fibonacci number.
I calculated the 1st number, 2nd number, 4th and so on, till the number exceeded the given number.
And then used binary search to track the answer down.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-experience-set-28-for-mts-2/
Adobe Interview Experience | Set 29 ( Off-
Campus)
Written:
7 coding ques. :
2. Matrix has rows in the form of 1’s followed by0’s.Find the row with maximum number of 1’s
3. Reverse a linklist
6. Find the number of pairs which sum upto a particular sum ‘K’.Numbersmay be positive or negative
7. Every number ending with 3, has at least one multiple of all 1’s.
4 F2F Rounds
Trick:
1. First solve using brute force, then if he asks to optimize, optimize the solution. never give
optimized solution in the first go. think think and think about the question, if still not able to solve,
asks the
interviewer for hint.
2. Be ready with the complexities of all the answers that you give.
Round 1:
1. Method to determine whether a number is a power of two.
4. Find largest and second largest number in an array with minimum number of comparisons.
Round 2:
1. if you cover distance x, then in the next step you cover 2x then 4x.in this way you cover total
distance n. tell me the way in which you are travelling.
2. What is inorder, preorder, postorder. write the code and the output for the given binary tree.
3. how to make a tree from the combination of any two, also write the full function code. why cant we
make binary tree from post and preorder? Explained well.
4. Find the intersection point of two linked lists with full code.
9. explain paging.
10. what does stdio.h do? difference between #include “” and #include .
11. what gets included when we do #include?? does it includes the whole definition of the function or
just the prototype?
13. what does linker do? hwo does it link? functions of a loader?
14. Explain all the compilation steps in this command “gcc a.c b.c c.c”.
Round 3:
1. You are given 4 (x,y) coordinates of a rectangle, 1 (x,y) coordinate of a circle and its radius. write
the code to find if the rectangle and the circle intersect?
Intersection: if a point on or above the figure is also on or above the other figure.
2. A sorted array is rotated around an element. Modify binary search to search for an element in the
array.
3. There are 2 processes, A and B, their working:
There is no producer-consumer problem. B retrieves only when A has produced some file.
Now instead of storing the entire file at some other address, the process A makes files and just pass
the address of those files to process B.
Will B be able to access those file?
Correct Ans: No, it wont access because any process just cant enter other process’ block to retrive
something.
My ans:
1.yes, if they were using some shared memory and the files are stored on shared memory.
2. no, if not shared memory because the address given by A is the logical address not the physical
address, so B cant access until it is given
physical address.
1. An array is given of size m, only n indices are filled. rest contain garbage. n for (int i=0; i
Then he asked that in this loop there are 2 comparisons in each iteration, i a[n]=x; for(int i=0; a[i]!=x;
i++); //only one comaprison now. if(i
2. There is a lake, it can have any random shape, you have to measure its volume without spending a
lot of money. how will you do it?
————-END——————————-
2. http://www.geeksforgeeks.org/tag/Adobe/
I thank geeksforgeeks for my success. Wishing all the geeks all the best for their future.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-experience-set-29-off-campus/
SAP Labs Interview Experience | Set 11
Hello everyone, I like to share my interview experience with sap labs.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/sap-labs-interview-experience-set-11/
1. Online round :
This was for screening and had 2 questions:
i) max sum product of an array -> (take care of negative no.)
ii) Bridge building problem across cities.
2. F-F round 1
i) interviewer asked me why microsoft and why bing.
ii) reverse linked list in size of k
iii) design question on array of finding an element in an infinite array
iv) search element in a pivot and sorted array.
3. F-F Round 2
i) same question why microsoft and some project of current company
ii) if 2 diagonally opposite coordinates are given of a rectangle, tell where they overlapp or not.
iii) find longest substring without repeated character
4. F-F Round 3
i) why bing ? what do you know about bing?
ii) design how will you implement the most viewed bar in bing search, different approaches
iii) how to merge 2 unsorted arrays .(gave 3 solutions with complexity )
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-idc-interview-experience-set-69-for-sde/
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/accolite-interview-experience-set-8/
Microsoft Interview Experience | Set 70
(On-Campus for IDC and IT)
Microsoft recently visited campus to hire interns for IDC and IT profiles.
I’d like to share my experiences.
1. Online MCQ Round – about 15 questions and 30 minutes – MCQ questions on cocubes.com
Problems were mostly output type questions in C and Java with a few questions on
Combinatorics.
2. Online Coding Round – Two coding questions on cocubes, one hour provided.
First question was given a binary tree, write a function that returns a linked list of the leaves of
the tree such that
a) Nodes in the linked list are in the order of left-most leaf to right-most, i.e, head is the left-
most leaf
b) Using constant ( O(1) ) memory – storing the pointers etc not allowed
Second question was, given an array and a window size that is sliding along the array, find the
sum of the count of unique elements in each window.
For example, if the array were 1 2 1 3 3 and window size was three
Total = 1+3+1 = 5
Which was to be returned.
Few people solved it in O(n) but most solved it in O(nk) where n is the size of the array and k is
window size.
3. Group Fly Round – Two problems were given, to be solved in about twenty minutes (maximum)
b) Given an array of numbers, find the largest product of three numbers in the array
We were expected to code our solution, write the approach, time complexity and test cases.
For the first problem, they expected a O(log n) solution, where n is the size of the array.
For the latter, they primarily wanted to check if the applicant accounted for negative numbers in
the array and that the product could either be of three positive numbers or two negative and one
positive number.
4. F2F interview I – Few theory based questions like abstraction in C++, volatile keyword.
Was given a problem – “Given an array of numbers, write a function that returns a balanced
binary tree” . He also asked me to modify it to return a binary tree that is as close to symmetric
as possible.
5. F2F interview II – Was first given a simple pattern printing problem – for example, if 16 is
given, to print :
16 11 6 1 -4 1 6 11 16
if input was 10
10 5 0 5 10
The challenge was to not declare any variables or use any loops. Gave a simple recursive
function that used stack implicitly to print the pattern. He was satisfied.
Second problem was, given two sorted arrays, to merge them in linear time and without using
extra space, i.e, given an array with enough extra space to hold a second array and a second
array, both of them sorted, to merge second into first and return it in O(m+n) time and O(1) space
complexity, where m is size of first and n is size of second array.
6. F2F interview III – This was partly a HR interview too, where we discussed Microsoft and its
services/ work culture / competition.
The only problem was given a dictionary of all words, to print all sets of anagrams together, in
time linear to the number of words in the dictionary.
The interviews were really thought provoking and the interviewers were helpful and friendly. It
felt like solving problems as a team and not at all like a test. The interviewers were quite
receptive to our questions and patient.
About 70 people wrote the online MCQ round and about 30 made it to coding round. Some were
called for interview directly and some had to go through group fly. Most of the candidates selected
were those who went through group fly.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-70-on-campus-for-idc-and-it/
Teradata Interview Experience | Set 1 (On-
Campus for Developer Profile)
Recently Teradata visited in our campus for recruitment
4. Lots of discussions about internal working of malloc() and free(). What will be happens in
following statements?
5. What is Balance BST? What is difference between BST and Balance BST?
What is difference between RB Tree and AVL Tree?
Write code for Insertion, Deletion and Traversal of AVL Tree.
6. What is Hashing? Different Hashing techniques. How hashing is implemented internally in C++
STL Library.
7. What is Breath first Search (BFS)? Write Code?Also what is real time Application of BFS?
8. What is compiler? Difference between compiler and interpreter How compiler works internally?
9. Find Bug in the following code with reasons.
a. int n = 5;
int arr[n] = {1,2,3,4,5};
printf(“%d” , arr[4]);
b. int n;
scanf(“%d”,&n);
int arr[n];
10. How OS Allocated Memory in RAM when your C program loaded into RAM
Discussion of Different memory Segments. What is difference between Stack and heap Segments?
http://www.geeksforgeeks.org/memory-layout-of-c-program/
http://www.geeksforgeeks.org/write-c-code-to-determine-if-two-trees-are-identical/
http://www.geeksforgeeks.org/write-a-c-program-to-find-the-maximum-depth-or-height-of-a-tree/
3. What is dequeue? What is the difference between dequeue, circular queue, priority queue and
normal queue? Real time applications of all the different types of queues.
4. What is “strstr” functions? Write your own “strstr” functions.I have given Naïve Solutions. Then he
tell me to optimize it. Then I give KMP Algorithm. He satisfies with my answer and he tell that write
the code for KMP Algorithm.
http://www.geeksforgeeks.org/level-order-traversal-in-spiral-form/
Tips
1. Your basic concepts should be good.
2. Good knowledge about C, C++ and OS.
3. Be honest on front of interviewers.
4. Be confidence.
5. Average knowledge of all the data structure and algorithm.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/teradata-interview-experience-set-1-on-campus-for-developer-
profile/
Swiggy Interview Experience | Set 2 (On-
Campus)
First Round (Online Coding on HackerRank)
4 problems
Time -90 min
Input: 1 3 100
Output: 196
link- https://www.hackerrank.com/challenges/stockmax
Input: "abc"
Output:
"a"
"b"
"c"
"ab"
"ac"
"bc"
"abc"
link- http://www.geeksforgeeks.org/check-if-a-given-sequence-of-moves-for-a-robot-is-circular-or-
not/
1. First he asked me to design the database for food shop, then he asked me to minimize the
complexity of database and then he asked me some DBMS Query related to Join Operation.
2. Given a Sorted array in which all elements are repeated except one element. Find non repeated
element in O (log n).
1. Discussion on project
3. What is Block cipher and Advanced Encryption Standard (AES)? If someone knows that you are
using
Polybius Cipher then what is the complexity in decrypting your original data (information)?
4. He modified “Stock Buy Sell to Maximize Profit “problem i.e. you can’t buy or sell stock
continuously and you can skip any day to sell or purchase.
4. There is stream of infinite number you need to find the median of number?
Input: 1 5 10 15 20 22 35 ....inf
Output:
Median of first number 1
Median of first 2 numbers 3
Median of first 3 numbers 5
Median of first 4 numbers 7.5
Median of first 5 numbers 15
....
....
5. There are 4 resources and 4 process .Is there any condition in which Deadlock occurs?
6. Find an Element in A Sorted Array which is rotated any number of times.
8. What is synchronization? If a process has opened a word file in write mode and preempted
beforeclosing it, at the same time another process is trying to open that file in write mode .Will it
Open or Not?
3. If i type www.facebook.com and clicked on search button, what will happen in background?
4. Tell me about data structure that DNS server uses? How DNS search for IP address?
5. O (2^n), O (n!) Which one complexity is better and why? Prove mathematically.
2. Why you want to join Start-up like Swiggy even you have other companies also?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/swiggy-interview-experience-set-2-on-campus/
Adobe Interview Experience | Set 30 (Off-
Campus For Member Technical Staff)
Hi, I was recently interviewed for MTS at Adobe. Here is my interview experience:
2. Matrix has rows in the form of 1’s followed by0’s.Find the row with maximum number of 1’s
6. Find the number of pairs which sum up to a particular sum ‘K’. Numbers may be positive or
negative
7. Every number ending with 3, has at least one multiple of all 1’s.
1. Given a boolean number in string form.WAP to output the 2’s complement of the number in the
same form(string).
4. Write a function to find maximum of three numbers using ternary operator only.
6. Some variable is declared in a file. It is now used in another file using extern keyword. What
possible problems could arise?
4) Technical Interview 1:
2) Consider a directory Structure. Given a file object of outermost directory, print unique names of
files. You are given a predefined isFolder() method.
5) Technical Interview 2
2. What is thread? What problems arise with multithreaded applications? How are they solved?
Difference between semaphore and mutex?
6) Technical Interview 3:
1. http://www.geeksforgeeks.org/search-in-row-wise-and-column-wise-sorted-matrix/
2. http://www.geeksforgeeks.org/reverse-level-order-traversal/
3. http://www.geeksforgeeks.org/a-linked-list-with-next-and-arbit-pointer/
href=”http://www.geeksforgeeks.org/clone-linked-list-next-arbit-pointer-set-2/”>
4. Given a binary search tree to be transmitted over a network, WAP to store the BST at sender side
and recreate BST on receiver side.
5. What data structure is used for dictionary. What are limitations of that data structure.
7) HR Round:
8) Director Round:
2) Design a mobile app which tells nearest restaurants to your current location. Discussion on how
restaurants should be stored on database. How should database be searched for restaurants based on
current location. How it can be optimized in case of remote areas and dense population areas.
3) Given n red balls, m blue balls and 3 containers, how would you distribute balls among the
containers so that the probability of picking up the red ball is maximized.
4) 4)WAP to read through a file and print tokens of length 5 comprising of alphanumeric characters
only.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/adobe-interview-experience-set-30-off-campus-for-member-
technical-staff/
Oracle Interview Experience | Set 18 (On-
Campus for GBU App Development)
Oracle GBU on campus selection.
1st round
Mcqs of apti and technical questions.
2nd round
4 puzzles
1. 2 glasses with same amount of coke in one and lime juice in other.. 1 spoon transferred from 1st to
2nd. 1 spoon from now what is in second to 1st. Which glass has more of the other drink
2. Males always tell truth, females always alternate on truth and false starting with any. Child tells u
it’s gender but u didn’t understand. Parent1 says child is boy.
Parent2 says child is lying.she is a girl. Find genders of all of them.(statement may be a little wrong, I
don’t remember exactly)
3. A bag has orange and strawberry candies. You take two out repeatedly at random. If they are same,
you put one orange in it else you put a strawberry and remove the two taken out. If u know the number
of candies of each type in the starting, can you find out the candy remaining in the end when only one
remains.
4. A puzzle about 4 brothers and their eye colours
4th round
1. Questions about implementation of oops concepts
2. 1 pattern series completion
3. 2 maths problems
4. Find min max elements in an array
5. Sql query to find 4th largest salary
5th round
1. Given n rectangles’ coordinates, find the area of all of them combined (taking overlapping area
only once).
Reduce space to O(n2) and time complexity to O(n3)
2. Sql query to find 5th largest salary.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/oracle-interview-experience-set-18-on-campus-for-gbu-app-
development/
Interview 1
1. Database design for my project… Had to make improvements to the ridiculous design of my
project on the spot.
2. Reach from 0,0 to m,n on a 2d grid having values in each cell.. Find the minimum sum path if u can
move only right or down
3. Html rowspan and colspan implementation.
2nd interview
1. 25 horses puzzle
2. Oops concepts with practical questions(he wrote codes and had to predict which functions will be
called)
3. What is the need for polymorphism if we can give a diff name to each function.
4. Explain code of previous interview.
3rd interview
1. Draw er relationship model for flipkart
2. Phases in software development. Advantages of prototype over waterfall model
3. Simple 10th standard maths problem
4. Do you want to lead or follow (a diplomatic answer would be “i’ll follow till i am capable of
leading”)
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/oracle-interview-experience-set-19-on-campus-for-app-development/
Around 40 students were selected for next day process from 300.
Day 2:
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/interview-experience-opera-solutions-noida/
Walmart Lab Interview Experience | Set 7
(Off-Campus 3 Years Experience)
Online round: [60 mins]
1. given a number N. print in how many ways it can be represented as N = a+b+c+d , 1< =a< =b<
=c< = d; 1<=N< = 5000
2. given two number l and r (l<=r<=10^6) find most frequent digit among all prime numbers between
l and r inclusive. if frequency is same print highest digit.
Round 1:
Round 2:
Round 3(Manager):
Round 4 (HR):
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/walmart-lab-interview-experience-set-7-off-campus/
C) Sq l Queries on join and aggregate functions, simple queries ,questions on 1 NF,2 NF,3 NF, BCNF
and loss less and lossy join
Cutoff-(65-70% questions)
INTERVIEW ROUND:
FIRST:
C)Design a new operation in the stack get max,such that you get the maximum element from the stack
,but the order of the stack should be maintained.
F)How to compare two max heaps with only one element differ(basically time complexity).
G)Design a module for your college such that each student mention her preferences of language and
each company coming for campus placement give its preferences,design a module to compare the
prefrences of the company and students,on basis of that allow that student to sit for
placement(basically the data structure used in this)
H) Shuffle the character array in the least possible steps and the most simplest ways(I was’nt able to
solve this question).
I)If you are at the starting node of the circular linked list and you have to find out it’s tail node not in
O(n) time.The time complexity should be O(log n) and space complexity O(1).
SECOND ROUND:
**NOTE: Opera solutions expects the student should be well versed with all the concepts
especially java and DBMS(sq l queries).
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/opera-interview-experience-set-2-on-campus-for-software-engineer/
Moonfrog Labs Interview Questions
Round 1:
1> given a number, and an encoding technique like 1-> A, 2-> C…. 26->Z, How may different valid
encryption can be done. Like 123 can be decoded as ABC or LC or AW. so the count is 3
2> given an array of -1, 0, 1 in an unsorted matter. sort it in order of n time conplexity
3> How to get the top 10 occurring words from a file which is dynamically changing
Round 2:
1> traverse a tree in spiral order.
Round 3:
1> Given an array which contains value in range 0 to N^2. sort it in order of N time complexity.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/moonfrog-labs-interview-questions/
1. Given three huge numbers, each represented using a linked list (where each node of a linked list
represents a digit), calculate the sum of the numbers and return back the number in the form of a
linked list. For example, 9->2->3, 4->6 and 2->5->1 representing numbers 923, 46 and 251
respectively. The result should be 1->2->2->0. This can be solved using stacks.
2. Given a graph, detect if it has a cycle. We can perform a dfs here.
Given a somewhat sorted array where the numbers are in ascending order first and then follow a
descending order, find the index at which the order changes and return the number at that index. For
example, i/p: 1234532, o/p: 5. I wrote down a modified binary search for it (had to take care of some
corner cases). The interviewer was satisfied and I was sent to the next round.
I have covered almost all of the questions asked to me. I had to wait for more than a week for the
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/amazon-interview-experience-set-231-on-campus/
Factset Interview Experience | Set 4 (On-
Campus)
Factset came to our college for full time hiring for Software Engineer post. There were 4 rounds – 1st
was written (pen&paper). Emphasis was on logic rather on full working code, pseudo codes were
also allowed. Questions were –
5
/ \
10 3
/ \ / \
2 0 1 6
/ \ /
1 8 7
output will be 0 1
There were two technical PI’s then. In 1st tech pi there were two interviewers. They were pretty calm
and patient.
1. To check whether a string is palindrome or not. Discussed all methods and then asked to code for
the same if the string is not in an array but in a linked list.
2. To find the pivot element in a rotated array in logn
3. Discussions on hash tables. Sum of two nos equal to a given k.
4. Next highest palindrome
5. Next highest no using same digits
6. Power function in logn
Last round was HR. In my case my HR was taken during the first round only.Finally they made an
offer to 14 of us
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/factset-interview-experience-set-4-on-campus/
Round 1:
There were 2 online coding question on cocubes.
1. Find the sum of all non repeating element.
2. Find the next smallest number of a given number by swapping the digits of the number.
http://www.geeksforgeeks.org/find-next-greater-number-set-digits/
Round 2:
1. Tell me about yourself.
2. Explain the previous round questions.
3. I was asked some question from their presentation and from my resume.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/oxigen-wallet-on-campus-placement/
Coding Questions:
1. Next smallest palindrome
http://www.geeksforgeeks.org/given-a-number-find-next-smallest-palindrome-larger-than-this-
number/
2. Given a number find the inverse of it such that (number * inverse)modulo 10^9+7=1
input 2
output 5*10^8+3
3. Check whether frequency of alphabets on first half of string is equal to frequency on second half.
input: HELHE, HEALE,HEAHAE
Output: Yes,No,Yes
Technical Interview 1
Firstly the interviewer asked me to introduce myself, asked me about my projects.
Then he moved on to coding questions and puzzles
All the questions below were in random order.
1. Coding question :
Full codes to be written
a> Algorithm to check whether sudoku is solved or not
b> Given a list of songs design an algorithm such that random song is selected every time and no song
repeats until the list is exhausted. (Optimise space and time complexity)
5. Puzzles:
1. 25 horses puzzle
2. http://www.xkcd.com/blue_eyes.html
5. Bicycle with 2 tyres and 1 spare tyre. Each tyre can cover a distance of 25KM. Find Maximum
distance that can be travelled
Technical Interview 2
Coding Questions:
1. Given a number permute the digits to get largest number possible.
2. Print 1
23
456
2. http://www.crazyforcode.com/bad-king-wine-bottles-puzzle/
HR Round
Basic details, family background and why do you want to join this company? Where do you see
yourself
after 5 years and questions about weakness and strengths.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/makemytrip-interview-experience-set-10-on-campus/
Microsoft Interview Experience | Set 71
(Off-Campus)
Written test:
They conducted written test in HackerRank and an hour duration. They asked me to implement the
functions for the following two problems.
1) Maximum product Sum of an Array.
http://www.geeksforgeeks.org/maximum-product-subarray/
Technical Interview 1:
He is very friendly and given hints to me while solving problems.
1) First he asked me about an overview of my current project then most challenging thing faced in the
project. After my response, he asked me what you learnt from that challenging thing.
2) Given an array of integers of the size of n, it contains zeros in random positions, we need to move
all zeros to end of the array in a single scan without extra space.
http://www.geeksforgeeks.org/move-zeroes-end-array/
5) He given a situation and asked me to design required classes and functions which are useful to
program that situation.
6) The last question is given a number we need to find the next nearest number in 2^n.
input: 127 output: 128
input: 129 output: 256
Technical Interview 2:
He asked me very simple questions, but he wants to cover each and every corner case.
1) Reverse group of elements in a linked list
http://www.geeksforgeeks.org/reverse-a-list-in-groups-of-given-size/
2) perform push,pop and min operations of stack in O(1) time.
http://www.geeksforgeeks.org/design-and-implement-special-stack-data-structure/
Some suggestions:
1) Practice on paper, don’t practice on the computer.
2) While practicing, we should try do the question our own then see the answer, don’t go directly to
the answer.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/microsoft-interview-experience-set-71-off-campus/
Drishti-Soft Solutions Interview | Set 7
(Off-Campus)
Had applied Off campus. They had asked us to bring our own laptops.
Q1 was very easy. We are given a no ‘n’, we need to count how many times 2 comes between 1 to ‘n’
in that range.
eg : – 19 . Between 1 – 19 , 2 , 12 contain 2 so the answer will be 2.
My approach was using modulus, check each digit and put this in the loop.
However 8/10 cases passed.
Q2 was dynamic programming. Find the length of the largest subsequence which first increases and
then decreases. eg : – 8 1 2 3 4 5 6 7 6 5 . In this case length will be 9 . 1 -7 increasing and 6-5
decreasing.
I was clueless, how to do this question.
Q4 : A program to reverse a linked list till k nos was given . We had to find the bug in it . Run time
error was coming .
The insert function in the list was entering this way
eg : input is 1 2 3 4 5 6 7 8 9
The values were getting entered in the list as
9 8 7 6 5 4 3 2 1 . Head pointing to 1
Our expected output for 1 2 3 4 5 6 7 8 9 with k = 4 ( The no till which we need to reverse)
4->3->2->1 ->8->7->6->5->9->8
Basically a no k was given till which we had to reverse.
Round 2 was Debugging round.
Rat in the maze problem was given . A person could go only 4 directions from the maze.
ABC decides to make cube but only has the budget to make a square maze. Its a perfect maze, every
room has a square base and there are 4 doors (1 on each side of the room). There is a big number
written in the room. A person can only move from one room to another if the number in the next room
is larger than the number in his current room by 1. Now,ABC assigns random integer numbers to all
the rooms and then places S2 people in the maze, 1 in each room where S is the side length of the
maze. The person who can move maximum number of times will win. Figure out who will emerge as
the winner and the number of rooms he will be able to move. In case there are multiple such people,
the person who is in the smallest assigned number room will win.value of integer directions. It was
taking us diagonally. We are allowed to move only top down left right. Boundary condition was also
being violated, we had to put the ifs. Also the function wasn’t modifying the values so we had to store
value in array rather than local variables. It was calculating the MAX..but the condition was put that
of MIN. Also we had to modify the VISITED array.
We had to design a client server application in which client was sending to server and server was
returning to the receiver.
It was very rigorous. First he asked for overview of all the projects done in engineering so far. On a
piece of paper, had to explain him the workflow. He then asked to choose 1 project of choice and
went into details. He asked to write the code of various modules / classes on a piece of paper. He
then asked detailed questions. Focused mainly on error handling. Lasted for 2 hrs.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/drishti-soft-solutions-interview-set-7-off-campus/
Factset Interview Experience | Set 5 (On-
Campus)
This test consisted of only one section i.e. PROGRAMMING, and it was pen-paper based.
Q1.(25 points)Given two arrays X and Y,you have to find the total number of pairs such that x^y>y^x
where x belongs to X and y belongs to Y.(already given on geeks for geeks).(solve it correctly).
Q2.(15 points)Given an arithmetic progression ,which has one of its number missing ,you have to find
the number in O(logN) time complexity.
(I did not read the question clearly …so i did not wote the logN solution ,although I was knowing the
solution …)
Q3.(10 points)Given a binary tree you have to print all the elements which are not boundary elements.
(st. forwrd )
(As they did not mentioned about the space and time complexity,I used a Map and solved the
question)
No restriction on the languages used.But they specifically mentioned that we should not write the
code in Pyhton or any scripting language.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your
article to [email protected]. See your article appearing on the GeeksforGeeks main page
and help other Geeks.
Source
http://www.geeksforgeeks.org/factset-interview-experience-set-5-on-campus/