MongoDB interview experience Real time questions & tips from candidates to crack your interview

SDE - Intern

MongoDB
upvote
share-icon
1 rounds | 2 Coding problems

Interview preparation journey

expand-icon
Application story
MongoDB visited our campus, and the CGPA criteria were high at around 8.5. I had a CGPA of 8.9, so I was eligible. The company directly shortlisted candidates for interviews based on their resumes.
Why selected/rejected for the role?
I got rejected because I panicked and fumbled on a relatively easy DSA problem. The interviewer gave hints to guide me toward a simpler approach, but I missed them due to a lack of focus.
Preparation
Duration: 6 months
Topics: Data Structures, OOPs, Time complexity, DBMS, Operating System, Dynamic Programming
Tip
Tip

Tip 1: Be consistent with DSA practice.
Tip 2: Try to solve questions on your own before looking at the solution.
Tip 3: Analyse the time and space complexity of your solution.

Application process
Where: Campus
Eligibility: 8.5 CGPA, (Stipend: 1L per month)
Resume Tip
Resume tip

Tip 1: Keep your past experience and internships authentic.
Tip 2: Clearly define your project’s motivation and scope for improvement.

Interview rounds

01
Round
Easy
Online Coding Test
Duration60 minutes
Interview date31 Jul 2025
Coding problem2

The interview was conducted on the Karat platform. The interviewer introduced himself and then moved straight to the coding questions.

First, he showed me a code snippet and asked me to identify the error in it.
Second, he showed a problem along with the solution code and asked me to name the algorithm and describe its time complexity.
Third, he asked a DSA problem.

1. DSA

  • This was the code for the Dijkstra's algorithm the interviewer asked me to find the error in that. (Learn)
  • Quick sort code was shown and I was asked to tell the time complexity. (Learn)
Problem approach

In the code for Dijkstra's shown, the condition to change the distance of node was not correct.

2. Reverse Pairs

Hard
50m average time
90% success
0/120
Asked in companies
IBMMongoDBD.E.Shaw

You are given an array/list say ‘ARR’ of size ‘N’. We call pair (i, j) a Reverse Pair when i < j and 'ARR[i]' > 2 * 'ARR[j]'.

Your task is to find the number of Reverse Pairs present in given 'ARR'.

For example :

For the array [50, 21, 9], if we follow 1-based indexing, the Reverse Pairs are (1, 2), (1, 3) and (2, 3). Thus, the total count i.e. the answer becomes 3.

Note :

A single index of the pair (i, j) can be used multiple times.
Problem approach

I applied the brute force
First, we will run a loop(say i) from 0 to N-1 to select the a[i].
As index j should be greater than index i, inside loop i, we will run another loop i.e. j from i+1 to N-1, and select the element a[j].
Inside this second loop, we will check if a[i] > 2*a[j] i.e. if a[i] and a[j] can be a pair. If they satisfy the condition, we will increase the count by 1.
Finally, we will return the count i.e. the number of such pairs.

Try solving now

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
Data Engineer-Intern
3 rounds | 2 problems
Interviewed by MongoDB
1747 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by OYO
4656 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by Meesho
6450 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3451 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
15480 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
15338 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
10141 views
2 comments
0 upvotes