Open In App

Expedia Group Interview Experience for SDE-2 (2 Years Experienced)

Last Updated : 19 Sep, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Coding Round 1:

  • Given a pair of integers (a,b), you can perform the below operations any number of times and in any order.
    • Change (a,b) to (a+b,b). 
    • Change (a,b) to (a,a+b).
  • Given another pair (c,d). you need to check whether (a,b) can be converted to (c,d) using the above operations.
Input – (1,1) , (5,2)
Output – Yes
  • Given Construct 3 classes, Circle, Rectangle, and Square. Each will have a method getArea(), which will give the area‘s cell value. The circle will have one class variable radius of type Float, Rectangle will have two class variables width and height. The square class will have one class variable width.
  • Given a list of Strings, each containing a 24-bit binary representation of a number. The First 8 bits represent the red color, the next 8 bits represent the green color and the last 8 bits represent blue color. You need to find from which color this pixel representation of RGB  is nearest.  Below is RGB values of 5 colors.
RED    GREEN    BLUE
BLACK  0   0    0
WHITE  255   255    255  
RED  255   0    0
GREEN  0   255    0
BLUE  0   255    0

Distance between two pixels is square root((r1-r2)^2 + (g1-g2)^2 + (b1-b2)^2), where r1 and r2 are red values in pixel, g1 and g2 are green values in pixel, and b1 and b2 are blue value in pixel. 
Return for each binary representation of RGB values, its minimum distance for these 5 colors. If a given pixel is at the same distance from more than one of these 5 colors, return “Ambiguous”.

Input – n =1
101111010110011011100100
Output – White

Round 1:

Round 2:

Round 3:

  • Design Library Management System
  •  ACID Properties (followup -question)

Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads