Media.net | SDE-2 | Nov-2021 [Incomplete(Cancelled midway)]
Anonymous User
2776

YOE: 2.5 years
Current position: SDE-2 at mid sized public company

Round 1 (1hr)[DSA + Coding]:
I was asked 2 problems in this rounds -
Problem 1:
Find the Nth positive number whose prime divisors are only from the set {2, 3, 5}. List of numbers whose prime divisors are only from {2,3,5} are 2, 3, 4, 5, 6, 8, 9, 10, 12 ....
This problem involves the fact the every number can be represented as product of power of prime nnumbers.

Constraints:
1 <= N <= 10^5

Eg.
N = 5
Output: 6 (Since 6 is the 5th number in above list)

I couldn't get the solution for first 30 minutes. But then a solution using priority queue + keeping track of visited (something similar to BFS using priority queue) stuck me and I explained and coded it. Took 45 minutes overall to solve this problem.

Problem 2: https://leetcode.com/problems/next-permutation/
I had seen the problem before and was able to solve it in remaining 15 mins.

The interviewer shares a google doc for coding. Writing proper indented code was a challenge.
I qualified this round and was invited for 2nd round which was LLD + machine coding. I had received a very good offer and so decided to cancel this interview round.

Please upvote if you find this post helpful. :)

Comments (2)