Tinder LLD | Amazon | India
Anonymous User
560

The system is Tinder basically. You are given two sets of person objects. Both the sets have equal number of person objects. You have to pair every person from 1st set to the most closely matching person from 2nd set. For determining close matching you have to compare various fields of the person objects. See the example for more clarity

  1. If the field is of type string then the similar the string the better match it is for both the objects. Not sure about what it means by similar. We have to decide that.
  2. If the field is a date then the closer the dates the better
  3. If it is a number then the closer the values the better.

There can also be cases where we can say that there is no appropriate match for some person in the other set or that there is a mild or there is a strong match.

Does anybody have some good ideas to implement this?

Example :
Set 1

Person 1 {
	name : Alex
	DOB : 12/03/2021
	points : 100.0
}
Person2 {
	name: Bob
	DOB : 12-03-2009
	points: 200.2
}

Set 2

Person 1 {
	name : Alexis
	DOB : 11/03/2021
	points : 101.0
}
Person2 {
	name: Bobbie
	DOB : 14/03/2009
	points: 200.5
}

In the above given sets we need to output that Alex macthes with Alexis and Bob matches with Bobbie. Notice that the date pattern may differ. Also there may be cases when some fields may have null value. We have to handle this case as well.

Comments (2)