Question: Paytm SDE Fulltime Interview Experience (On campus),IIT jammu, Sept 16 2022
2
Entering edit mode

Paytm SDE interview Experience

Campus: IIT JAMMU

Initial Shortlisting: Based on resume (Cleared the shortlisting and got a link for the Online assessment round)

Online Assessment round(OA):

  1. Two questions based on DSA and 10 MCQs,s based on cs fundamentals were to be solved. The test was conducted on the Hackerrank Platform. (Cleared this round for interview round 1)

Technical Interview round 1:

  1. 20 minutes - A brief introduction and projects on the resume were discussed.

  2. 25-30 minutes- One DSA question based on the sliding window technique. (Minimum length substring to be deleted from a string consisting of lowercase alphabets such that the remaining string has all the characters distinct. The length of the string n was in the range 1 <= n <= 100000)

    Click here to Practice
  3. 5-10 minutes - Based on CS fundamentals (1-2 SQL queries + 2-3 questions based on oops).

Verdict: Cleared this round


Technical Interview round 2:

  1. 30 minutes: More focused on projects. Asked questions about the Django framework and why you used it. (As my project was based on it).

  2. 20 minutes - One dsa question based on LCA

    Verdict- Cleared this round.


HR Round:

  1. Just some basic HR based questions like, What would you contribute to the company, Where you see yourself in 3-4 years, What tech stack you are comfortable in?

  2. Tip - Also ask him some questions to carry on a conversation like what are the roles that are open for full time joiners etc.

Final Verdict - Got selected.

ADD COMMENTlink 2.0 years ago Lovish Dua • 20
1
Entering edit mode

Technical round 1 - Q2

Description

Given a string, remove the minimum length substring such that the remaining string has all characters unique.

Approach

As we can see, if we remove a substring, the remaining string should have length of atmost 26. If the length is more than 27, there will be at least one character with 2 occurrences.

Also, removing a substring will result in some elements from the starting being left out (whose size will be <= 26), and some elements from the end being left out (size <= 26).

Hence, we can iterate over all such possibilities and find our answer.

C++ Code

int solve(string s)
{
    int n=s.size();
    int ans=n-1;
    for(int sz1 = 0;sz1 &lt;= 26;sz1++)
    {
        if(sz1&gt;n)
            break;
        string curr="";
        if(sz1&gt;0)
            curr=s.substr(0,sz1);
        int sz2=26-sz1;
        for(int j = 0;j &lt;= sz2;j++)
        {
            if(sz1+j&gt;n)
                break;
            string nCurr=curr;
            if(j!=0)
                nCurr+=s.substr(n-j,j);
            set&lt;char&gt; se;
            for(auto c:nCurr)
                se.insert(c);
            if(se.size()==nCurr.size())
                ans=min(ans,n-(sz1+j));
            else
                break;
        }
    }
    return ans;
}

Time Complexity : O(26*26*26)

ADD COMMENTlink 2.0 years ago hardik kapoor 130

Login before adding your answer.

Similar Posts
Loading Similar Posts