Skip to content
Related Articles

Related Articles

Improve Article

Airtel X-Labs Interview Experience for SDE Internship | On-Campus 2021

  • Difficulty Level : Medium
  • Last Updated : 30 Sep, 2020

Criteria:

  • Branches allowed CS/IT
  • Till 4th Semester: GPA>=8.5

Around 45 people were shortlisted here.

Round 1: This was an online round conducted on AMCAT. It consists of 3 sections.

Section 1: It has 14 logical reasoning questions which were very easy. There is no need for too much practice to solve these questions. There is a timer for each section. This section has 15 minutes.

Section 2: It has 16 Quantitative questions which were not too hard, to be solved in 20 minutes.



Section 3: It was of programming. Everyone has different sets. There were two programming questions that needed to be solved in 1 hour.

  • A variation of Merge overlapping intervals problems. The problem asked to count the distinct intervals after merging all the overlapping intervals.

    Corner cases to be handled carefully in this question.

  • This is a non-standard recursion/DP problem. Given two string str1 and str2 which contain only 0 or 1, there are some steps to change str1 to str2.
    step1: find a substring of str1 of length 2 and 
    reverse the substring, and str1 becomes str1' (str1' != str1)
    step2: find a substring of str1' of length 3, and 
    reverse the substring, and str1' becomes str1'' (str1'' != str1')
    step3: find a substring of str1' of length 4, and 
    reverse the substring, and str1' becomes str1'' (str1'' != str1')

    The following steps are similar.

    The string length is in the range [2, 30]

    Requirement: Each step must be performed once, and we can not skip previous steps and perform the next step. If it is possible to change str1 to str2, output the minimum steps required, otherwise, output -1.

    Since the constraints were very less in this problem, I solved it using plain recursion.

    I was able to solve both the problems completely. Students who were able to solve the 1st two sections with nearly full accuracy and did 1 coding question were shortlisted for the interview.

    After the Online round, 24 people were selected for interviews.



    Round 2: The interview was of more than a 1-hour duration. First, he asked me to tell me about myself apart from what was mentioned in my resume.

    I had mentioned two projects on ML in my resume, the interviewer seemed impressed and asked me to briefly explain them to him. No follow-up questions asked. Then he jumped straight to the coding questions:

    1. Given a binary tree, print alternate nodes at each level of the tree.

      Output format:

      The first node at each level must be printed always.
      Each level should begin with a new line.

      I discussed my approach to conduct level order traversal of a tree using queue and keep one variable to indicate next level and a flag variable(which keeps on negating after each iteration) to print alternate nodes.
      The interviewer was satisfied with my approach and he asked me to write the code for the same. He asked me to dry run on some cases to check the code.

    2. Pseudocode for preorder, postorder and inorder traversal of a tree.
    3. Detect loop in a linked list. I discussed the map-based approach in O(n) time and space, but the interviewer demanded an algorithm with O(1) space complexity. Then I told him the floyd cycle algorithm. He was impressed and asked me to write the code for it.
    4. As a follow-up to the last question, he also asked me to remove the loop from the LL.(the only approach was asked, no code required)
    5. Given an array of positive integers, design an algorithm to print the start and end index of the subarray with sum k(k is given as an input).
      Expected solution: O(n) time Code was asked
    6. He asked me to quickly explain acid properties.

    Overall, the interviewer was open to discussions and provided hints wherever needed. This was the last round and after the results were announced that 6 candidates were selected for the internship, and I was one of them.

    Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, AmazonGoogle and Microsoft Test Serieses.

    My Personal Notes arrow_drop_up
  • Recommended Articles
    Page :