Strategies Flashcards

1
Q

What is pigeonhole principle?

A

In discrete math, there is a property that if you have m items and n containers and if m > n, then there will be atleast one container with more than one item.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is manhattan distance?

A

Manhattan distance is inspired from city manhattan where buildings are in grid. Given two points in space, the shortest distance between two points will be difference in their co-ordintates. For instance given two points [p1, q1] and [p2,q2], the manhattan distance will be |p1 - p2| + |q2 - q1|. Refer to wikipidea article for picture of the same.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly