📜  Snapdeal 面试经历 |设置 10(校园内)

📅  最后修改于: 2022-05-13 01:58:27.881000             🧑  作者: Mango

Snapdeal 面试经历 |设置 10(校园内)

第一轮:在线测试
时长 : 1 小时
内容:22个多选题,2个代码
平台 : HackerRank

22个多选题:(不平凡)
定量 分析 : 时间 速度 距离 , 种族 , 百分比 , 比 比 , 概率 , 数 系

代码片段:
一些非常好的问题,需要深入了解指针概念、递增递减运算符、printf函数、联合等
例子 :
->for(printf(“1”;!printf(“0”);printf(“2”))
printf(“抢购”);
->int a=-6
cout<>2);
->printf(“%s”,”snap” “交易”);
->联合u1{
诠释:2;
诠释 b:3;
诠释 c:4;
}var;
int main() {
var.a=2;
var.b=-6;
var.c=4;
cout << var.a << " " << var.b << " " << var.c; } 代码: 1)重叠的画,找到没有。在可以清楚地看到的画作中,给出了画作的极端坐标。绘画的顺序很重要。 (假设所有画的高度相同,给出开始和结束坐标)

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.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:Round 2 : Group Fly : Major Elimination Round (Paper-pen)3 coding questions ( any language )duration : 1 hourOnly function to be written (no main())1) Check for balanced parentheses in an expression (STL allowed )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 subarray3)Check if Btree is a BSTRound 3 :1st F2F Technical1)Detailed Discussion on projects -> Note : He didn’t ask anything related to the content of my project but the actual use of the project in the real time world , the pros and cons of it , the scope in future , where is the technology applied presently etc2) 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 https://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 shiftingDon’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)Round 4 : 2nd F2F Technical1)Design a placement softwareRequirements     a)Choose a group of panelists for a particular college.     b) panelists have different expertise     c) colleges may have engineering , arts , science sections as well     d) A panelist can be out for recruitment max 3 days in a fortnight (I asked him to give access to the personal calenders of all panelists )     He asked me to draw the ER diagrams first     Than asked me to show the normalized tables     Then he asked me to code the whole thing especially the 4th requirement : time constraint (i did it using boolen vectors and kmp algorithm)     He was happy with my design.Advice for design question : Ask for requirements first and keep writing them on a paper , and keep cross questioning on the available data.2) code : Find square root of a number     I gave an interative O(n) solution ,     He told me to optimize : I did it in O(logn) with binary search     Further optimize to O(1) : I got stuck ,after a lot of discussion on different techiniques he gave me a hint that he would be using my function a lot of times then I immediately told him to use hash maps and save the previous results.He started smiling and asked me if i had any questions for him 😀3)OOPs concepts :Aggregation , composition, encapsulation , abstraction , inheritance , polymorphism.Went further deep into the concepts of encapsulation and abstraction, difference between them , a real world example (i used mobile phone : mobile phone blue print is abstract class , bluprints for different versions of the same mobile i5,i6 etc are derived classed , actual mobile phones are objects encapsulated.),what is data hiding , relation between data hiding , encapsulation , abstraction.Round 5 : HR roundIf 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.All Practice Problems for Snapdeal !