- Published on
Google | SWE3 | Hyderabad, India | October 2024 [Reject]
- Author
- Shared Anonymously
Status: Experienced
Position: SDEII at MNC
Location: Remote, India
Date: October 20, 2024
Recruiter reached out to me for SWE3 role on LinkedIN.
I asked for 3 weeks for preparation as I am out of touch from DSA. All rounds were in virtual rounds.
Technical phone screen (45 minutes):
- Introductions
- Question: https://leetcode.com/problems/time-taken-to-cross-the-door (variation of this)
Onsite (4 rounds):
-
Onsite Round I: https://leetcode.com/problems/maximum-beauty-of-an-array-after-applying-operation/description/ (variation of this where m is given maximum paint operation with favorite color c that you can do apply to block. the operation should be in a way to maximise the length of continous blocks or beautiful path for the color c)
-
Onsite Round II: given string s, substring one can be in range i, j and substring two can be in range j+1, k, find number of all such substring pair such that distinct characters present in both substring are same. Example: ababac pairs: [ab ab], [ab aba], [aba ba], [ba ba] Output: 4
-
Onsite Round III: You are given an undirected tree and can apply at most k operations on it. In one operation, remove a leaf vertex and its adjacent edge. A leaf vertex is a vertex that is connected to exactly one other vertex. Minimize the tree's diameter by applying the operation as many as k times.
Use the following assumptions: "The distance between two vertices is the number of edges in their shortest path. The diameter of a tree is the maximum distance among all pairs of vertices in the tree."
Return the minimum possible diameter after applying at most k operations.
5 → tree size n = 5
1 → number of operations k = 1
4 → edges[] rows n-1 = 4
2 → edges[] cols = 2
1 2 → edges = [[1, 2], [1, 3], [1, 4], [3, 5]]
1 3
1 4
3 5
Output: 2
Recruiter called and informed got Lean Hire, No Hire, LeanHire. So not proceeding further.