Skip to content

Commit c20c66d

Browse files
author
Pranjal
authored
Update MinStepsInInfiniteGrid.cpp
1 parent 1eacd5f commit c20c66d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Arrays/MinStepsInInfiniteGrid.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// https://www.interviewbit.com/problems/min-steps-in-infinite-grid/
22
// Input : X and Y co-ordinates of the points in order.
33
// Each point is represented by (X[i], Y[i])
4+
5+
// Explanatory code
46
/*
57
int Solution::coverPoints(vector<int> &X, vector<int> &Y) {
68
@@ -41,6 +43,7 @@ int Solution::coverPoints(vector<int> &X, vector<int> &Y) {
4143
}
4244
*/
4345

46+
// Concise code
4447
int coverPoints(vector<int> &X, vector<int> &Y) {
4548

4649
int size1=X.size(),size2=Y.size(),ans=0;

0 commit comments

Comments
 (0)