Snapdeal面试体验|第8组(校园内)

上周一月份,Snapdeal在我的校园为软件开发人员开展了安置活动。资格-所有CSE(无指标标准)

null

在线测试-

21(MCQ)+2(编码)在1小时内完成。对hackerrank进行的测试

21个MCQ有近10个能力倾向和11个基于C输出的问题。 优先考虑编码问题。尝试解决两个问题(通过其中一个问题的所有测试用例,并尝试解决另一个问题(即使是暴力也会通过许多测试用例) 天赋不是一分钟就能解决的。首先解决基于C o/p的问题。

问题- 1 重叠的画,找到可以清晰看到的画的数量,给出画的极端坐标。绘画的顺序很重要。 (假设所有绘画的高度相同,给出了起点和终点坐标)

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 hides any painting or not based on start and end coordinates. ( modification of interval selection problem )

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.Simpler approach ( short code )-http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=geometry2#line_line_intersection

Length / complicated soln-https://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 the question during online round !! :p ) and solved 4 MCQ's only ( all fluke )So my advice, do solve both coding questions for sure and solve C o/p questions in last 15 min

Round 1 – F2F TechnicalAvg 20-30 mins. 22 shortlistedMy went on for 1 hr to 1hr 15 mins

Internship based dicussion (20-30 mins ). Based on Cloud, Virtualization, NetworkingQ1- Given N, find LCM from of all numbers from 2 to N. Give the complexity expressed in the form of Number of prime numbers <= N. Had to be really precise in terms of complexity ( in terms of prime factors, maximum recurrences, each recurrence complexity ). Long dicussion on complexity. Don't say any method whose complexity you cannot prove. (E.g saying that i can use Sieve of Eratosthenes for prime pre-processing will lead to question of complexity of Sieve which is O( Log LogN), that cannot be proved trivally. ) So avoid using any such termsQ3- Spring / Hibernate in JAVATold him i work in C/C++ only. No experience in JAVAQ2- Types of SQL- NoSQL and SQL(Relational DBMS ). Why the need of NoSQL- Big Data AnalyticsQ3- How would you design DBMS for Snapdeal's website's shoe section.Now if you want to further break it into Sports and Casual Shoe would you break the DB into two or add another entity ? Full justificdationI initially answered with a multi-level indexed structure for DBMS storage. Could not answer on the second part of the question. He asked if i knew DBMS and i told him I do not know DBMS. He skipped the question and ended the interview. Told him i had advanced DBMS lab in my course currenlty and would learn it before graduating.Round 2- Coding Round ( 2 Hrs )10 shortlistedQ1- Turn an image by 90 degreeQ2- Given a sequence of words, print all anagrams togetherQ3- 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 interview. Shortlisting criteria- 2 questions in 1 hr – 1hr 15 mins even though they said that we had 2 hrs to solve all 3 questions !!

Round 3- F2F Technical4 shortlisted. This round went for almost 1hr 45 min - 2 hrs for me since I solved the Round 2 question earliest. Other 3 had almost 45 mins interview.

Q1- Variation ofPrint all possible words from phone digitsGiven a dictionary of words and a number n. Find count of all words in dictionary that can be formed by given number n.I started by exponential solution and reduced it to polynomial. We discussed various approaches and tried a variety of methods and after 1-1.5 hrs of discussion finally ended up with an O(1) solution with some pre-processing overhead. After achiveing O(1) time complexity, he asked to further optimize the space complexity.Usage of Trie / TST. Internal Implementation of Hashing structure and replacing the hashing mechanism using Trie / TST.

Q2- Given an array of elements. We can perform following operation only- Increase an array element. Cost of operation is the amount of increment made per array element. Now for a given H, we need to make any H ( not necessarily consecutive ) elements of array equal with minimum cost.

E.g.N=6, H=42 3 5 6 4 4

changes to -> 4 4 5 6 4 4Cost is ( 4-2 + 4-3 = 3 )

N=6, H=32 3 5 6 4 4

changes to -> 2 4 5 6 4 4Cost is ( 4-3 = 1 )Optimal complexity- O(N)

Round 4 -F2F (HR)3 shortlisted

Typical HR round.

I would like to thank geeksforgeeks for a exhaustive set of interview questions and study material on data structures-algorithms.

If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Related Practice Problems

© 版权声明
THE END
喜欢就支持一下吧
点赞15 分享