SDE 2 | DP World- Gurgaon | Rejected
Anonymous User
2481

Round 1:
OA: 100 mins test

  • 2 SQL queries - 1 Easy 1 Medium
  • 2 Coding Question - 1 Easy(array based) and 1 Medium based on Binary Search something similar to Aggressive Cows. but something was off with their test cases I could pass only 8/14 test cases.
  • 6 MCQ based on CN and basic DSA .

Round 2:
Question1:
You are given a 2D plane, there are points, every point is represented by [x, y], you need find all distinct rectangles which are either parallel x axis or y axis.
Example:
points=[(1,1),(1,4),(4,1),(4,4),(2,2),(3,3)]
Solution: 1.
(1,1),(1,4),(4,1),(4,4)

y-axis

^
|   (1,4)         (4,4)
|     *-------------*
|     |             |
|     |             |
|     |             |
|     *-------------*
|   (1,1)              (4,1)
|
+----------------------------------> x-axis

I could not propose a better solution than O (N^2), any pointer for a better solution.

Question2:
Given a binary tree, find the maximum path sum when you are allowed to skip 1 value.

          -10
        /     \
       9         20
        \      /  \
        -100   15   7

Answer 44.
Maximum Path: 9-> -10 -> 20 -> 15

not able to code this due to time.

Comments (4)